Gun Shooting Problems

Hello! I don’t know if this question has been asked already. If it has, please excuse me. I have a gun in my project whose shooting animation is really slow. In the script for the gun, when the left mouse button is pressed, the gun shoots, plays the shoot animation and subtracts a bullet. Since the animation is slow, if one presses the left mouse button twice in quick succession, the gun fires twice, subtracts two bullets but only plays the animation ONCE. What could I do to solve this problem?
Here is the code:

public var Ammo : float;
public var Mag : float = 10;
public var Muzzle : Transform;
public var timeToReload : float = 1;
public var MaxAmmo : float = 20;

public var Reloading : boolean = false;

public var AmmoUI : UI.Text;

public var ShootSound : AudioClip;
public var ReloadSound : AudioClip;

function Start()
{
    AmmoUI = GameObject.Find("Ammo_UI").GetComponent(UI.Text);
}

function Update () 
{
    AmmoUI.text = Ammo + " / " + Mag;

    if(Ammo == 0 && Mag > 0 && Reloading == false)
    {
        if(Input.GetKeyDown(KeyCode.R))
        {
            Reload();
        }
    }

    if(Ammo > 0 && Reloading == false)
    {
        if(Input.GetMouseButtonDown(0))
        {
            Fire();
        }
    }
}

function Fire()
{
    var hit : RaycastHit;
    var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width * 0.5, Screen.height * 0.5, 0));
    GetComponent.<Animation>().Play("fire", PlayMode.StopAll);
    GetComponent.<AudioSource>().PlayOneShot(ShootSound, 1.0);
    Ammo--;

    if(Physics.Raycast(ray, hit, 100))
    {
        if(hit.collider.tag == "Ground")
        {
            Debug.Log("Hit Ground");
        }
    }
    

}

function Reload()
{
    Reloading = true;
    yield WaitForSeconds(timeToReload);
    GetComponent.<AudioSource>().PlayOneShot(ReloadSound, 1.0);
    GetComponent.<Animation>().Play("reload", PlayMode.StopAll);
    Mag--;
    Ammo = MaxAmmo;
    Reloading = false;
}

I don’t have confidence,but

 if(Ammo > 0 && Reloading == false)
     {
         if(Input.GetMouseButtonDown(0))
         {
             Fire();
         }
     }

to

     if(Ammo > 0 && Reloading == false)
         {
             if(Input.GetMouseButtonDown(0) && !GetComponent.<Animation>().IsPlaying("fire") )
             {
                 Fire();
             }
         }

may solve it.

you could make a Bolean and check if its true when you press the key, and set it to false once pressed,
and then make a function that sets the bolean to false and call that function at the end of the animation using the add event button in the Animation tab.
this will explain how you do that
https://docs.unity3d.com/Manual/animeditor-AnimationEvents.html