Begin the code by pressing the green flag. The code will run to the end by itself. To reset the code press the space bar.
I used existing sprites but the whole idea and script is my own.