-- When the weapon is deactivated

function weaponTemplate:OnDeactivate()
	
end

function weaponTemplate:OnStartFiring()
end

function weaponTemplate:OnStopFiring()
	
	-- Is Server
	if not self.isClient then
		self.rewardTimer:Stop()
	end
end

function weaponTemplate:OnFire()
	
	

	if not self.isClient then
		self.gun.Barrel.Shoot:Play()
	end

		
	-- Is Client
	if self.isClient then
		local newProjectile = self.projectileModel:Clone()
		local randomPoint = weaponTemplate.getUnitSpherePoint()
		local newBullet = bullet.new(newProjectile, self.ownerPlayer, 50, self.gun.firePart.Position, self.gun.firePart.CFrame.LookVector + randomPoint * self.coneSpread, 500, "Physics", false)
		newBullet.Name = newProjectile.Name
		replicateProjectile_Re:FireServer(newBullet)
	end
		

			
	if not self.isClient then
		-- Ensure they don't run multiple timers

		if not self.rewardTimer:IsRunning() and self.rewardTimer.runningTicks == 0 then
			spawn(function() self.rewardTimer:Start() end) 
		end
	end
end