4zx16

Shutdown Command

Oct 21st, 2021 (edited)
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. local Command = {":shutdown", "!shutdown"}
  2.  
  3. game.Players.PlayerAdded:Connect(function(player)
  4.     player.Chatted:Connect(function(msg)
  5.  
  6.         for i, v in pairs(Command) do
  7.             if msg:sub(1, v:len()):lower() == v:lower() then
  8.                 wait(1)
  9.                 for i, ShutdownExperience in pairs(game.Players:GetPlayers()) do
  10.                     ShutdownExperience:Kick("[Experience Shutdown]: requested by ".. player.Name)
  11.                 end
  12.             end
  13.         end
  14.     end)
  15. end)
  16.  
  17.  
  18.  
  19. local Command = {":shutdown", "!shutdown"}
  20. local Admins = {}
  21.  
  22. game.Players.PlayerAdded:Connect(function(player)
  23.     player.Chatted:Connect(function(msg)
  24.  
  25.         for i, Allowed in pairs(Admins) do
  26.             if player.Name or player.UserId == Allowed then
  27.                 for i, v in pairs(Command) do
  28.                     if msg:sub(1, v:len()):lower() == v:lower() then
  29.                         wait(1)
  30.                         for i, Experience in pairs(game.Players:GetPlayers()) do
  31.                             Experience:Kick("[Experience Shutdown]: requested by ".. player.Name)
  32.                         end
  33.                     end
  34.                 end
  35.             end
  36.         end
  37.     end)
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment