Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Broken gold admin command?

Asked by 9 years ago

So look, I made a gold command a few mins ago, but it doesn't work.

What is the problem?

Admins = {"groovydino", "Player1", "Player"}





game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
    for i,v in pairs(Admins) do
   if msg:sub(1,9) == ":InfGold " then
    for i,v in pairs(game.Players:GetPlayers()) do 
        if string.find(v.Name, string.sub(msg, 10)) ~= nil then
            local stats = v:FindFirstChild("leaderstats")
            if stats ~= nil then
                local gold = stats:FindFirstChild("Gold")
                if gold ~= nil then
                    gold.Value = 999999999
                end
            end






        end
        end
    end
end


end)
end)
0
I thought I answered this question? aquathorn321 858 — 9y

Answer this question