Use the arrow keys to move and the space bar to jump. Double click the flag to restart. Don't worry, once you double click the flag at the beginning of the game, the "you beat the game" screen will go away.
Thanks to 123animation's youtube tutorial series, how to make a mario game on scratch, which I used for a very large amount of scripting in this game.