Help! My Script Is Broken! It Won't Do Anything To The Money. Can Someone Fix It? It Worked Without The (If PlayerHasPass (code) then) Part But I need that part. Thanks!
game.Players.PlayerAdded:connect(function(p)
local stats = Instance.new("IntValue", p)
stats.Name = "leaderstats"
local money = Instance.new("IntValue", stats)
money.Name = "Experience"
money.Value = 50000
while true do
wait(1)
money.Value = money.Value + 1
if PlayerHasPass (1446105009) then
wait (1)
money.Value = money.Value + 9
end
end
end)
Gamepass Code: 1446105009

1 comment
To shorten your title, you do NOT need to say "my roblox script broke on my game" because why else would you be here?