Press space when the grey rectangle is on the green to increase your score. If it hits the red when you press space, it's game over.
It was important to have the orange parts on the bar. If the bar was touching even the slightest bit of red then it'd stop the game if you hit space. The orange was a way of creating a distance from the colours so that you wouldn't accidentally lose even if it was touching the green. I started making this game late last year and decided "why not just make it into a quick game?" I don't exactly want to do a lot of scratch, but if I do pick up the habit again then maybe I'll create a version 2 of this game with a few more mechanics besides "make your score the highest."