Creating a window within a window GUI

Title doesn’t make very much sense,so allow me to explain.

I am trying to create a new button when this one is pressed. I did something similar in the main menu level for an options script. It is not working here though.

#pragma strict

//var startButton : Texture;
var numLives : GUIText;
var numIneternets : GUIText;

var pauseMenu = false;
var menuBox : Texture;
var quit : Texture;

var pauseButtonReturn : Texture;
var pauseButton : Texture;
var playButton : Texture;

var isPaused : boolean = true;


numLives.text = "Lives: " + ply.currentPlayerLives.ToString();
numIneternets.text = "Internets: " + ply.internets.ToString();

function menuAppear() {
		GUI.Box (Rect (Screen.width / 2 + 15, Screen.height / 2 - 100, 200, 200), menuBox,  "");
    	if (GUI.Button(Rect(Screen.width / 2 + 22, Screen.height / 2 - 91, 120, 120), quit, "")) {
    			Application.Quit();
    		
    		
    		
    	}
}

function OnGUI() {
	if (GUI.Button (Rect (Screen.width / 350, (Screen.height / 2) + 240, 50, 50), pauseButton, "")) {
	    	if (isPaused != true) {
	    		pauseMenu = false;
	        	Time.timeScale = 0.0;
	        	isPaused = true;
	        	audio.Pause();
				pauseButton = playButton;
	        	
	        	} else {
	        		pauseMenu = true;
	        		Time.timeScale = 1.0;
	        		isPaused = false;
	        		audio.Play();
	        		pauseButton = pauseButtonReturn;	       
	        		      
	       }
	       if (pauseMenu){
	       menuAppear();
	       
	       }
		}

}

Your script working. Only the button after clicking appears on one frame. That to correct it, transfer a condition for show button:

 function OnGUI() {
  if (GUI.Button (Rect (Screen.width / 350, (Screen.height / 2) + 240, 50, 50), pauseButton, "")) {
   if (isPaused != true) {
    pauseMenu = false;
    Time.timeScale = 0.0;
    isPaused = true;
    audio.Pause();
    pauseButton = playButton;
   } else {
    pauseMenu = true;
    Time.timeScale = 1.0;
    isPaused = false;
    audio.Play();
    pauseButton = pauseButtonReturn;           
   }
  }
  if (pauseMenu) { //Chane of a place of condition
   menuAppear();
  }
 }

I hope that it will help you.