Restart option on game over?

Hey,

I am making just a simple 2D vertical shooter in Unity, using c#.
I have had a look online and can’t seem to find exactly what I am looking for…
All I want is to have a GUI text button to restart the game once you are killed by an enemy. I have made the Restart text, added the button component and have hidden it from the scene (only want it to show up when the game is over)
After looking online I found that this is a simple way of doing it

void OnGUI () {
	if (GUILayout.Button ("Restart")) {
		Application.LoadLevel(Application.loadedLevel);
	}
}

However that just brings up a restart button on the top left of my game, instead of setting it to my restart text.

Not sure what code I need to be putting, adding to the text or where I need to be adding this code? Will it need to go under where I have the game over text popping up?

Any and all help is much appreciated. Thanks very much!!

Here is the part of my enemy script which contains the game over on collision with an enemy…

void OnTriggerEnter2D (Collider2D other)
{
	if (other.gameObject.tag == ("Player"))
	{
		playerController.gameOverText.gameObject.SetActive (true);
		gameObject.SetActive (false);
		other.gameObject.SetActive (false);
	}

	if (other.gameObject.tag == "Bullet")
		gameObject.SetActive (false);
}

void OnGUI () {
	if (GUILayout.Button ("Restart")) {
		Application.LoadLevel(Application.loadedLevel);
	}
}

}

If you want to do it in script, this should help you:

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class GameOver : 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
						SceneManager.LoadScene("Scene Name");
			}