Making Game Over

Hello =) ive found this script for game over:
using UnityEngine;

///
/// Start or quit the game
///
public class GameOverScript : MonoBehaviour
{
void OnGUI()
{
const int buttonWidth = 120;
const int buttonHeight = 60;

	if (
		GUI.Button(
		// Center in X, 1/3 of the height in Y
		new Rect(
		Screen.width / 2 - (buttonWidth / 2),
		(1 * Screen.height / 3) - (buttonHeight / 2),
		buttonWidth,
		buttonHeight
		),
		"Retry!"
		)
		)
	{
		// Reload the level
		Application.LoadLevel("Game");
	}
	
	if (
		GUI.Button(
		// Center in X, 2/3 of the height in Y
		new Rect(
		Screen.width / 2 - (buttonWidth / 2),
		(2 * Screen.height / 3) - (buttonHeight / 2),
		buttonWidth,
		buttonHeight
		),
		"Back to menu"
		)
		)
	{
		// Reload the level
		Application.LoadLevel("Menu");
	}
}

}

Question 1 :but the Buttons dont goes invisible while i Play the game how to i make that?
Question 2 :what Need i write to script to make it gameover when Player falls down :stuck_out_tongue: thank you!

that code is complicated, best to go the unity reference page (it is brilliant)

copy and paste this code, take out the texture if you want its easier, use “string” only:

if you learn copy paste that things, then you will learn unity, promised:

do this:

void function OnGui (){
    IF (player.transform.eulerAngles.z <= 45 )//find something like that mean he fell over
    {
    
         ongui.button (screen pisition, button size , "retry string"){reload level code}
         ongui.button (screen position, button size , "menu string"){menu code}
    
    }
}

this is the function your call if button is pressed: to reload level
Application.LoadLevel(“your level name”);