Checkout this project at scratch.mit.edu
The movement of the spaceship is controlled by the up and down arrow keys. By pressing the spacebar, the spaceship shoots laser at the rock. When the laser touches the rock and disappears, you get 100 points. When the rock touches the spaceship it is game over.