Sniper zoom when right click?

How can i make it so when i hold the right click on the mouse with my sniper it zooms in like 5x? any scripts or tutorials will help.

Also i need to know how to build the whole thing... i tired

function zoom () {

if (Input.GetKeyDown("z")) { Camera.main.fieldOfView = 10; } } . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .but i didn't work and i don't know the name for right click any way?

In a script, simply change the camera's field of view to a low angle, like this:

private var baseFOV : float;

function Start () {
    baseFOV = Camera.main.fieldOfView;
}

function Update () {
    if (Input.GetMouseButton(1))
        Camera.main.fieldOfView = 10;
    else 
        Camera.main.fieldOfView = baseFOV;
}