void Update() { timer += Time.deltaTime; ammotext.text = "Ammo:" + currentWeapon.Mag + "/" + ammototal; if (Input.GetButton("Fire1") && timer >= currentWeapon.FireRate && Time.timeScale != 0 && currentWeapon.Mag > 0) { Shoot(); controllerscript.Attack(); } if (timer >= currentWeapon.FireRate * effectsDisplayTime) { DisableEffects(); controllerscript.ResetAttack(); } if (Input.GetKey(KeyCode.R)) { reload(); } if (currentWeapon.Mag == 0) { reload(); } }