[Solved @ Mr. X] Need a hand with UScript

Since this is a modding forum, I better ask for a bit of help
I want to make a switch. Not just an ordinary switch, though. I want this switch to check the player's inventory for a certain item. And I only want it to work when it finds that item.
So, could anyone here possibly write such a piece of code for me?

I want to make a switch. Not just an ordinary switch, though. I want this switch to check the player's inventory for a certain item. And I only want it to work when it finds that item.
So, could anyone here possibly write such a piece of code for me?