shooting more than 1 bullet

how do i go about shooting more than 1 bullet when i press the fire button, for example like call of duty.

this will tell your game when the left button is held down to keep fireing a bulletprefab. make sure the prefab has a rigidbody and make sure the gun your shooting from has a spawnpoint and it is named exactly "Spawnpoint".you can make a spawnpoint just by making a sphere and making sure the sphere is exactly where you want your bullet to appear. So it would probably be wise to put it in front and close to the barrel of the gun. Also make sure it is a child of the gun. To make it a child of the gun just drag the spawn point in the hierarchy onto the gun in the hierarchy. theres a couple of things that need to be done outside of the script for it to work. make sure your spawnpoint is unchecked mesh renderer and doesnt have a collider.

var bullet : Transform;
function Update()
{
if(Input.GetButton("Fire1"))
{
var bullet = Instantiate(bulletPrefab ,transform.Find("Spawnpoint").transform.position ,Quaternion.identity);
  bullet.gameObject.tag = "enemyProjectile";
  bullet.rigidbody.AddForce(transform.forward * 2000);
}
}

Hope this helps!