Deleting GUI Box

Hello everyone, i have a very simple question. How can i delete a gui box after pressing any of the buttons on it ?

here is my code :

static var guivar= 0;
var f : Font;
var f2 : Font;

function OnGUI () {
if(guivar==1)
{ 

	GUI.skin.font = f;
	GUI.Box (Rect (150,230,380,100), "FlightTime");
	
	
	GUI.skin.font = f2;
	
	if (GUI.Button (Rect (160,270,100,30), "5 Min")) 
	{
	Timer.seconds = 59;
	Timer.minutes= 04;

		
	}
	
	
	if (GUI.Button (Rect (285,270,100,30), "10 Min")) {
		Timer.seconds= 59;
	Timer.minutes = 09;
	
	}
	
	if (GUI.Button (Rect (417,270,100,30), "15 Min")) {
		Timer.seconds = 59;
	Timer.minutes = 14;
	
	 
	}
	

}

}

please help me :slight_smile:

Use a boolean + if statement. So something like

if (GUIdisplayed == true){

and then when mouse button is pressed

GUIdisplayed = false;

No problem. Do you need me to write the code out, or are you alright with it?