Advertisement
SubScripts

Admin V4 - Void Script Builder

May 25th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. -- Admin script made by subsallaround.
  2.  
  3. admins = {"subsallaround"}
  4. table.insert(admins,owner.Name)
  5.  
  6. function isAdmin(plr)
  7.     for i,v in pairs(admins) do
  8.         if v.Name:lower() == plr.Name:lower() then
  9.             return true
  10.         else
  11.             return false
  12.         end
  13.     end
  14. end
  15.  
  16. player = owner
  17.  
  18. speaker = player
  19.  
  20. player.Chatted:Connect(function(text)
  21. print(owner.Name)
  22.  
  23. local function findPlayer(name)
  24.     name = string.lower(name)
  25.     if name == 'me' then
  26.         return owner
  27.     end
  28.    
  29.    
  30.     for i,v in pairs(game:GetService'Players':GetPlayers()) do
  31.         if v.Name:lower():find(name) == 1 then
  32.             return v
  33.         end
  34.     end
  35.     end
  36.  
  37.  
  38.     speak = player
  39. if isAdmin(owner) then
  40.     if string.sub(text,0,2):lower() == "m " then
  41.         local m = Instance.new("Message", workspace)
  42.         m.Text = "Message from "..speak.Name.." - "..string.sub(text,3)
  43.     end
  44.  
  45.     if string.sub(text,0,5):lower() == "/e m " then
  46.         local m = Instance.new("Message", workspace)
  47.         m.Text = "Message from "..speak.Name.." - "..string.sub(text,6)
  48.         wait(5)
  49.         m:Remove()
  50.     end
  51.  
  52.     if string.sub(text,0,6):lower() == "admin " then
  53.         local plr = findPlayer(string.sub(text,7))
  54.         table.insert(admins,plr.Name)
  55.         local h = Instance.new("Hint", workspace)
  56.         h.Text = plr.Name.." is now an admin"
  57.         wait(2)
  58.         h:Remove()
  59.     end
  60.  
  61.     if string.sub(text,0,8):lower() == "/e admin " then
  62.         local plr = findPlayer(string.sub(text,9))
  63.         table.insert(admins,plr.Name)
  64.         local h = Instance.new("Hint", workspace)
  65.         h.Text = plr.Name.." is now an admin"
  66.         wait(2)
  67.         h:Remove()
  68.     end
  69. end
  70. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement