How to bring up a gui with a a collision?

I have a ball that moves when i move my mouse and i want it so if i hit a cube then a gui comes up. One that I can customize. And when i get off the cube it goes away. Any assistence would help but if i got a script it would be awesome.

Everything you need to make this work is covered in the tutorials.
Look at 3D Platformer for scripts with GUI updating and collision detection.

If the ball is moved by physics, you can detect when it hits the cube by having an OnCollisionEnter function in the cube’s script. This can set a flag to state that the GUI should be drawn. You can have complimentary code in the OnCollisionExit function to switch the GUI off when the ball isn’t touching the cube anymore:-

var showGUI: boolean;

function OnCollisionEnter(coll: Collision) {
    showGUI = true;
}

function OnCollisionExit(coll: Collision) {
    showGUI = false;
}

function OnGUI() {
    if (showGUI) {
        // GUI display code.
    }
}