Mesh Renderer On and off switch

I just want to write a simple script that uses the mouse to turn on and off the mesh renderer…
basicly if you click on a game object it pulls up the name of that object based on a 3dtext. so I figured I would do it this way but kinda stuck. I know I need more in my fuction but not sure what is next.

using UnityEngine;
using System.Collections;

public class HideGUI : MonoBehaviour 
{
var objectHide = GameObject;
var renderEnable;bool = false;

			
void OnMouseDown () 
	{
	renderEnable = true;
      
	}
]

If you open it in Monodevelop, it will show you your syntax errors. You can make an object appear and disappear with an OnMouseDown(). Here is a simple script:

using UnityEngine;
using System.Collections;

public class OnOff2 : MonoBehaviour {
 
void OnMouseDown () {
    gameObject.renderer.enabled = !gameObject.renderer.enabled;
    }
}

This will make any object the script is attached to disappear when you click on it. You need to drag this script onto the object to make it work. If you want to make a more general script that evaluates game object by name or property without having this script attached, you will need to research Physics.Raycast(). There are a lot of posts concerning Raycasting including lot of code you can copy and play with.