If you want something like your second line (press any button) then do If B>=0 then goto @sample When you press a button it puts in a code. Up is 1 down is 2 left is 4 and so on. And make sure in the beginning you put B=BUTTON().