Advertisement
CoolDocterWho

Odin Administrative Tablets *Release*

Feb 6th, 2015
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.20 KB | None | 0 0
  1. --[[
  2. This is a highly snipped and is functions but without parts. You can add your own parts and take the rest. My site and some other data has been removed!
  3. ]]--
  4. --[[
  5.     Odin Administative Script
  6.    
  7.     This script is not open source at all and using it under false jurisdiction may or may not result in
  8.     negative effects.
  9.    
  10.     Thanks
  11.     Pkamara
  12. ]]--
  13.  
  14. --[[local _ENV = getfenv(1);
  15. _ENV.Backup = {
  16.     print = print;
  17.     error = error;
  18.     warn = warn;
  19. };]]--
  20.  
  21.  
  22. --[[
  23. local print = function(...)
  24.     local Strings = {...};
  25.     local Result = '';
  26.     for _, String in pairs(Strings) do
  27.         Result = Result..', '..String;
  28.     end;
  29.     print("[ODIN]: "..tostring(Result))
  30.    
  31. end;
  32. ]]--
  33. local print=function(str) return print("[Odin] "..tostring(str)) end;
  34. local error=function(str) return print("[Odin][Error] "..tostring(str)) end;
  35. local warn=function(str) return warn("[Odin][Warning] "..tostring(str)) end;
  36.  
  37. Core={
  38.     Administators={
  39.         {Name="Pkamara", Desc="Working on this adminstrative script since it's brith",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  40.         {Name="Nexure", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  41.         {Name="Pelanyo", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  42.         {Name="CoolDocterWho2", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  43.         {Name="LordRevorius", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  44.         {Name="XEL8o9", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  45.         {Name="Player1", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
  46.     };
  47.     Fake={}; --// This is the stored table which holds fake _G and fake Shared.
  48.     Banned={};
  49.     ScriptSettings={};
  50.     Settings={
  51.         BetaKey="!";
  52.         ScriptOwner=getfenv()["onwer"] or game.Players.Pkamara;
  53.         Debug=false;
  54.     };
  55.     Commands={};
  56.     Data={};
  57.     Services={
  58.     Http=game:GetService("HttpService");
  59.         Players=game:GetService("Players");
  60.         MarketplaceService=game:GetService("MarketplaceService");
  61.         Post=function(link,data) local Return=Core.Services.Http:PostAsync(tostring(link),data) return Return end;
  62.         Get=function(link,cache) local Return=Core.Services.Http:GetAsync(tostring(link),cache) return Return end;
  63.         JSONEncode=function(data) return Core.Services.Http:JSONEncode(data) end;
  64.         JSONDecode=function(data) return Core.Services.Http:JSONDecode(data) end;
  65.     };
  66.     CoreFunctions={
  67.         FindPlayer=function(Name,Len)
  68.             local Player=tostring(Name);
  69.             for i,v in pairs(game.Players:GetPlayers()) do
  70.                 local Names=string.sub(string.lower(v.Name),1,Len);
  71.                 local PCalled=string.lower(Name)
  72.                 --print(Name)
  73.                 --print(Pcalled)
  74.                 if Names == PCalled then
  75.                     return v
  76.                 end;
  77.             end;
  78.         end;
  79.         Packets={
  80.     };
  81. };
  82.  
  83. viable={
  84.     setfenv=setfenv;
  85.     unpack=unpack;
  86.     getfenv=function() return asd end;
  87.     game=game;
  88.     table=table;
  89.     error=function(...)
  90.         local Data={...};
  91.         for CurrentEntry,Table_Pos in next,Data do
  92.             if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
  93.                 Data[CurrentEntry]='__TOSTRING_EDIT';
  94.             end;
  95.         end;
  96.         AddPart(table.concat(Data,' '),'Really red',speaker,nil) ;
  97.     end;
  98.     print=function(...)
  99.         local Data={...};
  100.            
  101.         for CurrentEntry,Table_Pos in next,Data do
  102.             if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
  103.                 Data[CurrentEntry]='__TOSTRING_EDIT';
  104.             end;
  105.         end;
  106.         AddPart(table.concat(Data,' '),'White',speaker,nil);
  107.     end;
  108.     warn=function(...)
  109.         local Data={...};
  110.         for CurrentEntry,Table_Pos in next,Data do
  111.             if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
  112.                 Data[CurrentEntry]='__TOSTRING_EDIT';
  113.             end;
  114.         end;
  115.         AddPart(table.concat(Data,' '),'Bright orange',speaker,nil);
  116.     end;
  117. };
  118. viable.__newindex=function() return error'You are not permitted to edit this table'; end;
  119.  
  120. Core.Fake._G={};
  121. Core.Fake.Shared={};
  122. setmetatable(Core.Fake._G,{
  123.     __metatable="Locked!",
  124.     __newindex=function(t,k,v)
  125.         if type(v) == 'table' then
  126.             if getmetatable(v) ~= nil then return rawset(Core.Fake._G,k,v) end;
  127.             rawset(Core.Fake._G,k,v);
  128.             setmetatable(Core.Fake._G[k],{__metatable="Locked!"});
  129.             local Thread=coroutine.create(function(t,v) while wait() do if getmetatable(t) ~= v then return error("Script Ended!") end end end)
  130.             return coroutine.resume(Thread);
  131.         else
  132.             rawset(Core.Fake._G,k,v);
  133.         end
  134.     end;
  135. })
  136. --local game=Core.CoreFunctions.BreakSandbox();
  137. --print(game)
  138.  
  139. --_G._game=nil;
  140.  
  141. --Core.Fake=setmetatable({},Core);
  142. Core.__metatable=function() return error("Sorry you are not permitted to edit or view the core tables!"); end;
  143. Core.__newindex=function() return error("Lolno") end;
  144.  
  145. --//Snipped for protection!
  146.  
  147. AddPart=function(Text,Colour,Player,Function)
  148. --Snipped!
  149. end;
  150.  
  151. Spawn(function()
  152.     local Num=1
  153.     plr=nil
  154.     game:GetService'RunService'.Heartbeat:connect(function()
  155.         Num=Num+0.0025
  156. for i,v in pairs(game.Players:GetPlayers()) do
  157. for a,s in pairs(Core.Administators) do
  158. if v.Name==s.Name then
  159. plr=v
  160. for i=1,#s.Tablets do
  161.     if plr.Character and plr.Name and plr.Character:FindFirstChild("Torso") then
  162.         if plr.Character.Parent==game.Workspace then
  163.                                 local Parts = s.Tablets
  164.                                 local Part = Parts[i]
  165.                                 Part.CFrame = clerp(Part.CFrame,CFrame.new(game.Workspace[s.Name].Torso.CFrame.p)
  166.                                 * CFrame.Angles(0, math.rad((360 / #Parts) * i) + Num, 0)
  167.                                 * CFrame.new(3 + #Parts, math.sin((tick() + i) * 5)/1.5, 0)
  168.                                 * CFrame.Angles(0, math.rad(90), 0)
  169.                                 * CFrame.Angles(math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2)
  170.                                 ,.1)
  171.                            else end
  172. end
  173. end                      
  174. end
  175. end
  176. end
  177. end)
  178. end)
  179.  
  180. function OnChatted(Msg,Player)
  181.     --//Snipped!
  182. end
  183.  
  184. function DestroyTablets(Player)
  185.     --if not Player then return end
  186.     if type(Player) == "userdata" then Player = Player.Name
  187.     elseif type(Player) ~= "userdata" then return end
  188.     pcall(function()
  189.         local b=nil
  190.         for i,v in pairs(Core.Administators) do
  191.             if v.Name == Player then
  192.                 b=v
  193.             end
  194.         end
  195.         for a,s in pairs(b.Tablets) do
  196.         s:Destroy();
  197.         b.Tablets={}
  198.         end
  199.     end)
  200. end
  201.  
  202. function GetPlayerRank(Player)
  203.     local Name=Player.Name;
  204.     local Rank=nil
  205.     for i,v in pairs(Core.Administators) do
  206.         if v.Name == Player.Name then
  207.             Rank=v.Context;
  208.         end;
  209.     end;
  210.     return tonumber(Rank);
  211. end;
  212.  
  213. function NewCommand(Name,Desc,Context,Calls,Func)
  214.     Core.Commands[Name]={Name=Name,Desc=Desc,Context=Context,Calls=Calls,Function=Func}
  215.     if Core.Settings.Debug then
  216.         print("New command added; "..Name.."; "..Desc);
  217.     end;
  218. end;
  219.  
  220. NewCommand("No Character","Removes a players character",8,{'nil','nochar'},function(msg,speaker)
  221.     if not msg or msg == "" then return error("There was some data missing") end
  222.     local Len=string.len(msg)
  223.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  224.     pcall(function()
  225.         Player.Character=nil
  226.     end)
  227. end)
  228.  
  229. NewCommand("Translate","Translates a message",1,{'translate'},function(msg,speaker)
  230.     --//Snipped
  231. end)
  232.  
  233. NewCommand("Meaning","Uses WIKIPEDIA to find answers",1,{'find','means'},function(msg,speaker)
  234.     --//Snipped!
  235. end)
  236.  
  237. NewCommand("Ban List","Shows ban list",8,{'b'},function(msg,speaker)
  238.     pcall(function()
  239.     wait(Core.CoreFunctions.UpdateGetBans())
  240.     for i,v in pairs(Core.Banned) do
  241.         AddPart(v.Username.."; Reason : "..v.Reason,'Really red',speaker);
  242.         end
  243.     end)
  244. end)
  245.  
  246. NewCommand("Ping","Pings a tablet to speaker",1,{'ping'},function(msg,speaker)
  247.     if msg == "" then return end;
  248.     pcall(function()
  249.         if string.sub(msg,1,3) == 'all' then
  250.             if GetPlayerRank(speaker)>=6 then
  251.             for i,v in pairs(game.Players:GetPlayers()) do
  252.                 local msg=msg:sub(4)
  253.                 AddPart(tostring(msg),'Random',v,nil);
  254.             end
  255.             else
  256.                 AddPart("Your rank is too low!","Really red",speaker,nil);
  257.             end
  258.         else
  259.         AddPart(tostring(msg),'Random',speaker,nil);
  260.         end
  261.     end)
  262. end)
  263.  
  264. NewCommand("New Server","Opens a new server at ID",8,{'newserver','ns','nsvr'},function(msg,speaker)
  265.     --//Snipped
  266. end)
  267.  
  268. NewCommand("Music","Lists music which you can play",6,{'m','music','song'},function(msg,speaker)
  269.     --//Snipped
  270. end)
  271.                
  272. NewCommand("Rank","Gives <player> <rank>",6,{'rank','rk'},function(msg,speaker)
  273.     pcall(function()
  274.         local Len=string.len(msg)
  275.         local Player=Core.CoreFunctions.FindPlayer(tostring(msg),Len)
  276.         local function rank(plr,rank)
  277.             local rank=rank;
  278.             local plr=plr;
  279.             for i,v in pairs(Core.Administators) do
  280.                 if v.Name==plr.Name then
  281.                     v.Context=tonumber(rank)
  282.                 end
  283.         end
  284.             DestroyTablets(speaker)
  285.             AddPart(plr.Name.." is now ranked "..rank,'White',speaker)
  286.         end
  287.         for i,v in pairs(Core.Administators) do
  288.             if Player.Name==v.Name then --//Update this function to make more efficient
  289.                 AddPart("1",'Random',speaker,function() rank(Player,1) end)
  290.                 AddPart("2",'Random',speaker,function() rank(Player,2) end)
  291.                 AddPart("3",'Random',speaker,function() rank(Player,3) end)
  292.                 AddPart("4",'Random',speaker,function() rank(Player,4) end)
  293.                 AddPart("5",'Random',speaker,function() rank(Player,5) end)
  294.                 AddPart("6",'Random',speaker,function() rank(Player,6) end)
  295.                 AddPart("7",'Random',speaker,function() rank(Player,7) end)
  296.                 AddPart("8",'Random',speaker,function() rank(Player,8) end)
  297.             end
  298.         end
  299.     end)
  300. end)
  301.  
  302. NewCommand("Dismiss","Dismisses tabs",1,{'dt'},function(msg,speaker)
  303.     if msg == "all" then
  304.         for i,v in pairs(game.Players:GetPlayers()) do
  305.             DestroyTablets(v)
  306.         end
  307.     else
  308.         DestroyTablets(speaker)
  309.     end
  310. end)
  311.  
  312. NewCommand("Commands","Shows commands list",1,{'cmds'},function(msg,speaker)
  313.     pcall(function()
  314.     DestroyTablets(speaker)
  315.     local function Delve(plr,cmd)
  316.         DestroyTablets(speaker)
  317.         for i,v in pairs(Core.Commands) do
  318.             if v.Name==cmd then
  319.                 AddPart("Name : "..v.Name,'Random',speaker)
  320.                 AddPart("Description : "..v.Desc,'Random',speaker)
  321.                 AddPart("Rank : "..v.Context,'Random',speaker)
  322.                 AddPart("Calls : "..table.concat(v.Calls, ', '),'Random',speaker)
  323.             end
  324.         end
  325.     end
  326.     for i,v in pairs(Core.Commands) do
  327.         AddPart(v.Name,'Random',speaker,function() Delve(plr,v.Name) end)
  328.     end
  329.     end)
  330. end)
  331.  
  332. NewCommand("Players","Shows list of all players",5,{'plrs','players'},function(msg,speaker)
  333.     pcall(function()
  334.     local function Dig(plr,plrs)
  335.         DestroyTablets(speaker)
  336.         for i,v in pairs(game.Players:GetPlayers()) do
  337.             if v.Name==plrs then
  338.             AddPart("Name : "..v.Name,'Toothpaste',speaker)
  339.             AddPart("Age : "..v.AccountAge,'Toothpaste',speaker)
  340.             for a,s in pairs(Core.Administators) do
  341.                 if s.Name == plrs then
  342.                     AddPart("Rank : "..tostring(s.Context),'Toothpaste',speaker)
  343.                     AddPart("Desc : "..s.Desc,'Toothpaste',speaker)
  344.             end
  345.             end
  346.             AddPart("Kick",'Really red',speaker,function() Core.Packets.Kick(game.Players[plrs]) AddPart(plrs.." was kicked.",'Random',speaker) end)
  347.             AddPart("Ban",'Bright yellow',speaker,function() Core.Packets.Ban(game.Players[plrs]) AddPart(plrs.." was banned.",'Random',speaker) end)
  348.             end
  349.         end
  350.     end;
  351.     for i,v in pairs(game.Players:GetPlayers()) do
  352.         AddPart(v.Name,'Random',speaker,function() Dig(plr,v.Name) end)
  353.     end
  354.     end)
  355. end)
  356.  
  357. NewCommand("Kick","Removes a player from game",8,{'kick','k'},function(msg,speaker)
  358.     if not msg or msg == "" then return print'asdf' end
  359.     local Len=string.len(msg)
  360.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  361.     pcall(function()
  362.         Core.Packets.Kick(Player)
  363.     end)
  364. end)
  365.  
  366. NewCommand("Ban","Bans a player",5,{'ban'},function(msg,speaker)
  367.     if not msg or msg == "" then return print'asdf' end
  368.     local Len=string.len(msg)
  369.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  370.     print(Player)
  371.     pcall(function()
  372.         Core.Packets.Ban(Player)
  373.     end)
  374. end)
  375.  
  376. NewCommand("Respawn","Respawns a player",3,{'rs','r','respawn'},function(msg,speaker)
  377.     if not msg or msg == "" then return print'asdf' end
  378.     local Len=string.len(msg)
  379.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  380.     pcall(function()
  381.         if msg == 'all' then
  382.             for i,v in pairs(game.Players:GetPlayers()) do
  383.                 v:LoadCharacter()
  384.             end
  385.         else
  386.             Player:LoadCharacter()
  387.         end
  388.     end)
  389. end)
  390.  
  391. NewCommand("Rejoin","Rejoins a player",8,{'rj'},function(msg,speaker)
  392.     if not msg or msg == "" then return print'asdf' end
  393.     local Len=string.len(msg)
  394.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  395. end)
  396.  
  397. NewCommand("Kill","Kills a player",2,{'kill','kl'},function(msg,speaker)
  398.     if not msg or msg == "" then return print'asdf' end
  399.     local Len=string.len(msg)
  400.     local Player=Core.CoreFunctions.FindPlayer(msg,Len)
  401.     pcall(function()
  402.         Player.Character:breakJoints()
  403.     end)
  404. end)
  405.  
  406. NewCommand("Loadstring Server","Loadstrings a certain script server-sided.",8,{'exe'},function(msg,speaker)
  407. --//Snipped
  408. end)
  409.  
  410. NewCommand("Http Load","Http load script pls",1,{'h'},function(msg,speaker)
  411. --//SNipped
  412. end)
  413.  
  414. local function Check_For_Ranked(plr)
  415.     if not plr then return end
  416.     if type(plr) == "userdata" then plr = plr.Name
  417.     else return end
  418.     for i,v in pairs(Core.Administators) do
  419.         if v.Name == plr then return true end
  420.     end
  421.     return false
  422. end
  423.  
  424. function Connection(Player)
  425.     print("[Information] A player has joined game. INFO : \n Name : "..Player.Name.."\n Age : "..Player.AccountAge)
  426.     for i,v in pairs(Core.Banned) do
  427.         if v.Username==Player.Name then
  428.             warn(Player.Name.." is banned for "..tostring(v.Reason).."and the duration of this ban is for "..tostring(v.Duration));
  429.             table.remove(v)
  430.             Core.Packets.Kick(Player);
  431.             for a,s in pairs(Core.Administators) do
  432.                 if game.Players:FindFirstChild(s.Name) then
  433.                 AddPart(Player.Name.." was kicked for a persisting ban!",'Really red',game.Players[s.Name]);
  434.                 end
  435.             end
  436.         end;
  437.     end;
  438.     --[[if Player.AccountAge < 100 then
  439.         Core.Packets.Kick(Player);
  440.         for a,s in pairs(Core.Administators) do
  441.                 if game.Players:FindFirstChild(s.Name) then
  442.                 AddPart(Player.Name.." was kicked for being too young!",'Really Red',game.Players[s.Name]);
  443.                 end
  444.             end
  445.     end]]--
  446.     if Check_For_Ranked(Player) ~= true then
  447.         table.insert(Core.Administators,{Name=Player.Name, Desc="Temp",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
  448.     end
  449.     for a,s in pairs(Core.Administators) do
  450.         if game.Players:FindFirstChild(s.Name) then
  451.         if s.Context > 5 then
  452.             AddPart(Player.Name.." has joined!",'Random',game.Players[s.Name]);
  453.             end
  454.         end
  455.     end
  456.     print(Player.Name.." has no previous record.")
  457. end;
  458.  
  459. game.Players.PlayerRemoving:connect(function(Player)
  460.     DestroyTablets(Player)
  461.     for i,v in pairs(Core.Administators) do
  462.         if v.Name == Player.Name then
  463.             table.remove(v)
  464.         end
  465.     end
  466.     for a,s in pairs(Core.Administators) do
  467.         if s.Name == Player.Name then return end
  468.         if s.Context > 5 then
  469.         if game.Players:FindFirstChild(s.Name) then
  470.             pcall(function() AddPart(Player.Name.." has left!",'Random',game.Players[s.Name]); end)
  471.             end
  472.         end
  473.     end
  474. end)
  475.    
  476.  
  477. for i,v in pairs(game.Players:GetPlayers()) do
  478.     if Check_For_Ranked(v) ~= true then
  479.         table.insert(Core.Administators,{Name=v.Name, Desc="Temp",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
  480.     end
  481.     AddPart("_ENV owner : "..tostring(getfenv().owner),'White',v);
  482.     v.Chatted:connect(function(msg)
  483.         OnChatted(msg,v)
  484.     end)
  485. end
  486.  
  487. game.Players.PlayerAdded:connect(function(Player)
  488.     wait(Core.CoreFunctions.UpdateGetBans())
  489.     Connection(Player)
  490.     Player.Chatted:connect(function(msg)
  491.     OnChatted(tostring(msg),Player)
  492.     end)
  493. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement