How to turn gui's on and off

I am making a ninja game and when you approach a sword I want a gui to turn on and say press V to equip, but i am having problem's with the script. I have set a variable for the gui and i set up the raycasthit... and thats about it. I thought about a gui_equip.renderer.enabled = true, but that didn't work. if you could show me how to do that it would be great!

Instead of using a raycast, you might consider using a spherical collider attached to the sword. Then just attach a script like this:

var playerObject;
playerObject = GameObject.FindWithTag("Player");
var isGUIActive : boolean = false;

function OnCollisionEnter(collisionInfo : Collision)
{
    if(collisionInfo.gameObject == playerObject)
    {
        isGUIActive = true;
    }
}

function OnCollisionExit (collisionInfo : Collision)
{
    if(collisionInfo.gameObject == playerObject)
    {
        isGUIActive = false;
    }
}

function OnGUI()
{
    if(isGUIActive)
    {
        GUI.Label(Rect (25, 25, 100, 30), "Press V to pick up sword.");
    }
}

Something like this should do the trick for you if your player controller has the "Player" tag attached to it. If you don't know how to set up tags, take a look here. I included an example GUI that is just a basic way to display your message. For more information on GUI scripting see this.