This is an emergency, I added a global leaderboard to my roblox game but people are downloading autoclicker, I need to find a way to delay the tool from being spammed, here's the script.
local sound = workspace.Sound
local tool = script.Parent
tool.Activated:Connect(function()
local character = tool.Parent
local players = game:GetService("Players")
local player = players:GetPlayerFromCharacter(character)
local leaderstats = player.leaderstats
local currency = leaderstats.GamerScore
local addition = 500
sound.Playing = true
currency.Value = currency.Value + addition
end)

1 comment
delay() or wait()