When I "Pause" game, it return to Main Menu

I have 4 scenes:

  • Scene 0: Main Menu.
  • Scene 1 to 3: Level 1 to 3.
    I follow a Youtube tutorial to create a “Pause Menu” with “Resume”, “Main Menu” button in each level with Escape Key, when I press the button, the Pause Menu appear and immediately the Main Menu scene is loaded. How can I fix it ?
    Thanks.

Here is my Pause Menu code:

using UnityEngine;
using System.Collections;

public class PauseMenu : MonoBehaviour {
	public GUISkin mySkin;
	private Rect windowRect;
	private bool paused = false, waited = true;

	void Start(){
		windowRect = new Rect (Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200);
	}

	void Update(){
		if(waited)
			if (Input.GetKey (KeyCode.Escape)) {
				if (paused) paused = false;
				else paused = true;
				waited = false;
				Invoke("waiting", 0.3f);
			}
		if (paused)
						Time.timeScale = 0;
				else
						Time.timeScale = 1;
	}

	void waiting(){
		waited = true;
	}

	void OnGUI(){
		if (paused)
						windowRect = GUI.Window (0, windowRect, windowFunc, "Pause Menu");
	}

	void windowFunc(int id){
		if (GUILayout.Button ("Resume"))
						paused = false;
		GUILayout.BeginHorizontal();
		if (GUILayout.Button ("Option")) {
				}
		if (GUILayout.Button ("Quit")) {
				}
		GUILayout.EndHorizontal();
	}
}

try adding `
using UnityEngine.SceneManagement;

Example:

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

see if the buttons outline reaches the other one