Samuel1234

Work at Pizza place GUI ROBLOX

May 31st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.57 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Drag = Instance.new("Frame")
  5. local CommandBar = Instance.new("TextBox")
  6. local Run = Instance.new("TextButton")
  7. local Text = Instance.new("TextLabel")
  8.  
  9. -- Properties
  10.  
  11. ScreenGui.Parent = game.StarterGui
  12.  
  13. Drag.Name = "Drag"
  14. Drag.Parent = ScreenGui
  15. Drag.Active = true
  16. Drag.BackgroundColor3 = Color3.new(1, 1, 1)
  17. Drag.BackgroundTransparency = 0.5
  18. Drag.BorderSizePixel = 0
  19. Drag.Draggable = true
  20. Drag.Position = UDim2.new(0.347222149, 0, 0.881401598, 0)
  21. Drag.Size = UDim2.new(0, 243, 0, 15)
  22.  
  23. CommandBar.Name = "CommandBar"
  24. CommandBar.Parent = Drag
  25. CommandBar.BackgroundColor3 = Color3.new(0, 0, 0)
  26. CommandBar.BackgroundTransparency = 0.5
  27. CommandBar.BorderSizePixel = 0
  28. CommandBar.Position = UDim2.new(0, 0, 1, 0)
  29. CommandBar.Size = UDim2.new(0, 203, 0, 29)
  30. CommandBar.Font = Enum.Font.SourceSans
  31. CommandBar.FontSize = Enum.FontSize.Size14
  32. CommandBar.Text = "Command Here"
  33. CommandBar.TextColor3 = Color3.new(1, 1, 1)
  34. CommandBar.TextSize = 14
  35.  
  36. Run.Name = "Run"
  37. Run.Parent = Drag
  38. Run.BackgroundColor3 = Color3.new(1, 0, 0)
  39. Run.BackgroundTransparency = 0.5
  40. Run.BorderSizePixel = 0
  41. Run.Position = UDim2.new(0.835390925, 0, 1, 0)
  42. Run.Size = UDim2.new(0, 40, 0, 29)
  43. Run.Font = Enum.Font.SourceSans
  44. Run.FontSize = Enum.FontSize.Size14
  45. Run.Text = "Run"
  46. Run.TextColor3 = Color3.new(1, 1, 1)
  47. Run.TextSize = 14
  48.  
  49. Text.Name = "Text"
  50. Text.Parent = Drag
  51. Text.BackgroundColor3 = Color3.new(1, 1, 1)
  52. Text.BackgroundTransparency = 1
  53. Text.Position = UDim2.new(0.485596687, 0, 0, 0)
  54. Text.Size = UDim2.new(0, 7, 0, 15)
  55. Text.Font = Enum.Font.SourceSans
  56. Text.FontSize = Enum.FontSize.Size14
  57. Text.Text = "Drag Here"
  58. Text.TextSize = 14
  59.  
  60. local Gui = ScreenGui
  61. Gui.Parent = game.CoreGui
  62.  
  63. local Banned = {}
  64. local Slock = false
  65. local destroy = workspace.GameService.DestroyIngredient
  66. local Players = game:GetService('Players')
  67. local LPlayer = Players.LocalPlayer
  68.  
  69. local Commands = {'ban Player',
  70. 'kick Player',
  71. 'destroyworkspace',
  72. 'cmds',
  73. 'cripple Player',
  74. 'disable Player',
  75. 'takeover',
  76. 'fuckpizza',
  77. 'kill Player',
  78. 'slock',
  79. 'unslock',
  80. 'viewbans',
  81. 'ruin',
  82. 'shutdown',
  83. 'btools',
  84. 'end',
  85. 'More To Be Added Soon!',
  86. }
  87.  
  88. function Kick(Player)
  89. destroy:FireServer(Player, false)
  90. print('Kicked ' .. Player.Name)
  91. end
  92.  
  93. function Ban(Player)
  94. table.insert(Banned, Player.Name)
  95. print('Banned ' .. Player.Name)
  96. Kick(Player)
  97. end
  98. Players.PlayerAdded:connect(function(plr)
  99. for i,v in pairs(Banned) do
  100. if v == plr.Name then
  101. Kick(plr)
  102. print('Banned Player ' .. plr.Name .. ' tried to join')
  103. end
  104. end
  105. if Slock then
  106. Kick(plr)
  107. print('Player ' .. plr.Name .. ' tried to join while slock was on')
  108. end
  109. end)
  110.  
  111. function Get(Arg)
  112. local Found = {}
  113. if Arg:lower() == 'all' then
  114. for i,v in pairs(Players:GetPlayers()) do
  115. table.insert(Found, v.Name)
  116. end
  117. elseif Arg:lower() == 'others' then
  118. for i,v in pairs(Players:GetPlayers()) do
  119. if v.Name ~= LPlayer.Name then
  120. table.insert(Found, v.Name)
  121. end
  122. end
  123. elseif Arg:lower() == 'random' then
  124. table.insert(Found,Players:GetPlayers()[math.random(#Players:GetPlayers())].Name)
  125. else
  126. for i,v in pairs(Players:GetPlayers()) do
  127. if v.Name:lower():sub(1, #Arg) == Arg:lower() then
  128. table.insert(Found, v.Name)
  129. end
  130. end
  131. end
  132. return Found
  133. end
  134.  
  135. local msg = Gui.Drag.CommandBar
  136.  
  137. Gui.Drag.Run.MouseButton1Down:connect(function()
  138. if msg.Text:lower():sub(1,5) == 'kick ' then
  139. for i,v in pairs(Get(msg.Text:lower():sub(6))) do
  140. Kick(Players:FindFirstChild(v))
  141. end
  142. elseif msg.Text:lower():sub(1,4) == 'ban ' then
  143. for i,v in pairs(Get(msg.Text:lower():sub(5))) do
  144. Ban(Players:FindFirstChild(v))
  145. end
  146. elseif msg.Text:lower() == 'destroyworkspace' then
  147. for i,v in pairs(workspace:GetDescendants()) do
  148. pcall(function()
  149. if v.Name ~= 'GameService' or v.Parent.Name ~= 'GameService' then
  150. destroy:FireServer(v,false)
  151. end
  152. end)
  153. end
  154. elseif msg.Text:lower() == 'cmds' then
  155. Gui.Drag.CommandBar.Text = 'Press f9 to view commands'
  156. print(table.concat(Commands, ' | '))
  157. elseif msg.Text:lower():sub(1,8) == 'cripple ' then
  158. for i,v in pairs(Get(msg.Text:lower():sub(9))) do
  159. destroy:FireServer(Players:FindFirstChild(v).Character.HumanoidRootPart,false)
  160. end
  161. elseif msg.Text:lower():sub(1,8) == 'disable ' then
  162. for i,v in pairs(Get(msg.Text:lower():sub(9))) do
  163. destroy:FireServer(Players:FindFirstChild(v).Character.Humanoid,false)
  164. end
  165. elseif msg.Text:lower() == 'takeover' then
  166. for i, v in pairs(Players:GetPlayers()) do
  167. if v.TeamColor == game.Teams.Manager.TeamColor and v.Name ~= LPlayer.Name then
  168. Kick(v)
  169. LPlayer.Character:MoveTo(workspace.ManagerChair.Seat.Position)
  170. else
  171. LPlayer.Character:MoveTo(workspace.ManagerChair.Seat.Position)
  172. end
  173. end
  174. elseif msg.Text:lower() == 'fuckpizza' then
  175. for i,v in pairs(workspace:GetDescendants()) do
  176. if v.Name == 'Dough' or v.Parent.Name == 'Ingredients' then
  177. destroy:FireServer(v,false)
  178. end
  179. end
  180. elseif msg.Text:lower():sub(1,5) == 'kill ' then
  181. for i,v in pairs(Get(msg.text:lower():sub(6))) do
  182. destroy:FireServer(Players:FindFirstChild(v).Character.Head,false)
  183. end
  184. Gui.Drag.CommandBar.Text = 'This can take a while'
  185. elseif msg.Text:lower() == 'slock' then
  186. if not Slock then
  187. Slock = true
  188. else
  189. Gui.Drag.CommandBar.Text = 'Server Is Already Locked'
  190. end
  191. elseif msg.Text:lower() == 'unslock' then
  192. if Slock then
  193. Slock = false
  194. else
  195. Gui.Drag.CommandBar.Text = 'Server Is Not Locked'
  196. end
  197. elseif msg.Text:lower() == 'shutdown' then
  198. for i,v in pairs(Players:GetPlayers()) do
  199. if v.Name ~= LPlayer.Name then
  200. Kick(v)
  201. end
  202. end
  203. Kick(LPlayer)
  204. elseif msg.Text:lower() == 'ruin' then
  205. for i,v in pairs(game:GetDescendants()) do
  206. if v.Parent.Name ~= 'Players' then
  207. pcall(function()
  208. destroy:FireServer(v,false)
  209. end)
  210. end
  211. end
  212. elseif msg.Text:lower() == 'viewbans' then
  213. print(table.concat(Banned, ' | '))
  214. Gui.Drag.CommandBar.Text = 'Press f9 to view bans'
  215. elseif msg.Text:lower() == 'btools' then
  216. for i,v in pairs(workspace:GetDescendants()) do
  217. pcall(function()
  218. v.Locked = false
  219. end)
  220. end
  221. local function OnClick()
  222. pcall(function()
  223. local target = LPlayer:GetMouse().Target
  224. destroy:FireServer(target,false)
  225. print('Destroyed ' .. target.Name)
  226. end)
  227. end
  228. local b = Instance.new('Tool', LPlayer.Backpack)
  229. b.RequiresHandle = false
  230. b.Activated:connect(OnClick)
  231. elseif msg.Text:lower() == 'end' then
  232. Gui:Destroy()
  233. if Slock then
  234. Slock = false
  235. end
  236. for i,v in pairs(Banned) do
  237. table.remove(Banned, i)
  238. end
  239. end
  240. end)
Add Comment
Please, Sign In to add comment