When back button is pressed the Images pop up and go away

I have the below script and once I press the back button on my Android the images pop up but immediately go away. How can I make them stay one of the two button is pressed?

	if (Input.GetKeyDown(KeyCode.Escape)) {
		quit1 = (Texture)Resources.Load("quit");
		confirmbtn = (Texture2D)Resources.Load("confirmbtn");
		nobutton = (Texture2D)Resources.Load("nobutton");
		GUI.DrawTexture(new Rect(Screen.width/2, Screen.height/2, 400, 200), quit1, ScaleMode.StretchToFill, true, 10.0F);
		GUI.skin.button.normal.background = confirmbtn;
		GUI.skin.button.hover.background = confirmbtn;
		GUI.skin.button.active.background = confirmbtn;	
		if (GUI.Button(new Rect(Screen.width/2 - 50,Screen.height/2 + 200,200,100), "")) {
			Application.Quit();
		}
		GUI.skin.button.normal.background = nobutton;
		GUI.skin.button.hover.background = nobutton;
		GUI.skin.button.active.background = nobutton;
		if (GUI.Button(new Rect(Screen.width/2 + 50,Screen.height/2 + 200,200,100), "")) {
			paused = true;
		}
		StartCoroutine(waitforButton());
	}
IEnumerator waitforButton() {
	while (!paused) {
		yield return null;
	}

I have also tried doing a while statement. I did declare paused as false. Yes I know it is a bit backwards by standard of pausing, but any help would be appreciated.

It would appear that all I needed to do was call the GetKeyDown in the Update function and have it set a boolean to true and then wrap the code for the little menu in an if statement which would either quit the application or set the boolean back to false

if (paused == true) {
draw some things
if button clicked{
Application.Quit():
}
if button clicked{
paused = false;
}
}

void Update () {
if (Input.GetKeyDown(KeyCode.Escape)) {
paused = true;
}
}