I need it to not give any more money past 500 a.k.a <500 is a no no:
local ting = 0
function onTouched(hit)
if ting == 0 then
ting = 1
check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if stats ~= nil then
local cash = user:findFirstChild("Int")
cash.Value = cash.Value +5
wait(0)
end
end
ting = 0
end
end
script.Parent.Touched:connect(onTouched)
|