GUI Visibility On / Off

Well , it might seem a Noob question.
what I want is basically this,

There’s GUI Script attached to the main camera.
Now , i want to assign a Toggle Key to it.
say whenever the user presses M in the keyboard ,
the GUI script will execute / appear
and press M again to disappear.

any help for this non-programmer?

Just make a boolean (true/false) variable to use for changing whether or not the GUI is visible -->

using UnityEngine;
using System.Collections;

public class WhateverYouWantToNameIt : MonoBehaviour {

public bool showGUI = false; 

void Update(){
   if(Input.GetKeyDown(KeyCode.M)){ //if push "M" 
     showGUI = !showGUI; }
}

void OnGUI(){
    if(!showGUI){ //if gui is off, ignore it
       return; }

    GUI.Box(Rect(5,5,100,50),"GUI IS ON");
}
}