Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Click For Cash Anti Spamming System?

I am trying To Make A Jailbreak Robbery System But I Need A Wait For The Script So People Cant Just Spam It. To Trigger It You Click A Brick And You Get Money Here is the script

wait (30)
script.Parent.ClickDetector.MouseClick:connect(function(player)
	local players = game.Players:FindFirstChild(player.Name)
			local clicks = players:FindFirstChild("leaderstats")["Money"]
				clicks.Value = clicks.Value + 150
				wait (5) 
end)

2 comments

0

you can use debounces

0

as in pauses in the script

1 answer

✓ Accepted answer
script.Parent.ClickDetector.MouseClick:connect(function(player)
    local players = game.Players:FindFirstChild(player.Name)
            local clicks = players:FindFirstChild("leaderstats")["Money"]
                clicks.Value = clicks.Value + 150
		click.MaxActivatoinDistance = 0
                wait (5) 
		click.MaxActivatoinDistance = 5
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.