OnBotActivated > Client > VCE_ifVariable > money >= 1
OnVariableFalse > Client > chatMessage > <color:FFFF33>Guard<color:FFFFFF>: I'll let you pass if you give me a coin.
OnVariableTrue > Client > chatMessage > <color:FFFF33>Guard<color:FFFFFF>: Thanks, you can pass now.
OnVariableTrue > Client > VCE_modVariable > money -= 1
OnVariableTrue > NAMED BRICK: (other side of gate or whatever) > setPlayerTransform > Relative 1 0
Or you can make the gate disappear temporarily, but if it closes before the player gets through, it can be a bit annoying.
You could probably give the client a variable that says they have clearance to open the gate from one side at any time, I guess.