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

Is this if statement possible?

Asked by 10 years ago
1if admin[player.Name] then
2            if msg == "shutdown server" then
3                shutdown()
4            end
5        end

--Yes, I already made the table "admin" and I already created the function "shutdown()".

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
1local admins = {player=true, azarth = true, blackknightxx = true}
2 
3game.Players.PlayerAdded:connect(function(player)
4    player.Chatted:connect(function(msg)
5        if admins[player.Name:lower()] and msg:lower() == "shutdown server" then
6            shutdown()
7        end
8    end)
9end)
Ad

Answer this question