1 | if 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 | local admins = { player = true , azarth = true , blackknightxx = true } |
2 |
3 | game.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 ) |
9 | end ) |