How to make script rapid fire ?

Hi guys.

i make a script raycast for my gun
but i dont know how to make rapid fire for my gun (MK16) ?

this is my script Raycast :

#pragma strict

var Effect : Transform;
var TheDammage = 100;
var ShotSound : AudioClip;

function Update () {
	
	var hit : RaycastHit;
	var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width*0.5, Screen.height*0.5, 0));
	
	if (Input.GetMouseButtonDown(0))
	{
	
		if (Physics.Raycast (ray, hit, 100))
		{
			var particleClone = Instantiate(Effect, hit.point, Quaternion.LookRotation(hit.normal));
			Destroy(particleClone.gameObject, 2);
			hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
		}
		audio.PlayOneShot(ShotSound);
//		animation.Play("FireShoot");
	}
//	
//	if (Input.GetKey(KeyCode.LeftShift)){
//	
//	animation.Play("Sprint");
//	
//	}
	
}

my script shot one fire only.

i need to rapid fire in my script

Change your line :

 if (Input.GetMouseButtonDown(0))

to:

 if (Input.GetMouseButton(0))

it’s very fast

i need var fast for shoot speed

and how add flash fire for gun

and GUI for ammo like this : 30/270