How can I make a gun automatic?

Here is my gun script,

var prefabBullet:Transform;
var shootForce:float;
var shots : int = 0;
var maxShots : int = 8;
var shootSound : AudioClip;
function Update()
{
    if(Input.GetButtonDown("Fire1") && shots < maxShots)
    {
        var instanceBullet = Instantiate(prefabBullet, transform.position, Quaternion.identity);
        instanceBullet.rigidbody.AddForce(transform.forward * shootForce);
        audio.PlayOneShot(shootSound);
        shots++;
    }
    else if (shots >= maxShots && Input.GetKeyDown(KeyCode.R))
    {
        shots = 0;
    }
}

How can i set this script so the gun is automatic

Replace this line:

if(Input.GetButtonDown("Fire1") && shots < maxShots)

with this line:

if(Input.GetButton("Fire1") && shots < maxShots)

change GetButtonDown to GetButton.

and also try the unity docs/google:
http://unity3d.com/support/documentation/ScriptReference/Input.GetButton.html