Camera Field of View problem!

I have no idea when it comes down to scrpting with the camera but Basically, I want the mainCamera’s Field of View to change from 60 to 30 whilst SCROLLING with the middle mouse button, scrolling forward changes FOV to 30, whilst scrolling downwards changes it back to default (60). Can anybody understand what I mean and code this for me considering I am having troubles and had to post this enquiry to you all. Somebody please answer.

Below is what I kind of want…

function Update () {

	if(Input.GetMouseButtonDown(3))	
		Camera.mainCamera.fieldOfView = SOMEHTING BLAH BLAH BLAH

}

I’m using a ternary here, can be replaced with an if statement.

    if (Input.GetAxis("Mouse ScrollWheel") < 0) // pulling towards you
        {
            Camera.main.fieldOfView = Camera.main.fieldOfView <= 30 ? 30 : Camera.main.fieldOfView - 1;
        }
        if (Input.GetAxis("Mouse ScrollWheel") > 0) // pushing away from you
        {
            Camera.main.fieldOfView = Camera.main.fieldOfView >= 60 ? 60 : Camera.main.fieldOfView + 1;
        }

Thanks but can you use Smooth to this? and make a variable that depicts whether how fast the Zoom is.

I can, but how about you do it or even try, that would make me feel great and like i didn’t waste my time writing a script for you.