When the green flag is clicked, you will already be within the level editor mode. Whilst within the level editor, use the arrow keys to change your selected material. Press the spacebar to switch to the game player. Here you can test your level. In the level player use the arrow keys to move. You must collect all the treasure before you can complete the level. Complete the level by collecting all the treasure and reaching the green block. You can press the space bar to switch back to the level editor to make changes to the level. You can reset the level by pressing r within the level editor, this will clear everything and give you a blank canvas to work with. Pressing the green flag also resets the level. If this is unwanted, say if you want to continue with your current level after stopping the game, hold down the 'k' key whilst pressing the green flag. By using the "k" key to start you can use such "forbidden costumes" in the design of your level. Forbidden costumes accessible in this way include the player costume and the error costume. If you are using coins I recommend you do not start with the "k" key, because the number of coins are stored within a variable but this may be different from the number of coins on the screen if you do not start over each time.
Please check out my studio dedicated to projects with only 1 sprite and 1 script here: http://scratch.mit.edu/studios/498680/ And find my other projects here: http://scratch.mit.edu/users/theonlygusti/projects/