Shooting automatic guns.

I have worked with my shooting scripts but I can't find any solution to shooting automatic. Only single shot. If anyone could help I would greatly appreciate it.

You can do something like this:

float _lastShot;
float _shotInterval = 0.2f;//fire every 0.2 seconds

void Update()
{
   if(Input.GetMouseButton(0))//if mouse left is down
   {
      if (Time.time - _lastShot >= _shotInterval)//fire every _shotInterval 
      {
         FireAShot();//Your function that will creata a bullet
         _lastShot = Time.time;
      }
   }
}