Change Position Of Object On Button Press?

How would I go about changing the position of my gun when I hold down the right mouse button?

Something like:

function OnMouseDown()
    transform.Translate (1,2,1);

if that script is attached to an object, and that object has a Collider of any sort on it, when you click on it, it will move.