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" );
}