I have these 2 admin commands I made a few hours ago.
Let me show you the first one, which is a command list (BTW, the script is in the GUI that I am cloning):
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg == ":cmds" then
local clone = script.Parent:clone()
clone.Parent = plr.PlayerGui
end
end)
end)
And my second one is an infinite gold command:
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg == ":InfGold" and plr.Name == "groovydino" or plr.Name == "Player" or plr.Name == "dragonmaster4111" or plr.Name == "LimitedGoneWrong" then
local stats = plr:FindFirstChild("leaderstats")
if stats ~= nil then
local gold = stats:FindFirstChild("Gold")
if gold ~= nil then
gold.Value = 999999999
end
end
end
end)
end)
The problem is, if I say :cmds (referring to the first script) the command list GUI does pop up, but for some reason, I get infinite gold, too. And I didn't even say :InfGold! What is the problem here and how can I fix it?

1 comment
Don't use two PlayerAdded events, just combine them bot into one.