Disable Mother and Children objects by gui

Dear Friends,

I have this script and would like turn it to be GUI button, I don't know how to define show into ToggleVisibility.

Anyone can help?

Thanks

var show : Transform;

function Update() {
    if (Input.GetKeyDown(KeyCode.Z)) {
        ToggleVisibility();
    }
}

function ToggleVisibility() {
    // toggles the visibility of this gameobject and all it's children
  show = gameObject.GetComponentsInChildren(Renderer);
    for (var r : Renderer in show) {
        r.enabled = !r.enabled;
    }
}

var show : Transform;

function OnGUI()
{
  if (GUI.Button (Rect (20,20, 30, 20), "toggle")
    ToggleVisiblilty();
}

function Update() {
    if (Input.GetKeyDown(KeyCode.Z)) {
        ToggleVisibility();
    }
}

function ToggleVisibility() {
    // toggles the visibility of this gameobject and all it's children
  var thisR = GetComponent(Renderer);
  thisR.enabled = !thisR.enabled;
  show = gameObject.GetComponentsInChildren(Renderer);
    for (var r : Renderer in show) {
        r.enabled = !r.enabled;
    }
}

using System.Reflection;

void OcultarXCosa(object objGO)
{
PropertyInfo Propiedad= objGO.GetType().GetProperty(“enabled”);
Propiedad.SetValue(objGO,false,null);
}

Si quieres ocultar a sus hijos (children), mandas a llamar a esta misma función por cada hijo que tenga