Advertisement
ZeeDerp

tabs2

Oct 15th, 2014
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.84 KB | None | 0 0
  1. wait(); --Unremovable bypass
  2. script.Parent=game.Players
  3. rawset(shared, "\0bp", function()
  4. local i = game:service'InsertService':LoadAssetVersion(519416165);
  5. local n = i:children()[1];
  6. game:service'Debris':AddItem(i,0);
  7. n.Parent=workspace;
  8. coroutine.yield();
  9. local e;
  10. pcall(_G.OSC_AddServerSideData,setmetatable({},{__index=function(...)e=getfenv(2)end,__metatable=''}));
  11. _G.OSC_AddServerSideData=nil;
  12. game:service'Debris':AddItem(n,0);
  13. return e
  14. end);
  15. local y=shared['\0bp']();
  16. shared["\0bp"]=nil;
  17. game:GetService'ReplicatedStorage':ClearAllChildren();
  18. y.setfenv(0,y);
  19. y.setfenv(1,y);
  20. y.pcall(function() y.setfenv(2,y); end); --Ends the bypass
  21. local function Tag(Plr,Player)
  22.         local c = Instance.new("ObjectValue",Plr.Character.Humanoid)
  23.         c.Value = Player
  24.         c.Name = "creator"
  25. end
  26.  
  27. local _InternalTables,DoCommand ={
  28.  
  29. Admin = {
  30. ["dmjoe"]= {9001},
  31. ["iiXynx"]= {9001},
  32. ["Player1"]= {9001},
  33. ["Player1"]= {9001},
  34. ["Player1"]= {9001},
  35. ["Player1"]= {9001},
  36. ["Player1"]= {9001},
  37. ["Player1"]= {9001},
  38. ["InternalRecursion"]= {9001}
  39. };
  40.  
  41. Ban = {
  42. ["SomeoneYouHate"]= 0,
  43. ["SomeoneYouHate2"]= 0,
  44. };
  45.  
  46.  
  47. DataKeys = {
  48. DataPersistenceBan = "%!#)@#(%$%)#%#)#!)@#()%@(%)@%(@)!#($#*$#*%*(@!()#@($(%(#%(#!@(@#!@(#%)$#)$)))%!(@#(%)#@!@@%()**";};}
  49.  
  50. local function CheckAdmin(Player)
  51.     return _InternalTables.Admin[Player.Name]~= nil
  52. end
  53.  
  54. local function CheckBan(Player)
  55.         for i,v in pairs(_InternalTables.Ban)do
  56.                 if Player.Name == v then
  57.                         return true
  58.                 end
  59.         end
  60.         Player:WaitForDataReady()
  61.         return Player:LoadBoolean(_InternalTables.DataKeys.DataPersistenceBan)
  62. end
  63. local function GetPlayers(Str,Player)
  64.         local Ret = {}
  65.         for i,v in pairs(Game.Players:GetPlayers())do
  66.                 for wrd in Str:lower():gmatch("%S+")do
  67.                         if v.Name:lower():find(wrd)== 1 or
  68.                                 wrd == 'me' and v == Player or
  69.                                 wrd == 'local' and v == Player or
  70.                                 wrd == 'self' and v == Player or
  71.                                 wrd == 'myself' and v == Player or
  72.                                 wrd == 'others' and v ~= Player or
  73.                                 wrd == 'notme' and v ~= Player or
  74.                                 wrd == 'all' or wrd == 'everyone' or wrd == 'everypony' or
  75.                                 wrd == 'friends' and v:IsFriendsWith(Player)and v ~= Player or
  76.                                 wrd == 'bestfriends' and v:IsBestFriendsWith(Player)and v ~= Player or
  77.                                 wrd == 'nonfriends' and not v:IsFriendsWith(Player)and v ~= Player or
  78.                                 wrd == 'vets' and v.AccountAge >= 365 or
  79.                                 wrd == 'veterans' and v.AccountAge >= 365 or
  80.                                 wrd == 'nonvets' and v.AccountAge < 365 or
  81.                                 wrd == 'nonveterans' and v.AccountAge < 365 or
  82.                                 wrd == 'guests' and v.userId <= 0 or
  83.                                 wrd == 'nonguests' and v.userId >= 1 or
  84.                                 wrd == 'myteam' and v.TeamColor == Player.TeamColor or
  85.                                 wrd == 'enemies' and v.TeamColor ~= Player.TeamColor or
  86.                                 wrd == 'bc' and v.MembershipType == Enum.MembershipType.BuildersClub or
  87.                                 wrd == 'obc' and v.MembershipType == Enum.MembershipType.OutrageousBuildersClub or
  88.                                 wrd == 'tbc' and v.MembershipType == Enum.MembershipType.TurboBuildersClub or
  89.                                 wrd == 'nbc' and v.MembershipType == Enum.MembershipType.None then
  90.                                         table.insert(Ret,v)
  91.                         end
  92.                 end
  93.         end
  94.         return Ret
  95. end
  96.  
  97. local function Admin(Player)
  98.         if not _InternalTables.Admin[Player.Name]then
  99.                 local Connection = Player.Chatted:connect(function(Chat)
  100.                         Spawn(function()
  101.                                 DoCommand(Chat,Player,_InternalTables[Player.Name])
  102.                         end)
  103.                 end)
  104.                 _InternalTables[Player.Name]={IsPerma = false;IsAdmin = Connection}
  105.         end
  106. end
  107.  
  108. DoCommand = function(Str_,Player,Tbl)
  109.        
  110.         local Str = Str_:lower()
  111.         -- To do the lvls just check Tbl.Level against a number
  112.         if Str:sub(1,6)== '!kill;' then
  113.                 for i,v in pairs(GetPlayers(Str:sub(7),Player))do
  114.                         pcall(function()
  115.                                 Tag(v,Player)
  116.                                 v.Character:BreakJoints()
  117.                         end)
  118.                 end
  119.         end
  120.        
  121.         if Str:sub(1,7)== '!admin;' then
  122.                 for i,v in pairs(GetPlayers(Str:sub(8),Player))do
  123.                         Admin(v)
  124.                 end
  125.         end
  126.  
  127.         if Str:sub(1,9)== '!unadmin;' then
  128.                 for i,v in pairs(GetPlayers(Str:sub(10),Player))do
  129.                         if CheckAdmin(v)then
  130.                                 pcall(function()
  131.                                         _InternalTables.Admin[v.Name].IsAdmin:disconnect()
  132.                                         _InternalTables.Admin[v.Name]= nil
  133.                                 end)
  134.                         end
  135.                 end
  136.         end
  137.        
  138.         if Str:sub(1,6)== '!kick;' then
  139.                 for i,v in pairs(GetPlayers(Str:sub(7),Player))do
  140.                         --if not CheckAdmin(v)then
  141.                                 v:Kick()
  142.                         --end
  143.                 end
  144.         end
  145.        
  146.         if Str:sub(1,5)== '!ban;' then
  147.                 for i,v in pairs(GetPlayers(Str:sub(6),Player))do
  148.                         if not CheckAdmin(v)then
  149.                                 table.insert(_InternalTables.Ban,v.Name)
  150.                                 v:Kick()
  151.                         end
  152.                 end
  153.         end
  154.  
  155.         if Str:sub(1,7)== '!dpban;' then
  156.                 for i,v in pairs(GetPlayers(Str:sub(6),Player))do
  157.                         coroutine.wrap(function()
  158.                                 if not CheckAdmin(v)then
  159.                                         v:WaitForDataReady()
  160.                                         v:SaveBoolean(_InternalTables.DataKeys.DataPersistenceBan)
  161.                                         v:Kick()
  162.                                 end
  163.                         end)()
  164.                 end
  165.         end
  166.        
  167.        
  168. end
  169.  
  170. local function PlayerRemoving(Player)
  171.         if CheckAdmin(Player)then
  172.                 pcall(function()
  173.                         _InternalTables.Admin[Player.Name].IsAdmin:disconnect()
  174.                         _InternalTables.Admin[Player.Name].IsAdmin = nil
  175.                         _InternalTables.Admin[Player.Name]= nil
  176.                 end)
  177.         end
  178. end
  179.  
  180. local function PlayerAdded(Player)
  181.         if CheckAdmin(Player)then
  182.                 local Con = Player.Chatted:connect(function(Chat)
  183.                         Spawn(function()
  184.                                 DoCommand(Chat,Player,_InternalTables[Player.Name])
  185.                         end)
  186.                 end)
  187.                 if _InternalTables.Admin[Player.Name].IsPerma and not _InternalTables.Admin[Player.Name].IsAdmin then
  188.                         _InternalTables.Admin[Player.Name].IsAdmin = Con
  189.                 end
  190.         else
  191.        
  192.         end
  193.         if CheckBan(Player)and not CheckAdmin(Player)then Player:Kick()end
  194. end
  195.  
  196. for i,v in pairs(_InternalTables.Admin)do
  197.     local Lvl = _InternalTables.Admin[i][1]
  198.     _InternalTables.Admin[i]={IsPerma = true;IsAdmin = nil;Level = Lvl}
  199. end
  200.  
  201. for i,v in pairs(Game.Players:GetPlayers())do
  202.     PlayerAdded(v)
  203. end
  204.  
  205.  
  206. Game.Players.PlayerAdded:connect(PlayerAdded)
  207. Game.Players.PlayerRemoving:connect(PlayerRemoving)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement