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
you can use debounces
as in pauses in the script