local UserInputService = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local holding = false UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.P then holding = true task.spawn(function() while holding do local args = { { Info = "Mine" } } ReplicatedStorage :WaitForChild("Remotes") :WaitForChild("GameHandler") :FireServer(unpack(args)) task.wait(0.1) -- adjust spam speed end end) end end) UserInputService.InputEnded:Connect(function(input, gameProcessed) if input.KeyCode == Enum.KeyCode.P then holding = false end end)