Untitled
unknown
plain_text
6 months ago
619 B
7
Indexable
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local tool = script.Parent
local server = tool:WaitForChild("ServerScript")
local spraying = false
local equipped = false
tool.Equipped:Connect(function()
equipped = true
end)
tool.Unequipped:Connect(function()
equipped = false
if spraying then
server.Stop:FireServer()
end
end)
mouse.Button1Down:Connect(function()
if equipped then
spraying = true
server.Start:FireServer()
end
end)
mouse.Button1Up:Connect(function()
if equipped then
spraying = false
server.Stop:FireServer()
end
end)
Editor is loading...
Leave a Comment