What movement source are you using? Is it 8 direction, bullet, physics or just pixel movement?
You can try setting it to when space key pressed and not when space key is down. That will set the condition to happen only once.
Instead of else use a variable trigger that changes when you hit the roof of the layout.