Can anyone tell me how can i make this shooting script auto?

Go check the docs and review the difference between Input.GetKeyDown() and Input.GetKey() (line 20 above).

Then use this info to set the desired cyclic rate of fire by using a cooldown timer:

Cooldown timers, gun bullet intervals, shot spacing, rate of fire:

GunHeat (gunheat) spawning shooting rate of fire: