on click remove

Okay, so Iv had a look at a couple of scripts but i really cant find what i want. It's quite a simple concept, you click a 3d box in the level and it disappears. I really need help with a script for this, iv already tried things like onmousedown scripts but i cant quite crack it. Can anybody please give me a snippet that would work. It would be better if it was basic, so it doesnt take you much time and i can customize it. All it needs to do is when the user clicks on a 3d object in the game, it gets deleted. Also please could you make it so that it would need to be attached to the object, rather than the camera.

Thanks in advance!

You can use something like this on the cube to do it:

function OnMouseDown()
{
    Destroy(gameObject);
}

The object you put the script on must have a collider (probably box collider in this case - though if you use a default unity cube, it'll have one by default)