local player = game.Players.LocalPlayer local mouse = player:GetMouse() local tool = script.Parent local server = tool:WaitForChild("ServerScript") local equipped = false local spraying = false tool.Equipped:Connect(function() equipped = true end) tool.Unequipped:Connect(function() equipped = false if spraying == true then spraying = false server.Stop:FireServer() end end) mouse.Button1Down:Connect(function() if equipped == true then spraying = true server.Start:FireServer() end end) mouse.Button1Up:Connect(function() if equipped == true then spraying = false server.Stop:FireServer() end end)