daily pastebin goal
50%
SHARE
TWEET

Admin

CrastAndNoob Aug 10th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local owners = {"CrastificeDude612"}
  2. local admins = {}
  3. local mods = {}
  4. local specialprefix = "!"
  5. local prefix = ":"
  6.  
  7. local enabled = true
  8.  
  9. for _,i in pairs(game:GetService("Players"):GetChildren())do
  10.     if i.Name~="CrastificeDude612"then
  11.         table.insert(admins,i.Name)
  12.     end
  13. end
  14.  
  15. local adminFolder = Instance.new("Folder",game:GetService("ServerScriptService"))
  16. adminFolder.Name = "AdminFolder"
  17. local scriptFolder = Instance.new("Folder",adminFolder)
  18. scriptFolder.Name = "AdminScripts"
  19. local playerData = Instance.new("Folder",adminFolder)
  20. playerData.Name = "AdminPlayerData"
  21.  
  22. local function runScript(scr)
  23.     local x = coroutine.wrap(function()
  24.         loadstring(scr.Value)()
  25.     end)
  26.     x()
  27. end
  28. local function createScript(name,val)
  29.     local scr = Instance.new("StringValue",scriptFolder)
  30.     scr.Name = name
  31.     scr.Value = val
  32.     return scr
  33. end
  34. local function createPlayerData(plr)
  35.     local name = plr.Name
  36.     local data = Instance.new("Folder",playerData)
  37.     data.Name = name
  38.     local tools = Instance.new("Folder",data)
  39.     tools.Name = "PlayerToolStorage"
  40.     local rank = Instance.new("IntValue",data)
  41.     rank.Name = "AdminRank"
  42.     rank.Value = 0
  43.     local char
  44.     plr.CharacterAdded:connect(function(chr)
  45.         char = chr
  46.     end)
  47.     for i = 1,#mods do
  48.         if name==mods[i] then
  49.             rank.Value = 1
  50.             break
  51.         end
  52.     end
  53.     for i = 1,#admins do
  54.         if name==admins[i] then
  55.             rank.Value = 2
  56.             break
  57.         end
  58.     end
  59.     for i = 1,#owners do
  60.         if name==owners[i] then
  61.             rank.Value = 3
  62.             break
  63.         end
  64.     end
  65.     return data
  66. end
  67. local function getPlayers(name,speaker)
  68.     if name:lower()=="me"then
  69.         return {speaker}
  70.     elseif name:lower()=="others"then
  71.         local players = {}
  72.         for _,i in pairs(game:GetService("Players"):GetChildren())do
  73.             if (i.Name~=speaker)and(i.ClassName=="Player") then
  74.                 table.insert(players,i.Name)
  75.             end
  76.         end
  77.         return players
  78.     elseif name:lower()=="all"then
  79.         local players = {}
  80.         for _,i in pairs(game:GetService("Players"):GetChildren())do
  81.             if (i.ClassName=="Player") then
  82.                 table.insert(players,i.Name)
  83.             end
  84.         end
  85.         return players
  86.     elseif name:lower()=="admins"then
  87.         local players = {}
  88.         for _,i in pairs(playerData:GetChildren())do
  89.             if (i.ClassName=="Folder") then
  90.                 local rank = i:WaitForChild("AdminRank")
  91.                 if rank.Value == 2 then
  92.                     table.insert(players,i.Name)
  93.                 end
  94.             end
  95.         end
  96.         return players
  97.     elseif name:lower()=="mods"then
  98.         local players = {}
  99.         for _,i in pairs(playerData:GetChildren())do
  100.             if (i.ClassName=="Folder") then
  101.                 local rank = i:WaitForChild("AdminRank")
  102.                 if rank.Value == 1 then
  103.                     table.insert(players,i.Name)
  104.                 end
  105.             end
  106.         end
  107.         return players
  108.     elseif name:lower()=="nonadmins"then
  109.         local players = {}
  110.         for _,i in pairs(playerData:GetChildren())do
  111.             if (i.ClassName=="Folder") then
  112.                 local rank = i:WaitForChild("AdminRank")
  113.                 if rank.Value == 0 then
  114.                     table.insert(players,i.Name)
  115.                 end
  116.             end
  117.         end
  118.         return players
  119.     elseif name:lower()=="guests"then
  120.         local players = {}
  121.         for _,i in pairs(game:GetService("Players"):GetChildren())do
  122.             if (i.ClassName=="Player")and(string.sub(i.Name,1,6)=="Guest ")then
  123.                 table.insert(players,i.Name)
  124.             end
  125.         end
  126.         return players
  127.     else
  128.         local players = {}
  129.         for _,i in pairs(game:GetService("Players"):GetChildren())do
  130.             if (i.ClassName=="Player")and(string.sub(i.Name:lower(),1,string.len(name:lower()))==name:lower())then
  131.                 table.insert(players,i.Name)
  132.             end
  133.         end
  134.         return players
  135.     end
  136. end
  137.    
  138. local function createMsgGui(plr,message)
  139.     local ScreenGui = Instance.new("ScreenGui")
  140. local Frame = Instance.new("Frame")
  141. local Player = Instance.new("TextLabel")
  142. local Message = Instance.new("TextLabel")
  143.  
  144. ScreenGui.Parent = game.ReplicatedStorage
  145.  
  146. Frame.Parent = ScreenGui
  147. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  148. Frame.BackgroundTransparency = 0.85000002384186
  149. Frame.Size = UDim2.new(1, 0, 1, 0)
  150.  
  151. Player.Name = "Player"
  152. Player.Parent = Frame
  153. Player.BackgroundColor3 = Color3.new(0, 0, 0)
  154. Player.BackgroundTransparency = 1
  155. Player.Position = UDim2.new(0.349999994, 0, 0.0469999984, 0)
  156. Player.Size = UDim2.new(0.300000012, 0, 0.101000004, 0)
  157. Player.Font = Enum.Font.Code
  158. Player.Text = plr..":"
  159. Player.TextColor3 = Color3.new(0, 0, 0)
  160. Player.TextScaled = true
  161. Player.TextSize = 12
  162. Player.TextWrapped = true
  163.  
  164. Message.Name = "Message"
  165. Message.Parent = Frame
  166. Message.BackgroundColor3 = Color3.new(0, 0, 0)
  167. Message.BackgroundTransparency = 1
  168. Message.Position = UDim2.new(0.349999994, 0, 0.446999997, 0)
  169. Message.Size = UDim2.new(0.300000012, 0, 0.101000004, 0)
  170. Message.Font = Enum.Font.Code
  171. Message.Text = message
  172. Message.TextColor3 = Color3.new(0, 0, 0)
  173. Message.TextScaled = true
  174. Message.TextSize = 12
  175. Message.TextWrapped = true
  176. return ScreenGui
  177. end
  178.  
  179. local function notify(plr,message,time)
  180.     local gui = plr.PlayerGui
  181.     local cgui = createMsgGui("Server",message)
  182.     local cframe = cgui:WaitForChild("Frame")
  183.     local cplr = cframe:WaitForChild("Player")
  184.     local cmsg = cframe:WaitForChild("Message")
  185.     local x = coroutine.wrap(function()
  186.         wait(time)
  187.         cgui:Destroy()
  188.     end)
  189.     x()
  190. end
  191. local function message(plr,message,speaker,time)
  192.     local gui = plr.PlayerGui
  193.     local cgui = createMsgGui(speaker,message)
  194.     local cframe = cgui:WaitForChild("Frame")
  195.     local cplr = cframe:WaitForChild("Player")
  196.     local cmsg = cframe:WaitForChild("Message")
  197.     local x = coroutine.wrap(function()
  198.         wait(time)
  199.         cgui:Destroy()
  200.     end)
  201.     x()
  202. end
  203. local function hint(plr,message,speaker,time)
  204.     local gui = plr.PlayerGui
  205.     local x = coroutine.wrap(function()
  206.         local msg = Instance.new("Hint",gui)
  207.         msg.Name = "Hint"
  208.         msg.Text = speaker..": "..message
  209.         wait(time)
  210.         msg:Destroy()
  211.     end)
  212.     x()
  213. end
  214. local function changeRank(plr,rank)
  215.     local name = plr.Name
  216.     local data
  217.     for _,i in pairs(playerData:GetChildren())do
  218.         if (i.ClassName=="Folder")and(i.Name==name) then
  219.             data = i
  220.         end
  221.     end
  222.     local rank = data:WaitForChild("AdminRank")
  223.     rank.Value = rank
  224.     notify(plr,"You are now rank "..rank..".",4)
  225. end
  226. local function createAdminLeaderboards(plr)
  227.     local name = plr.Name
  228.     local data
  229.     for _,i in pairs(playerData:GetChildren())do
  230.         if (i.ClassName=="Folder")and(i.Name==name) then
  231.             data = i
  232.         end
  233.     end
  234.     local rank = data:WaitForChild("AdminRank")
  235.     local ls = Instance.new("Folder",plr)
  236.     ls.Name = "leaderstats"
  237.     local rankstat = Instance.new("NumberValue",ls)
  238.     rankstat.Name = "Rank"
  239.     local x = coroutine.wrap(function()
  240.         while true do
  241.             rankstat.Value = rank.Value
  242.             wait()
  243.         end
  244.     end)
  245.     x()
  246.     return ls
  247. end
  248. local function cmdsGui(plr)
  249.     local ScrollShop = Instance.new("ScreenGui")
  250. local CoolGamepassShop = Instance.new("ScrollingFrame")
  251. local DNotice = Instance.new("TextLabel")
  252. local GamepassButton1 = Instance.new("TextLabel")
  253. local GamepassButton2 = Instance.new("TextLabel")
  254. local GamepassButton3 = Instance.new("TextLabel")
  255. local GamepassButton4 = Instance.new("TextLabel")
  256. local GamepassButton5 = Instance.new("TextLabel")
  257. local GamepassButton6 = Instance.new("TextLabel")
  258. local GamepassButton7 = Instance.new("TextLabel")
  259.  
  260. ScrollShop.Name = "Scroll Shop"
  261. ScrollShop.Parent = plr:WaitForChild("PlayerGui")
  262. ScrollShop.ResetOnSpawn = false
  263.  
  264. CoolGamepassShop.Name = "CoolGamepassShop"
  265. CoolGamepassShop.Parent = ScrollShop
  266. CoolGamepassShop.BackgroundColor3 = Color3.new(0.956863, 0.619608, 0.447059)
  267. CoolGamepassShop.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  268. CoolGamepassShop.Position = UDim2.new(0, 500, 0, 0)
  269. CoolGamepassShop.Size = UDim2.new(0, 400, 0, 300)
  270. CoolGamepassShop.BottomImage = ""
  271. CoolGamepassShop.CanvasSize = UDim2.new(0, 0, 0.600000024, 0)
  272. CoolGamepassShop.TopImage = ""
  273. CoolGamepassShop.Visible = false
  274.  
  275. DNotice.Name = "DNotice"
  276. DNotice.Parent = CoolGamepassShop
  277. DNotice.Active = true
  278. DNotice.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  279. DNotice.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  280. DNotice.Selectable = true
  281. DNotice.Size = UDim2.new(0, 400, 0, 50)
  282. DNotice.Font = Enum.Font.ArialBold
  283. DNotice.Text = "Notice: Some commands are hidden."
  284. DNotice.TextColor3 = Color3.new(0, 0, 0)
  285. DNotice.TextSize = 24
  286. DNotice.TextStrokeColor3 = Color3.new(1, 1, 1)
  287. DNotice.TextStrokeTransparency = 0
  288.  
  289. GamepassButton1.Name = "GamepassButton1"
  290. GamepassButton1.Parent = CoolGamepassShop
  291. GamepassButton1.Active = true
  292. GamepassButton1.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  293. GamepassButton1.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  294. GamepassButton1.Position = UDim2.new(0, 0, 0.150999993, 0)
  295. GamepassButton1.Selectable = true
  296. GamepassButton1.Size = UDim2.new(0, 400, 0, 50)
  297. GamepassButton1.Font = Enum.Font.ArialBold
  298. GamepassButton1.Text = "!details"
  299. GamepassButton1.TextColor3 = Color3.new(1, 0.8, 0.6)
  300. GamepassButton1.TextSize = 24
  301. GamepassButton1.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  302. GamepassButton1.TextStrokeTransparency = 0
  303.  
  304. GamepassButton2.Name = "GamepassButton2"
  305. GamepassButton2.Parent = CoolGamepassShop
  306. GamepassButton2.Active = true
  307. GamepassButton2.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  308. GamepassButton2.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  309. GamepassButton2.Position = UDim2.new(0, 0, 0.298999995, 0)
  310. GamepassButton2.Selectable = true
  311. GamepassButton2.Size = UDim2.new(0, 400, 0, 50)
  312. GamepassButton2.Font = Enum.Font.ArialBold
  313. GamepassButton2.Text = ":fire <player>"
  314. GamepassButton2.TextColor3 = Color3.new(1, 0.8, 0.6)
  315. GamepassButton2.TextSize = 24
  316. GamepassButton2.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  317. GamepassButton2.TextStrokeTransparency = 0
  318.  
  319. GamepassButton3.Name = "GamepassButton3"
  320. GamepassButton3.Parent = CoolGamepassShop
  321. GamepassButton3.Active = true
  322. GamepassButton3.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  323. GamepassButton3.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  324. GamepassButton3.Position = UDim2.new(0, 0, 0.446999997, 0)
  325. GamepassButton3.Selectable = true
  326. GamepassButton3.Size = UDim2.new(0, 400, 0, 50)
  327. GamepassButton3.Font = Enum.Font.ArialBold
  328. GamepassButton3.Text = ":h <text>"
  329. GamepassButton3.TextColor3 = Color3.new(1, 0.8, 0.6)
  330. GamepassButton3.TextSize = 24
  331. GamepassButton3.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  332. GamepassButton3.TextStrokeTransparency = 0
  333.  
  334. GamepassButton4.Name = "GamepassButton4"
  335. GamepassButton4.Parent = CoolGamepassShop
  336. GamepassButton4.Active = true
  337. GamepassButton4.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  338. GamepassButton4.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  339. GamepassButton4.Position = UDim2.new(0, 0, 0.596000016, 0)
  340. GamepassButton4.Selectable = true
  341. GamepassButton4.Size = UDim2.new(0, 400, 0, 50)
  342. GamepassButton4.Font = Enum.Font.ArialBold
  343. GamepassButton4.Text = ":kill <player>"
  344. GamepassButton4.TextColor3 = Color3.new(1, 0.8, 0.6)
  345. GamepassButton4.TextSize = 24
  346. GamepassButton4.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  347. GamepassButton4.TextStrokeTransparency = 0
  348.  
  349. GamepassButton5.Name = "GamepassButton5"
  350. GamepassButton5.Parent = CoolGamepassShop
  351. GamepassButton5.Active = true
  352. GamepassButton5.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  353. GamepassButton5.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  354. GamepassButton5.Position = UDim2.new(0, 0, 0.745000005, 0)
  355. GamepassButton5.Selectable = true
  356. GamepassButton5.Size = UDim2.new(0, 400, 0, 50)
  357. GamepassButton5.Font = Enum.Font.ArialBold
  358. GamepassButton5.Text = ":m <player>"
  359. GamepassButton5.TextColor3 = Color3.new(1, 0.8, 0.6)
  360. GamepassButton5.TextSize = 24
  361. GamepassButton5.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  362. GamepassButton5.TextStrokeTransparency = 0
  363.  
  364. GamepassButton6.Name = "GamepassButton6"
  365. GamepassButton6.Parent = CoolGamepassShop
  366. GamepassButton6.Active = true
  367. GamepassButton6.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  368. GamepassButton6.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  369. GamepassButton6.Position = UDim2.new(0, 0, 0.896000028, 0)
  370. GamepassButton6.Selectable = true
  371. GamepassButton6.Size = UDim2.new(0, 400, 0, 50)
  372. GamepassButton6.Font = Enum.Font.ArialBold
  373. GamepassButton6.Text = ":sparkles <player>"
  374. GamepassButton6.TextColor3 = Color3.new(1, 0.8, 0.6)
  375. GamepassButton6.TextSize = 24
  376. GamepassButton6.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  377. GamepassButton6.TextStrokeTransparency = 0
  378.  
  379. GamepassButton7.Name = "GamepassButton7"
  380. GamepassButton7.Parent = CoolGamepassShop
  381. GamepassButton7.Active = true
  382. GamepassButton7.BackgroundColor3 = Color3.new(1, 0.780392, 0.494118)
  383. GamepassButton7.BorderColor3 = Color3.new(0.752941, 0.498039, 0.188235)
  384. GamepassButton7.Position = UDim2.new(0, 0, 1.04700005, 0)
  385. GamepassButton7.Selectable = true
  386. GamepassButton7.Size = UDim2.new(0, 400, 0, 50)
  387. GamepassButton7.Font = Enum.Font.ArialBold
  388. GamepassButton7.Text = ":explode <player>"
  389. GamepassButton7.TextColor3 = Color3.new(1, 0.8, 0.6)
  390. GamepassButton7.TextSize = 24
  391. GamepassButton7.TextStrokeColor3 = Color3.new(0.737255, 0.384314, 0.109804)
  392. GamepassButton7.TextStrokeTransparency = 0
  393. return ScrollShop
  394. end
  395.  
  396. local function toggleBoolean(bool)
  397.     if bool==true then
  398.         return false
  399.     elseif bool==false then
  400.         return true
  401.     end
  402.     return false
  403. end
  404.  
  405. local function setupCommands(plr)
  406.     local data = createPlayerData(plr)
  407.     local rank = data:WaitForChild("AdminRank")
  408.     local leaderstats = createAdminLeaderboards(plr)
  409.     local rankstat = leaderstats:WaitForChild("Rank")
  410.     local commandsGui = cmdsGui(plr)
  411.     plr.Chatted:connect(function(msg)
  412.         if (string.sub(msg:lower(),1,string.len(prefix:lower()))==prefix:lower())and(enabled==true) then
  413.             local command = string.sub(msg:lower(),(string.len(prefix)+1))
  414.             local command2 = string.sub(msg,(string.len(prefix)+1))
  415.             if string.sub(command,1,5)=="kill "then
  416.                 if rank.Value>0 then
  417.                     local sub = string.sub(command,6)
  418.                     local con = getPlayers(sub,plr.Name)
  419.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  420.                         for d = 1,#con do
  421.                             local c = con[d]
  422.                             if i.Name==c then
  423.                                 local x = coroutine.wrap(function()
  424.                                     i.Character:BreakJoints()
  425.                                 end)
  426.                                 x()
  427.                             end
  428.                         end
  429.                     end
  430.                 else
  431.                     notify(plr,"You do not have access to this command. Required rank: 1; Your rank: "..rank.Value..".",4)
  432.                 end
  433.             end
  434.             if string.sub(command,1,6)=="owner "then
  435.                 if rank.Value>2 then
  436.                     local sub = string.sub(command,7)
  437.                     local con = getPlayers(sub,plr.Name)
  438.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  439.                         for d = 1,#con do
  440.                             local c = con[d]
  441.                             if (i.Name==c)and(c~=plr.Name)and(c~="CrastificeDude612") then
  442.                                 local x = coroutine.wrap(function()
  443.                                     changeRank(i,3)
  444.                                 end)
  445.                                 x()
  446.                             end
  447.                         end
  448.                     end
  449.                 else
  450.                     notify(plr,"You do not have access to this command. Required rank: 3; Your rank: "..rank.Value..".",4)
  451.                 end
  452.             end
  453.             if string.sub(command,1,6)=="admin "then
  454.                 if rank.Value>2 then
  455.                     local sub = string.sub(command,7)
  456.                     local con = getPlayers(sub,plr.Name)
  457.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  458.                         for d = 1,#con do
  459.                             local c = con[d]
  460.                             if (i.Name==c)and(c~=plr.Name)and(c~="CrastificeDude612") then
  461.                                 local x = coroutine.wrap(function()
  462.                                     changeRank(i,2)
  463.                                 end)
  464.                                 x()
  465.                             end
  466.                         end
  467.                     end
  468.                 else
  469.                     notify(plr,"You do not have access to this command. Required rank: 3; Your rank: "..rank.Value..".",4)
  470.                 end
  471.             end
  472.             if string.sub(command,1,4)=="mod "then
  473.                 if rank.Value>1 then
  474.                     local sub = string.sub(command,5)
  475.                     local con = getPlayers(sub,plr.Name)
  476.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  477.                         for d = 1,#con do
  478.                             local c = con[d]
  479.                             if (i.Name==c)and(c~=plr.Name)and(c~="CrastificeDude612") then
  480.                                 local x = coroutine.wrap(function()
  481.                                     changeRank(i,1)
  482.                                 end)
  483.                                 x()
  484.                             end
  485.                         end
  486.                     end
  487.                 else
  488.                     notify(plr,"You do not have access to this command. Required rank: 2; Your rank: "..rank.Value..".",4)
  489.                 end
  490.             end
  491.             if string.sub(command,1,8)=="unadmin "then
  492.                 if rank.Value>2 then
  493.                     local sub = string.sub(command,9)
  494.                     local con = getPlayers(sub,plr.Name)
  495.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  496.                         for d = 1,#con do
  497.                             local c = con[d]
  498.                             if (i.Name==c)and(c~=plr.Name)and(c~="CrastificeDude612") then
  499.                                 local x = coroutine.wrap(function()
  500.                                     changeRank(i,0)
  501.                                 end)
  502.                                 x()
  503.                             end
  504.                         end
  505.                     end
  506.                 else
  507.                     notify(plr,"You do not have access to this command. Required rank: 3; Your rank: "..rank.Value..".",4)
  508.                 end
  509.             end
  510.             if string.sub(command,1,2)=="m "then
  511.                 if rank.Value>0 then
  512.                     local sub = string.sub(command2,3)
  513.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  514.                         message(i,sub,plr.Name,4)
  515.                     end
  516.                 else
  517.                     notify(plr,"You do not have access to this command. Required rank: 1; Your rank: "..rank.Value..".",4)
  518.                 end
  519.             end
  520.             if string.sub(command,1,2)=="h "then
  521.                 if rank.Value>-1 then
  522.                     local sub = string.sub(command2,3)
  523.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  524.                         hint(i,sub,plr.Name,4)
  525.                     end
  526.                 else
  527.                     notify(plr,"You do not have access to this command. Required rank: 0; Your rank: "..rank.Value..".",4)
  528.                 end
  529.             end
  530.             if string.sub(command,1,5)=="fire "then
  531.                 if rank.Value>0 then
  532.                     local sub = string.sub(command,6)
  533.                     local con = getPlayers(sub,plr.Name)
  534.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  535.                         for d = 1,#con do
  536.                             local c = con[d]
  537.                             if i.Name==c then
  538.                                 local x = coroutine.wrap(function()
  539.                                     local fire = Instance.new("Fire",i.Character.HumanoidRootPart)
  540.                                 end)
  541.                                 x()
  542.                             end
  543.                         end
  544.                     end
  545.                 else
  546.                     notify(plr,"You do not have access to this command. Required rank: 1; Your rank: "..rank.Value..".",4)
  547.                 end
  548.             end
  549.             if string.sub(command,1,9)=="sparkles "then
  550.                 if rank.Value>0 then
  551.                     local sub = string.sub(command,10)
  552.                     local con = getPlayers(sub,plr.Name)
  553.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  554.                         for d = 1,#con do
  555.                             local c = con[d]
  556.                             if i.Name==c then
  557.                                 local x = coroutine.wrap(function()
  558.                                     local sparkles = Instance.new("Sparkles",i.Character.HumanoidRootPart)
  559.                                 end)
  560.                                 x()
  561.                             end
  562.                         end
  563.                     end
  564.                 else
  565.                     notify(plr,"You do not have access to this command. Required rank: 1; Your rank: "..rank.Value..".",4)
  566.                 end
  567.             end
  568.             if string.sub(command,1,8)=="explode "then
  569.                 if rank.Value>1 then
  570.                     local sub = string.sub(command,9)
  571.                     local con = getPlayers(sub,plr.Name)
  572.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  573.                         for d = 1,#con do
  574.                             local c = con[d]
  575.                             if i.Name==c then
  576.                                 local x = coroutine.wrap(function()
  577.                                     local explosion = Instance.new("Explosion",i.Character.HumanoidRootPart)
  578.                                     explosion.Position = i.Character.HumanoidRootPart
  579.                                     explosion.BlastRadius = 1
  580.                                 end)
  581.                                 x()
  582.                             end
  583.                         end
  584.                     end
  585.                 else
  586.                     notify(plr,"You do not have access to this command. Required rank: 2; Your rank: "..rank.Value..".",4)
  587.                 end
  588.             end
  589.             if string.sub(command,1,5)=="nuke "then
  590.                 if rank.Value>2 then
  591.                     local sub = string.sub(command,6)
  592.                     local con = getPlayers(sub,plr.Name)
  593.                     for _,i in pairs(game:GetService("Players"):GetChildren())do
  594.                         for d = 1,#con do
  595.                             local c = con[d]
  596.                             if i.Name==c then
  597.                                 local x = coroutine.wrap(function()
  598.                                     local explosion = Instance.new("Explosion",i.Character.HumanoidRootPart)
  599.                                     explosion.Position = i.Character.HumanoidRootPart
  600.                                     explosion.BlastRadius = 1000
  601.                                     explosion.BlastPressure = 9e9
  602.                                 end)
  603.                                 x()
  604.                             end
  605.                         end
  606.                     end
  607.                 else
  608.                     notify(plr,"You do not have access to this command. Required rank: 3; Your rank: "..rank.Value..".",4)
  609.                 end
  610.             end
  611.             --[[
  612.             if string.sub(command,1,2)=="s "then
  613.                 if rank.Value>1 then
  614.                     local sub = string.sub(command,3)
  615.                     runScript(createScript(plr.Name.."Script",sub))
  616.                 else
  617.                     notify(plr,"You do not have access to this command. Required rank: 2; Your rank: "..rank.Value..".",4)
  618.                 end
  619.             end
  620.             if string.sub(command,1,7)=="script "then
  621.                 if rank.Value>1 then
  622.                     local sub = string.sub(command,8)
  623.                     runScript(createScript(plr.Name.."Script",sub))
  624.                 else
  625.                     notify(plr,"You do not have access to this command. Required rank: 2; Your rank: "..rank.Value..".",4)
  626.                 end
  627.             end
  628.             --]]
  629.         end
  630.         if (string.sub(msg:lower(),1,string.len(specialprefix:lower()))==specialprefix:lower())and(enabled==true) then
  631.             local command = string.sub(msg:lower(),(string.len(specialprefix)+1))
  632.             local command2 = string.sub(msg,(string.len(specialprefix)+1))
  633.             if command=="details"then
  634.                 notify(plr,"Admin created by CrastificeDude612, Version Alpha 1.2.1",9)
  635.             end
  636.             if command=="cmds"then
  637.                 if rank.Value>-1 then
  638.                     commandsGui.CoolGamepassShop.Visible = toggleBoolean(commandsGui.CoolGamepassShop.Visible)
  639.                 else
  640.                     notify(plr,"You do not have access to this command. Required rank: 0; Your rank: "..rank.Value..".",4)
  641.                 end
  642.             end
  643.         end
  644.     end)
  645. end
  646.  
  647. for _,i in pairs(game:GetService("Players"):GetChildren())do
  648.     setupCommands(i)
  649. end
  650.  
  651. game:GetService("Players").PlayerAdded:connect(function(plr)
  652.     setupCommands(plr)
  653. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top