I have an allowance script but its so easily exploitable. It can just be spammed. I tried a debounce but that wont work. I dont really understand how to use tick.
heres what I got
local debounce = false
game.ReplicatedStorage.GiveAllowance.OnServerEvent:Connect(function(Player)
local id = 59790671
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId,id) then
if debounce == false then
debounce = true
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 269
wait(12)
debounce = false
end
end
end)