local runService = game:GetService("RunService") local tool = script.Parent local handle = tool.Handle local spraySound = handle.SpraySound local sprayParticle = handle.Nozzle.SprayParticle local shooting = false local shootTimer = 0 local player script.Parent.Equipped:Connect(function() local found = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent) if found ~= nil then player = found end end) script.Start.OnServerEvent:Connect(function(sender) if sender == player then shooting = true spraySound.TimePosition = 0 spraySound:Play() sprayParticle.Enabled = true shootTimer = 0 end end) script.Stop.OnServerEvent:Connect(function(sender) if sender == player then shooting = false spraySound.TimePosition = 2.6 sprayParticle.Enabled = false local nozzle = handle.Nozzle local newNozzle = nozzle:Clone() newNozzle.Parent = handle nozzle.Parent = workspace.Terrain nozzle.Position = Vector3.new(0, -10000, 0) sprayParticle = newNozzle.SprayParticle game:GetService("Debris"):AddItem(nozzle, 5) end end)