How do you get a GUI element to draw when something happens

I am trying to get a GUI element to draw when a hidden coin is found,

function Update ()
{
	if (GameMaster.HiddenCoinCollected == 1)
	{
		OnGUI();
	}
}
function OnGUI () 
{
	GUI.Box (new Rect (Screen.width*0.5-sizeX/2, offsetY, sizeX, sizeY), "Hidden Coin Found" );
}

but this script just makes it disappear.

You can’t call OnGUI() that is a special function that is called all the time. (More frequently than Update in fact.) Instead you can do this:

function OnGUI() {
  if (GameMaster.HiddenCoinCollected == 1)
    GUI.Box (new Rect (Screen.width*0.5-sizeX/2, offsetY, sizeX, sizeY), "Hidden Coin Found" );
}

That is a conditional GUI draw.