Advertisement
Descaii

Admin test

Sep 10th, 2014
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.58 KB | None | 0 0
  1. --[[
  2.     ~ Name ~
  3.     | B-Admin
  4.  
  5.     ~ Date Started ~
  6.     | 8:55 PM 9/10/2014
  7.  
  8.     ~ By ~
  9.     | dogwarrior24
  10.  
  11.     ~ Idea ~
  12.     | When the button is pressed, it runs the command that the command had.
  13.     | On right click, it cancels and goes to the next command.
  14.     |
  15.     | Each command is displayed with the first letter, last letter, and the numerical order
  16.     | the command was in.
  17.     |
  18.     | Using this, it should be an interesting admin, and nobody should really understand how
  19.     | to use it.
  20. --]]
  21. Player = game.Players.LocalPlayer
  22. PlayerGui = Player:WaitForChild("PlayerGui")
  23. Screen = Instance.new("ScreenGui",PlayerGui)
  24. Button = Instance.new("TextButton",Screen)
  25. Button.Position = UDim2.new(1,-110,1,-110)
  26. Button.Size = UDim2.new(0,100,0,100)
  27. CTab = {}
  28. LastTab = {}
  29. function NewC(table,name,func)
  30.     table[name]=func
  31. end
  32. function DoTab(table)
  33.     local n = 0
  34.     Button:Destroy()
  35.     Button = Instance.new("TextButton",Screen)
  36.     Button.Position = UDim2.new(1,-110,1,-110)
  37.     Button.Size = UDim2.new(0,100,0,100)
  38.     local CL = BrickColor.random().Color
  39.     Button.BackgroundColor3 = CL
  40.     Button.TextScaled = true
  41.     Button.TextColor3 = Color3.new(1-CL.r,1-CL.g,1-CL.b)
  42.     local asd
  43.     asd = function()
  44.         local f = false
  45.         for i,v in pairs(table) do
  46.             n = n+1
  47.             local acc = false
  48.             local yes = false
  49.             local CL = BrickColor.random().Color
  50.             Button.BackgroundColor3 = CL
  51.             Button.TextColor3 = Color3.new(1-CL.r,1-CL.g,1-CL.b)
  52.             Button.Text = i:sub(1,1)..n..i:sub(#i)
  53.             Button.MouseButton1Click:connect(function()
  54.                 yes = true
  55.                 acc = true
  56.             end)
  57.             Button.MouseButton2Click:connect(function()
  58.                 acc = true
  59.             end)
  60.             repeat wait() until acc
  61.             if yes then
  62.                 f = true
  63.                 ypcall(function() v() end)
  64.                 break
  65.             end
  66.         end
  67.         if not f then
  68.             n = 0
  69.             asd()
  70.         end
  71.     end
  72.     asd()
  73. end
  74. Commands = {}
  75. NewC(Commands,"Kill",function()
  76.     local pl = {}
  77.     NewC(pl,"Back",function() DoTab(Commands) end)
  78.     for i,v in pairs(game.Players:GetPlayers()) do
  79.         NewC(pl,v.Name,function()
  80.             v.Character:breakJoints()
  81.             DoTab(Commands)
  82.         end)
  83.     end
  84.     DoTab(pl)
  85. end)
  86. NewC(Commands,"nil",function()
  87.     local pl = {}
  88.     NewC(pl,"Back",function() DoTab(Commands) end)
  89.     for i,v in pairs(game.Players:GetPlayers()) do
  90.         NewC(pl,v.Name,function()
  91.             v.Character = nil
  92.             DoTab(Commands)
  93.         end)
  94.     end
  95.     DoTab(pl)
  96. end)
  97. NewC(Commands,"Kick",function()
  98.     local pl = {}
  99.     NewC(pl,"Back",function() DoTab(Commands) end)
  100.     for i,v in pairs(game.Players:GetPlayers()) do
  101.         NewC(pl,v.Name,function()
  102.             v:Destroy()
  103.             DoTab(Commands)
  104.         end)
  105.     end
  106.     DoTab(pl)
  107. end)
  108. NewC(CTab,"B-Admin",function()
  109.     DoTab(Commands)
  110. end)
  111. DoTab(CTab)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement