make game object as button?

hey,how can i make that a game object in unity(in my case its a cube) will be used as a button,for example in a menu,so when i press on it(on the cube) it will do an action like going to another scene,or exiting the game(and how can i make theese functions-of going to a new scene and exit the game) also,how can i change the game resolution in the game?-so i have an options menu in my game,that the player can change the options so it will work good for his computer?

thanks in advance :D

http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html?from=RaycastHit

Here you go:

            var hit:RaycastHit;

Declare a RaycastHit variable named hit. Don't assign anything to this, it's unnecessary as the raycast will do that for you.

     var ray = Camera.main.ScreenPointToRay (Input.mousePosition);

Find the ray which goes through where the mouse is on the screen. This matters because the view rom a camera isn't flat, the top left of the screen points in a different direction to the bottom right.

     if (Physics.Raycast (ray,hit,100.0)) {

Fire the ray into the scene. If it hits something, the function will return true, and hit will be assigned to with the information about what was hit.

       print("I'm first cube!");

Basicly just like what Robertmathew said but simpler.

Click me please!

this is it bro
just make a script and paste this code on it

//function OnMouseDown()
//function OnMouseEnter()  u can use these three too
//function OnMouseExit()

the button

function OnMouseUp()
{
     //type here your code for example   Application.Quit(); and so on
	    Application.LoadLevel(1);
}

thats all