Advertisement
ZeeDerp

Untitled

Jul 14th, 2015
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Odin Administative Script
  3.    
  4.     This script is not open source at all and using it under false jurisdiction may or may not result in
  5.     negative effects.
  6.    
  7.     Thanks
  8.     Pkamara
  9. ]]
  10.  
  11. --[[local _ENV = getfenv(1);
  12. _ENV.Backup = {
  13.     print = print;
  14.     error = error;
  15.     warn = warn;
  16. };]]--
  17.  
  18.  
  19. --[[
  20. local print = function(...)
  21.     local Strings = {...};
  22.     local Result = '';
  23.     for _, String in pairs(Strings) do
  24.         Result = Result..', '..String;
  25.     end;
  26.     print("[ODIN]: "..tostring(Result))
  27.    
  28. end;
  29. ]]
  30.  
  31. local print=function(str) return print("[Odin] "..tostring(str)) end;
  32. local error=function(str) return print("[Odin][Error] "..tostring(str)) end;
  33. local warn=function(str) return warn("[Odin][Warning] "..tostring(str)) end;
  34.  
  35. Core={
  36.     Administators={
  37.         {Name="ByteDino", Desc="Working on this adminstrative script since it's brith",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  38.         {Name="Nexure", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  39.         {Name="Pelanyo", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  40.         {Name="CoolDocterWho2", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  41.         {Name="LordRevorius", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  42.         {Name="XEL8o9", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  43.         {Name="Player1", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  44.     };
  45.     Fake={}; --// This is the stored table which holds fake _G and fake Shared.
  46.     Banned={};
  47.     ScriptSettings={};
  48.     Settings={
  49.         BetaKey=",";
  50.         ScriptOwner=getfenv()["onwer"] or game.Players.ByteDino;
  51.         Debug=false;
  52.     };
  53.     Commands={};
  54.     Data={
  55.         Website="http://mobius.t15.org/Roblox/";
  56.         DataStoreKey="6`S'B#uI`7S-[~s6h6lL17?p[MD`7r";
  57.         SecurityKey="eb71b5d61d5e88680fb3a5722417f091d79fba756f6b5f81134550670f54cbd7";
  58.     };
  59.     Services={
  60.         Http=game:GetService("HttpService");
  61.         Players=game:GetService("Players");
  62.         MarketplaceService=game:GetService("MarketplaceService");
  63.         Post=function(link,data) local Return=Core.Services.Http:PostAsync(tostring(link),data) return Return end;
  64.         Get=function(link,cache) local Return=Core.Services.Http:GetAsync(tostring(link),cache) return Return end;
  65.         JSONEncode=function(data) return Core.Services.Http:JSONEncode(data) end;
  66.         JSONDecode=function(data) return Core.Services.Http:JSONDecode(data) end;
  67.     };
  68.     CoreFunctions={
  69.         FindPlayer=function(Name,Len)
  70.             local Player=tostring(Name);
  71.             for i,v in pairs(game.Players:GetPlayers()) do
  72.                 local Names=string.sub(string.lower(v.Name),1,Len);
  73.                 local PCalled=string.lower(Name)
  74.                 --print(Name)
  75.                 --print(Pcalled)
  76.                 if Names == PCalled then
  77.                     return v
  78.                 end;
  79.             end;
  80.         end;
  81.         UpdateAdministrators=function() end;
  82.         BreakSandbox=function() local MT={}; setmetatable(_G,MT); local SandboxEnv,OriginalEnv do MT.__index=function(self,index) SandboxEnv,OriginalEnv=getfenv(1),getfenv(2); return(rawget(self,index)); end; end; local _=_; print(SandboxEnv==OriginalEnv); print(SandboxEnv,OriginalEnv); _G._game=OriginalEnv.game; local game=OriginalEnv.game; return game end;
  83.         UpdateGetBans=function() local Pass=Core.Services.JSONEncode({["AccessKey"]=Core.Data.SecurityKey;}) local Temp=Core.Services.Post(Core.Data.Website.."getbans.php",Pass) local Unpacked=Core.Services.JSONDecode(Temp) Core.Banned=Unpacked.users return Core.Banned end;
  84.       };
  85.     Packets={
  86.         Kick=function(plr)
  87.         local game=game
  88.         if game.PlaceId==20279777 then
  89.         game=Core.CoreFunctions.BreakSandbox()
  90.         end
  91.         game.Players[plr.Name]:Kick()
  92.     end;
  93.     Ban=function(plr)
  94.         local a=Core.Services.JSONEncode({["ID"]=plr.userId;["Username"]=plr.Name;["Reason"]="General Ban";["AccessKey"]="eb71b5d61d5e88680fb3a5722417f091d79fba756f6b5f81134550670f54cbd7";["Duration"]="2018-1-1"});
  95.         local Sent=Core.Services.Http:PostAsync('http://mobius.t15.org/Roblox/addban.php',a);
  96.         Core.Packets.Kick(plr)
  97.     end;
  98.     };
  99. };
  100. --local game=Core.CoreFunctions.BreakSandbox();
  101. --print(game)
  102.  
  103. --_G._game=nil;
  104.  
  105. --Core.Fake=setmetatable({},Core);
  106. --Core.__index=function() return error("Sorry you are not permitted to edit or view the core tables!"); end;
  107.  
  108. local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
  109.      
  110. local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
  111.      
  112. local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta  else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp        end
  113.  
  114. function clerp(a,b,t)
  115.     local qa = {QuaternionFromCFrame(a)}
  116.     local qb = {QuaternionFromCFrame(b)}
  117.     local ax, ay, az = a.x, a.y, a.z
  118.     local bx, by, bz = b.x, b.y, b.z
  119.     local _t = 1-t --// Don't edit...
  120.     return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  121. end
  122.  
  123. AddPart=function(Text,Colour,Player,Function)
  124. if Colour==nil then Colour='White' end
  125. if not Player or type(Player) ~= "userdata" then return end
  126. local Adorn=workspace:FindFirstChild(Player.Name) and workspace[Player.Name]:FindFirstChild("Torso") and workspace[Player.Name].Torso:IsA("Part") and workspace[Player.Name].Torso.CFrame + Vector3.new(0,6,0) or CFrame.new(0,10,0)
  127. local f=Instance.new('Part',script)
  128. f.CanCollide=false
  129. f.Anchored=true
  130. f.Name=Text
  131. f.FormFactor='Custom'
  132. if Colour == 'Random' then
  133.         f.BrickColor=BrickColor.Random()
  134.     else
  135.         f.BrickColor=BrickColor.new(Colour)
  136. end
  137. f.Size=Vector3.new(2,2,2)
  138. f.CFrame = CFrame.new(Adorn.p)
  139. local sel=Instance.new('SelectionBox',f)
  140. sel.Adornee=f
  141. sel.Transparency=.7
  142. sel.Color=f.BrickColor
  143. local spec=Instance.new('SpecialMesh',f)
  144. spec.MeshId='http://www.roblox.com/Asset/?id=9856898'
  145. spec.Scale=Vector3.new(-3,-3,-3)
  146. for i,v in pairs(Core.Administators) do
  147.     if v.Name==Player.Name then
  148.         table.insert(v.Tablets,f)
  149.     end
  150. end
  151. bbg=Instance.new('BillboardGui',f)
  152. bbg.Adornee=f
  153. bbg.StudsOffset=Vector3.new(0,3,0)
  154. bbg.Size=UDim2.new(3, 0, 2, 0)
  155. txt=Instance.new('TextLabel',bbg)
  156. txt.Text=Text
  157. txt.BackgroundTransparency=1
  158. txt.Size = UDim2.new(1, 0, 0.5, 0)
  159. txt.FontSize='Size14'
  160. txt.TextColor3=f.BrickColor.Color
  161. txt.TextStrokeTransparency=0
  162. spawn(function()
  163.     game:GetService'RunService'.Heartbeat:connect(function()
  164.         for i,v in pairs(Core.Administators) do
  165.             if v.Name==Player.Name then
  166.                 for a,b in pairs(v.Tablets) do
  167.                     if b==f then
  168.                         spec.Scale=Vector3.new(math.sin((tick()+i)*5)*3,math.sin((tick()+i)*5)*3,math.sin((tick()+i)*5)*3)
  169.                     end
  170.                 end
  171.             end
  172.         end
  173.     end)
  174. end)
  175. local c=Instance.new('ClickDetector',f)
  176.     c.MaxActivationDistance=math.huge
  177.     c.MouseHoverEnter:connect(function(plr)
  178.         if plr.Name == Player.Name then
  179.             f.Transparency=.7
  180.             sel.Transparency=0
  181.         end
  182.     end)
  183. c.MouseHoverLeave:connect(function(plr)
  184.         if plr.Name == Player.Name then
  185.             f.Transparency=0
  186.             sel.Transparency=.7
  187.         end
  188.     end)
  189. c.MouseClick:connect(function(plr)
  190.     if plr.Name == Player.Name then
  191.         if Function == nil then
  192.             f:Destroy()
  193.             for a,s in pairs(Core.Administators) do
  194.                 for i,v in pairs(s.Tablets) do --// It's not getting the 'Player'
  195.                     if v == f then -- Then you may of not supplied the Player Argument
  196.                         table.remove(s.Tablets,i)
  197.                     end
  198.                 end
  199.             end
  200.         else
  201.             local Run,Error=ypcall(function()
  202.                 Function()
  203.             end)
  204.             if Error then
  205.                 --AddPart(Error,'Really red',plr,nil)
  206.                 print(Error)
  207.             end
  208.         end
  209.     end
  210.     end)
  211. end;
  212.  
  213. Spawn(function()
  214.     local Num=1
  215.     plr=nil
  216.     game:GetService'RunService'.Heartbeat:connect(function()
  217.         Num=Num+0.0025
  218. for i,v in pairs(game.Players:GetPlayers()) do
  219. for a,s in pairs(Core.Administators) do
  220. if v.Name==s.Name then
  221. plr=v
  222. for i=1,#s.Tablets do
  223.     if plr.Character and plr.Name and plr.Character:FindFirstChild("Torso") then
  224.         if plr.Character.Parent==game.Workspace then
  225.                                 local Parts = s.Tablets
  226.                                 local Part = Parts[i]
  227.                                 Part.CFrame = clerp(Part.CFrame,CFrame.new(game.Workspace[s.Name].Torso.CFrame.p)
  228.                                 * CFrame.Angles(0, math.rad((360 / #Parts) * i) + Num, 0)
  229.                                 * CFrame.new(3 + #Parts, math.sin((tick() + i) * 5)/1.5, 0)
  230.                                 * CFrame.Angles(0, math.rad(90), 0)
  231.                                 * CFrame.Angles(math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2)
  232.                                 ,.1)
  233.                            else end
  234. end
  235. end                      
  236. end
  237. end
  238. end
  239. end)
  240. end)
  241.  
  242. function OnChatted(Msg,Player)
  243.     if not Msg or type(Msg) ~= "string" then return end
  244.     if not Player or type(Player) ~= "userdata" then return end
  245.     Msg = Msg:gsub( "^/e ","!")
  246.     local Check = (Msg:sub(1,1) == Core.Settings.BetaKey)
  247.     if Check then
  248.         Msg = Msg:sub(2)
  249.         local MFind = Msg:find(" ")
  250.         local substr,subaft
  251.         pcall(function()
  252.             substr = Msg:sub(1,MFind-1)
  253.             subaft = Msg:sub(MFind+1)
  254.         end)
  255.         if not substr then
  256.             substr = Msg
  257.         end
  258.         if not subaft then
  259.             subaft = ""
  260.         end
  261.         local UserProfile
  262.         for i,v in pairs(Core.Administators) do
  263.             if v.Name == Player.Name then
  264.                 UserProfile = v
  265.             end
  266.         end
  267.         for i,v in pairs(Core.Commands) do
  268.             table.foreach(v.Calls,function(self,index)
  269.                 if substr == index and UserProfile then
  270.                     if v.Context <= UserProfile.Context then
  271.                         local newthread = coroutine.create(v.Function)
  272.                         local Check,Error = coroutine.resume(newthread,subaft,Player)
  273.                         if not Check then
  274.                             print("[Error] "..tostring(Error))
  275.                         end
  276.                     else
  277.                         AddPart("Your rank is too low!","Really red",Player,nil);
  278.                     end
  279.                 end
  280.             end)
  281.         end
  282.     end
  283. end
  284.  
  285. function DestroyTablets(Player)
  286.     --if not Player then return end
  287.     if type(Player) == "userdata" then Player = Player.Name
  288.     elseif type(Player) ~= "userdata" then return end
  289.     pcall(function()
  290.         local b=nil
  291.         for i,v in pairs(Core.Administators) do
  292.             if v.Name == Player then
  293.                 b=v
  294.             end
  295.         end
  296.         for a,s in pairs(b.Tablets) do
  297.         s:Destroy();
  298.         b.Tablets={}
  299.         end
  300.     end)
  301. end
  302.  
  303. function NewCommand(Name,Desc,Context,Calls,Func)
  304.     Core.Commands[Name]={Name=Name,Desc=Desc,Context=Context,Calls=Calls,Function=Func}
  305.     if Core.Settings.Debug then
  306.         print("New command added; "..Name.."; "..Desc);
  307.         for a,s in pairs(Core.Administators) do
  308.         if game.Players:FindFirstChild(s.Name) then
  309.             AddPart("New command added; "..Name.."; "..Desc,nil,game.Players[s.Name],nil);
  310.         end
  311.     end
  312.     end;
  313. end;
  314.  
  315. NewCommand("No Character","Removes a players character",8,{'nil','nochar'},function(msg,speaker)
  316.     if not msg or msg == "" then return error("There was some data missing") end
  317.     local Len=string.len(msg)
  318.     print(tostring(msg))
  319.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  320.     pcall(function()
  321.         Player.Character=nil
  322.     end)
  323. end)
  324.  
  325. NewCommand("Ban List","Shows ban list",8,{'b'},function(msg,speaker)
  326.     pcall(function()
  327.     wait(Core.CoreFunctions.UpdateGetBans())
  328.     for i,v in pairs(Core.Banned) do
  329.         AddPart(v.Username.."; Reason : "..v.Reason,'Really red',speaker);
  330.         end
  331.     end)
  332. end)
  333.  
  334. NewCommand("Ping","Pings a tablet to speaker",1,{'ping'},function(msg,speaker)
  335.     pcall(function()
  336.         if string.sub(msg,1,3) == 'all' then
  337.             for i,v in pairs(game.Players:GetPlayers()) do
  338.                 local msg=msg:sub(4)
  339.                 AddPart(tostring(msg),'Random',v,nil);
  340.             end
  341.         else
  342.         AddPart(tostring(msg),'Random',speaker,nil);
  343.         end
  344.     end)
  345. end)
  346.  
  347. --[[NewCommand("New Server","Opens a new server at ID",8,{'newserver','ns','nsvr'},function(msg,speaker)
  348.     pcall(function()
  349.         local Http=Core.Services.Http;
  350.         local NSR=Http:GetAsync("http://mobius.t15.org/Roblox/openserver.php?gameID="..game.PlaceId,false)e     AddPart("New server opened! Info : "..tostring(NSR),'Random',speaker)
  351.     end)
  352. end)]]--
  353.  
  354. NewCommand("Music","Lists music which you can play",6,{'m','music','song'},function(msg,speaker)
  355.     pcall(function()
  356.         local Http=Core.Services.Http
  357.         local KeyWords = Http:UrlEncode(msg)
  358.         local Url = 'http://roproxy.tk/catalog/json?Keyword='..tostring(KeyWords)..'&Category=9&ResultsPerPage=11'
  359.         local Assets = Http:JSONDecode(Http:GetAsync(Url))
  360.         DestroyTablets(speaker)
  361.         local function List(plr)
  362.         DestroyTablets(speaker)
  363.         for i=1,#Assets do
  364.             AddPart(Assets[i].Name,'White',speaker,function()
  365.                 DestroyTablets(plr)
  366.                 AddPart('Name: '..Assets[i].Name,'White',speaker)
  367.                 AddPart('Id: '..Assets[i].AssetId,'White',speaker)
  368.                 AddPart('Publisher: '..Assets[i].Creator,'White',speaker)
  369.                 AddPart('Play song','Lime green',speaker,function()
  370.                     for i,v in pairs(script:GetChildren()) do
  371.                         if v.Name == "Sound" then
  372.                             v:Pause();
  373.                             v:Stop();
  374.                             v:Destroy();
  375.                         end
  376.                     end
  377.                     local sound=Instance.new('Sound',script);
  378.                     sound.SoundId='rbxassetid://'..Assets[i].AssetId;
  379.                     sound:play()
  380.                     AddPart('Stop song','Neon orange',speaker,function()
  381.                         sound:Pause();
  382.                         sound:Stop();
  383.                         sound:Destroy();
  384.                     end)
  385.                 end)
  386.                 AddPart('Dismiss','Really red',speaker,function()
  387.                     DestroyTablets(speaker)
  388.                 end)
  389.                 AddPart('Back','Really blue',speaker,function()
  390.                     List(plr)
  391.                 end)
  392.             end);
  393.         end;
  394.     end
  395.     List(speaker)
  396.     end)
  397. end)
  398.                
  399. NewCommand("Rank","Gives <player> <rank>",6,{'rank','rk'},function(msg,speaker)
  400.     pcall(function()
  401.         local Len=string.len(msg)
  402.         local Player=Core.CoreFunctions.FindPlayer(tostring(msg),Len)
  403.         local function rank(plr,rank)
  404.             local rank=rank;
  405.             local plr=plr;
  406.             for i,v in pairs(Core.Administators) do
  407.                 if v.Name==plr.Name then
  408.                     v.Context=tonumber(rank)
  409.                 end
  410.         end
  411.             DestroyTablets(speaker)
  412.             AddPart(plr.Name.." is now ranked "..rank,'White',speaker)
  413.         end
  414.         for i,v in pairs(Core.Administators) do
  415.             if Player.Name==v.Name then --//Update this function to make more efficient
  416.                 AddPart("1",'Random',speaker,function() rank(Player,1) end)
  417.                 AddPart("2",'Random',speaker,function() rank(Player,2) end)
  418.                 AddPart("3",'Random',speaker,function() rank(Player,3) end)
  419.                 AddPart("4",'Random',speaker,function() rank(Player,4) end)
  420.                 AddPart("5",'Random',speaker,function() rank(Player,5) end)
  421.                 AddPart("6",'Random',speaker,function() rank(Player,6) end)
  422.                 AddPart("7",'Random',speaker,function() rank(Player,7) end)
  423.                 AddPart("8",'Random',speaker,function() rank(Player,8) end)
  424.             end
  425.         end
  426.     end)
  427. end)
  428.  
  429. NewCommand("Dismiss","Dismisses tabs",1,{'dt'},function(msg,speaker)
  430.     if msg == "all" then
  431.         for i,v in pairs(game.Players:GetPlayers()) do
  432.             DestroyTablets(v)
  433.         end
  434.     else
  435.         DestroyTablets(speaker)
  436.     end
  437. end)
  438.  
  439. NewCommand("Commands","Shows commands list",1,{'cmds'},function(msg,speaker)
  440.     pcall(function()
  441.     DestroyTablets(speaker)
  442.     local function Delve(plr,cmd)
  443.         DestroyTablets(speaker)
  444.         for i,v in pairs(Core.Commands) do
  445.             if v.Name==cmd then
  446.                 AddPart("Name : "..v.Name,'Random',speaker)
  447.                 AddPart("Description : "..v.Desc,'Random',speaker)
  448.                 AddPart("Rank : "..v.Context,'Random',speaker)
  449.                 AddPart("Calls : "..table.concat(v.Calls, ', '),'Random',speaker)
  450.             end
  451.         end
  452.     end
  453.     for i,v in pairs(Core.Commands) do
  454.         AddPart(v.Name,'Random',speaker,function() Delve(plr,v.Name) end)
  455.     end
  456.     end)
  457. end)
  458.  
  459. NewCommand("Players","Shows list of all players",5,{'plrs','players'},function(msg,speaker)
  460.     pcall(function()
  461.     local function Dig(plr,plrs)
  462.         DestroyTablets(speaker)
  463.         for i,v in pairs(game.Players:GetPlayers()) do
  464.             if v.Name==plrs then
  465.             AddPart("Name : "..v.Name,'Toothpaste',speaker)
  466.             AddPart("Age : "..v.AccountAge,'Toothpaste',speaker)
  467.             for a,s in pairs(Core.Administators) do
  468.                 if s.Name == plrs then
  469.                     AddPart("Rank : "..tostring(s.Context),'Toothpaste',speaker)
  470.                     AddPart("Desc : "..s.Desc,'Toothpaste',speaker)
  471.             end
  472.             end
  473.             AddPart("Kick",'Really red',speaker,function() Core.Packets.Kick(game.Players[plrs]) AddPart(plrs.." was kicked.",'Random',speaker) end)
  474.             AddPart("Ban",'Bright yellow',speaker,function() Core.Packets.Ban(game.Players[plrs]) AddPart(plrs.." was banned.",'Random',speaker) end)
  475.             end
  476.         end
  477.     end;
  478.     for i,v in pairs(game.Players:GetPlayers()) do
  479.         AddPart(v.Name,'Random',speaker,function() Dig(plr,v.Name) end)
  480.     end
  481.     end)
  482. end)
  483.  
  484. NewCommand("Kick","Removes a player from game",8,{'kick','k'},function(msg,speaker)
  485.     if not msg or msg == "" then return print'asdf' end
  486.     local Len=string.len(msg)
  487.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  488.     pcall(function()
  489.         Core.Packets.Kick(Player)
  490.     end)
  491. end)
  492.  
  493. NewCommand("Ban","Bans a player",5,{'ban'},function(msg,speaker)
  494.     if not msg or msg == "" then return print'asdf' end
  495.     local Len=string.len(msg)
  496.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  497.     print(Player)
  498.     pcall(function()
  499.         Core.Packets.Ban(Player)
  500.     end)
  501. end)
  502.  
  503. NewCommand("Respawn","Respawns a player",3,{'rs','r','respawn'},function(msg,speaker)
  504.     if not msg or msg == "" then return print'asdf' end
  505.     local Len=string.len(msg)
  506.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  507.     pcall(function()
  508.         if msg == 'all' then
  509.             for i,v in pairs(game.Players:GetPlayers()) do
  510.                 v:LoadCharacter()
  511.             end
  512.         else
  513.             Player:LoadCharacter()
  514.         end
  515.     end)
  516. end)
  517.  
  518. NewCommand("Rejoin","Rejoins a player",8,{'rj'},function(msg,speaker)
  519.     if not msg or msg == "" then return print'asdf' end
  520.     local Len=string.len(msg)
  521.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  522.     pcall(function()
  523.         local MT={};
  524. setmetatable(_G,MT);
  525. local SandboxEnv,OriginalEnv do
  526.  MT.__index=function(self,index)
  527.   SandboxEnv,OriginalEnv=getfenv(1),getfenv(2);
  528.   return(rawget(self,index));
  529.  end;
  530. end;
  531.         OriginalEnv.Game:GetService("TeleportService"):Teleport(game.PlaceId,Player)
  532.     end)
  533. end)
  534.  
  535. NewCommand("Kill","Kills a player",2,{'kill','kl'},function(msg,speaker)
  536.     if not msg or msg == "" then return print'asdf' end
  537.     local Len=string.len(msg)
  538.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  539.     pcall(function()
  540.         Player.Character:breakJoints()
  541.     end)
  542. end)
  543.  
  544. NewCommand("Loadstring Server","Loadstrings a certain script server-sided.",8,{'exe'},function(msg,speaker)
  545.     local Executable,Error=loadstring(msg,'Odin_Loadstring');
  546.     if not Executable then
  547.         return AddPart(tostring(Error),'Really red',speaker,nil)
  548.     end;
  549.     local a={};
  550.     setmetatable(a,{__index=function() return AddPart("[Sandbox] Locked!",nil,speaker,nil) end,
  551.         __newindex=function() return AddPart("[Sandbox] Locked!",nil,speaker,nil) end,
  552.         __metatable="Locked",
  553.         Name="asd",
  554.         Destroy=nil})
  555.     local MT={};
  556. setmetatable(_G,MT);
  557. local SandboxEnv,OriginalEnv do
  558.  MT.__index=function(self,index)
  559.   SandboxEnv,OriginalEnv=getfenv(1),getfenv(2);
  560.   return(rawget(self,index));
  561.  end;
  562. end;
  563. local _=_;
  564.     local _ENV;_ENV=setmetatable({
  565.         Odin=Odin;
  566.         Core=nil;
  567.         game=game;
  568.         _G=Core.Fake;
  569.         shared=Core.Fake;
  570.         setmetatable=function() return AddPart("[Sandbox] setmetatable is locked",'Really red',speaker,nil) end;
  571.         unpack=unpack;
  572.         getfenv=function() return {} end;
  573.         setfenv=function() return setfenv(0,_ENV) end;
  574.         reboot=reboot;
  575.         require=require;
  576.         print=function(...)
  577.             local Data={...};
  578.             for CurrentEntry,Table_Pos in next,Data do
  579.                 if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
  580.                     Data[CurrentEntry]='__TOSTRING_EDIT';
  581.                 end;
  582.             end;
  583.             AddPart(table.concat(Data,' '),'White',speaker,nil);
  584.         end;
  585.         Speaker=speaker;
  586.         Message=msg;
  587.         R=OriginalEnv
  588.     },{
  589.         __newindex=function(Self,Key,Value)
  590.             rawset(getfenv(),Key,Value);
  591.         end;
  592.         __index=function(Self,Index)
  593.             return getfenv()[Index] or getfenv(0)[Index] or getfenv(2)[Index];
  594.         end;
  595.     });
  596.     setfenv(Executable,_ENV)
  597.     local Processed,Error=coroutine.resume(coroutine.create(function()setfenv(setfenv(setfenv(setfenv(setfenv(Executable,_ENV),_ENV),_ENV),_ENV),_ENV)();end));
  598.     if not Processed then
  599.         AddPart(tostring(Error),'Really red',speaker,nil)
  600.         return;
  601.     end;
  602. end)
  603.  
  604. local function Check_For_Ranked(plr)
  605.     if not plr then return end
  606.     if type(plr) == "userdata" then plr = plr.Name
  607.     else return end
  608.     for i,v in pairs(Core.Administators) do
  609.         if v.Name == plr then return true end
  610.     end
  611.     return false
  612. end
  613.  
  614. function Connection(Player)
  615.     print("[Information] A player has joined game. INFO : \n Name : "..Player.Name.."\n Age : "..Player.AccountAge)
  616.     for i,v in pairs(Core.Banned) do
  617.         if v.Username==Player.Name then
  618.             warn(Player.Name.." is banned for "..tostring(v.Reason).."and the duration of this ban is for "..tostring(v.Duration));
  619.             table.remove(v)
  620.             Core.Packets.Kick(Player);
  621.             for a,s in pairs(Core.Administators) do
  622.                 if game.Players:FindFirstChild(s.Name) then
  623.                 AddPart(Player.Name.." was kicked for a persisting ban!",'Really red',game.Players[s.Name]);
  624.                 end
  625.             end
  626.         end;
  627.     end;
  628.     --[[if Player.AccountAge < 100 then
  629.         Core.Packets.Kick(Player);
  630.         for a,s in pairs(Core.Administators) do
  631.                 if game.Players:FindFirstChild(s.Name) then
  632.                 AddPart(Player.Name.." was kicked for being too young!",'Really Red',game.Players[s.Name]);
  633.                 end
  634.             end
  635.     end]]--
  636.     if Check_For_Ranked(Player) ~= true then
  637.         table.insert(Core.Administators,{Name=Player.Name, Desc="Temp",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
  638.     end
  639.     for a,s in pairs(Core.Administators) do
  640.         if game.Players:FindFirstChild(s.Name) then
  641.         if s.Context > 5 then
  642.             AddPart(Player.Name.." has joined!",'Random',game.Players[s.Name]);
  643.             end
  644.         end
  645.     end
  646.     print(Player.Name.." has no previous record.")
  647. end;
  648.  
  649. game.Players.PlayerRemoving:connect(function(Player)
  650.     DestroyTablets(Player)
  651.     for i,v in pairs(Core.Administators) do
  652.         if v.Name == Player.Name then
  653.             table.remove(v)
  654.         end
  655.     end
  656.     for a,s in pairs(Core.Administators) do
  657.         if s.Name == Player.Name then return end
  658.         if s.Context > 5 then
  659.         if game.Players:FindFirstChild(s.Name) then
  660.             pcall(function() AddPart(Player.Name.." has left!",'Random',game.Players[s.Name]); end)
  661.             end
  662.         end
  663.     end
  664. end)
  665.    
  666.  
  667. for i,v in pairs(game.Players:GetPlayers()) do
  668.     if Check_For_Ranked(v) ~= true then
  669.         table.insert(Core.Administators,{Name=v.Name, Desc="Temp",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
  670.     end
  671.     AddPart("",'White',v);
  672.     AddPart("",'White',v);
  673.     AddPart("",'White',v);
  674.     v.Chatted:connect(function(msg)
  675.         OnChatted(msg,v)
  676.     end)
  677. end
  678.  
  679. game.Players.PlayerAdded:connect(function(Player)
  680.     wait(Core.CoreFunctions.UpdateGetBans())
  681.     Connection(Player)
  682.     Player.Chatted:connect(function(msg)
  683.     OnChatted(tostring(msg),Player)
  684.     end)
  685. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement