When I press 'G', the NumberTest instance variable is always set to 0. I understand it reads from top to bottom, so how do I get this thing to work? Supposed to happen is: Press 'G', set NumberTest to 1, when pressed 'G' again, set NumberTest to 0.
Follow it through in your head. When G is pressed, and NumberTest is 0, it will be set to 1. On the very next line it says, if NumberTest is 1 (which it is because you just set it) then set it to 0. So almost immediately you've set it to 1, then back to 0 again. You probably want to have 2 'On G pressed' events, one for each of those lines.
A nicer way would be to do
On G pressed Sprite | Set NumberTest to 1 - Sprite.NumberTest
edit: otherwise else as suggested above. Lots of choices