Reseting a game after death

If there any chance if someone could give me a step by step way to reset a game in blender after death?
My game is a simple cube moving along a maze platform and i want it to reset after the cube falls of after user input.
p.s. im a newbie so i dont know a lot.

player restart.blend (774 KB)Here is a blend.Press p and then w to move forwards and when it falls off the platform it will restart.Study the logic bricks and
you will learn how.

If you’ve made a simple game in BGE, I’m assuming you already have used the Logic editor. Use the “Game” actuator with a collision sensor. Check the sensor where it says “M/P” and place a plane underneath your level, so that it is wide enough that the character can’t fall without touching it. Set the material to whatever material you chose to use for it. (If you don’t want this object to be visible, check the “Invisible” box in the physics tab, assuming you’re in BGE rendering.) Connect the “Collision” sensor to the “Game” actuator. in the actuator, click where it says “Start Game from Menu.” It should bring up a tab, and one of the selectable options should be “Restart Game.”
You should now have a working restart system, that you can modify any way you choose.

Step 1: Sense death - there is no death sensor. So look if you can detect the conditions e.g. a message “the king is dead”
Step 2: Activate the Game Actuator in “Restart Game” mode (by connecting it with the sensor from A))

now done it, thanks to everyone!