Advertisement
Derek1017

Unbanned Friends - Swagmin

Apr 24th, 2015
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 34.51 KB | None | 0 0
  1. -- // Swagmin Version : 4, Made by Derek1017. \\ --
  2. -- // Please do not re-disitrubte and/or distribute. \\ --
  3.  
  4. local DS=game:GetService("DataStoreService")
  5. local Http=game:GetService('HttpService')
  6. local Players=game:GetService('Players')
  7. local NilLogStorage=DS:GetDataStore('TestSwagminNilLogs')
  8. local Syncing = true
  9.  
  10. local Swagmin_V4 = {
  11.     Game_ID = game.PlaceId,
  12.     Game_Version = game.PlaceVersion,
  13.     Game_CreaterID = game.CreatorId,
  14.     Game_VIP = game.VIPServerId,
  15.     Game_JobID = game.JobId,
  16.     Game_Name = game.Name,
  17.     _Prefix = ';',
  18.     _GroupId = string.reverse(7949911),
  19.     _Version = 4.0*1;
  20.     _Logo = '', -- Not done
  21.     _Rot1 = math.rad(0)*math.pi;
  22.     _Rot2 = math.rad(0.001)*math.pi;
  23.     _Gamepass1 = 0;
  24.     _Gamepass2 = 0;
  25.     _Name = 'Swagmin_V4';
  26.     _Nils_Name_DATA = '';
  27.     _Pri_People_DATA = '';
  28.     _Commands={};
  29.     _Tablets={};
  30.     _Chatlogs={};
  31.     _Errorlogs={};
  32.     _Scriptlogs={};
  33.     _Sync = {
  34.         _Enabled = false;
  35.     };
  36.     _BannedUserID={
  37.         55657698,
  38.         14449714,
  39.         21130120,
  40.         47075124,
  41.         13447302,
  42.         meunumbertwo,
  43.         19865983,
  44.         41251461,
  45.         13342214,
  46.         15396375,
  47.         294568,
  48.         44831585,
  49.         81051174,
  50.         72037955,
  51.         47947097,
  52.         83225035,
  53.         34107212,
  54.         73912745,
  55.         50960007,
  56.         56705721,
  57.         19519369,
  58.         54458960,
  59.         46178543,
  60.         34107212,  
  61.         59546820,
  62.         72879372,
  63.         48041653,
  64.         68475978,
  65.         22963784,
  66.         37684979,
  67.         43339499,
  68.         21946941,
  69.         35464197,
  70.         69466897,
  71.         24239820,
  72.         60788651,
  73.         47075124,
  74.         58286477,
  75.         54451701,
  76.         56823347,
  77.         42253966,
  78.         27291963,
  79.         5615419,
  80.         73426247,
  81.         55285263,
  82.         5719877,
  83.         74314225,
  84.         52302680,
  85.         28438833,
  86.         47220899,
  87.         16653768,
  88.         5719877,
  89.         24039216,
  90.         20279777,
  91.         12452,
  92.         32608778,
  93.         53538487,
  94.         15949610,
  95.         54955971
  96.     };
  97.     _PrivateServer = {
  98.         _Enabled = false;
  99.         _Players = {
  100.             'Derek1017',
  101.             '',
  102.         };
  103.     };
  104.     _ClientNils = {
  105.        
  106.     };
  107.     _Chats={
  108.         {Plr='Derek1017',Chat='asd'};
  109.     };
  110.     _CommandChats={
  111.        
  112.     };
  113.     _Ranks={
  114.         {Name="Derek1017",Rank=7,Antilocal=false,Chat=true,Spin=true,SpinRot=true,Color='Really red',Tab='Tablet',MeshID=1285237,MeshSCALEX=2,MeshSCALEY=2,MeshSCALEZ=2},
  115. {Name="CLarramore",Rank=7,Antilocal=false,Chat=true,Spin=true,SpinRot=true,Color='Really red',Tab='Tablet',MeshID=1285237,MeshSCALEX=2,MeshSCALEY=2,MeshSCALEZ=2}
  116.     };
  117.     _Age={
  118.         Age=50,
  119.         Enabled=true
  120.     };
  121.     _Services={
  122.         game:GetService("Workspace"),
  123.         game:GetService("Players"),
  124.         game:GetService("Lighting"),
  125.         game:GetService("ServerScriptService"),
  126.         game:GetService("NetworkServer"),
  127.     };
  128.     _Alphabet = {
  129.         "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"
  130.     };
  131. } -- Table end.
  132.  
  133. Output=function(time,Player,Text,Color,Func)
  134.     delay(wait(),function() spawn(function() pcall(function()
  135.     local Debouncing=false
  136.     if time==nil then time=0 end
  137.     if Text==nil then Text='Text error' end
  138.     if Color==nil then Color='BrickColor = BrickColor.Random()' end
  139.     if Func==nil then Func=function() end end
  140.     local Part=Instance.new('Part',workspace)
  141.     Part.BrickColor = BrickColor.Random()
  142.     pcall(function()
  143.         Part.CFrame=Player.Character.Torso.CFrame*CFrame.Angles(math.rad(10),3,3)
  144.         end)
  145.        
  146.     Part.Material='Plastic'
  147.     Part.Transparency=0.3
  148.     Part.Name='User : '..Player.userId
  149.     Part.Anchored=true
  150.     Part.CanCollide=false
  151.     Part.Locked=true
  152.     Part.FormFactor='Custom'
  153.     Part.BottomSurface='Smooth'
  154.     Part.TopSurface='Smooth'
  155.     local Click=Instance.new('ClickDetector',Part)
  156.     Click.MaxActivationDistance=math.huge
  157.     local BodyGyro=Instance.new('BodyGyro',Part)
  158.     local Box=Instance.new('SelectionBox',Part)
  159.     Box.Color=Part.BrickColor
  160.     Box.Adornee=Part
  161.     Box.Transparency=0.3
  162.     local BG=Instance.new('BillboardGui',Part)
  163.     BG.ExtentsOffset=Vector3.new(0,2,0)
  164.     BG.Size=UDim2.new(0,200,0,200)
  165.     local TextLabel=Instance.new('TextLabel',BG)
  166.     TextLabel.BackgroundTransparency=1
  167.     TextLabel.BorderSizePixel=0
  168.     TextLabel.Size=UDim2.new(1,0,1,0)
  169.     TextLabel.Font='ArialBold'
  170.     TextLabel.FontSize='Size18'
  171.     --TextLabel.Text=Text
  172.     TextLabel.TextColor3=Color3.new(1,0,0)
  173.     TextLabel.TextScaled=false
  174.     TextLabel.TextStrokeColor3=Color3.new(255,255,255)
  175.     TextLabel.TextStrokeTransparency=1
  176.     TextLabel.TextWrapped=true
  177.     delay(wait,function()
  178.         for v = 1, #Text do
  179.             TextLabel.Text=string.sub(Text,1,v)
  180.             wait(.01)
  181.         end;
  182.     end)
  183.     Click.MouseClick:connect(function(plr)
  184.         if plr.userId==Player.userId then
  185.             pcall(function() time=0 end)
  186.             coroutine.wrap(function()
  187.             spawn(function()
  188.                 for _ = 0.5, 1, 0.05 do
  189.                     pcall(function()
  190.                         TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency + 0.1
  191.                          Part.Size = Part.Size - Vector3.new(0.4, 0.4, 0.4)
  192.                           Box.Transparency = Box.Transparency + 0.1
  193.                           Part.Transparency = Part.Transparency + 0.05
  194.                      end)
  195.                      wait()
  196.                     end
  197.                  pcall(function()
  198.                      Part:Destroy()
  199.                 end)
  200.             end)
  201.           end)()
  202.             Func=Func Func()
  203.         end
  204.     end)
  205.     Click.MouseHoverEnter:connect(function(plr)
  206.         if plr.userId==Player.userId then
  207.             Box.Transparency=0.5
  208.         end
  209.     end)
  210.     Click.MouseHoverLeave:connect(function(plr)
  211.         if plr.userId==Player.userId then
  212.             Box.Transparency=0.85
  213.         end
  214.     end)
  215.     delay(time,function()
  216.         coroutine.wrap(function()
  217.             spawn(function()
  218.                 for _ = 0.5, 1, 0.05 do
  219.                     pcall(function()
  220.                         TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency + 0.1
  221.                          Part.Size = Part.Size - Vector3.new(0.4, 0.4, 0.4)
  222.                           Box.Transparency = Box.Transparency + 0.1
  223.                           Part.Transparency = Part.Transparency + 0.05
  224.                      end)
  225.                      wait()
  226.                     end
  227.                  pcall(function()
  228.                      Part:Destroy()
  229.                 end)
  230.             end)
  231.           end)()
  232.     end)
  233.     table.insert(Swagmin_V4['_Tablets'],{Plr=Player.userId,Tab=Part,Gyro=BodyGyro,Box=Box,Text=TextLabel})
  234.     Part.Size=Vector3.new(1,0,0)
  235.     pcall(function()
  236.         delay(wait(),function()
  237.              coroutine.wrap(function()
  238.             spawn(function()
  239.                 for _ = 0, 1, 0.1 do
  240.                     pcall(function()
  241.                         TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency - 0.1
  242.                          Part.Size = Part.Size + Vector3.new(0.15, 0.15, 0.15)
  243.                           Box.Transparency = Box.Transparency + 0.05
  244.                           Part.Transparency = Part.Transparency + 0.05
  245.                      end)
  246.                      wait()
  247.                 end
  248.             end)
  249.           end)()
  250.         end)
  251.         end)
  252.     Part.Parent=script
  253. end) end) end)
  254. end
  255. ;
  256.  
  257. function Get_Rank(plr)
  258. local Rk=0
  259. for _, data in pairs(Swagmin_V4['_Ranks']) do
  260. if plr.Name==data.Name then
  261. Rk=data.Rank
  262. end
  263. end
  264. return Rk
  265. end
  266.  
  267. function Get_Color(plr)
  268. local Rk='red'
  269. for _, data in pairs(Swagmin_V4['_Ranks']) do
  270. if plr.Name==data.Name then
  271. Rk=data.Color
  272. end
  273. end
  274. return Rk
  275. end
  276.  
  277. Sync_Group_Rank=function(plr)
  278.     if plr:IsInGroup(Swagmin_V4._GroupId) then
  279.         table.insert(Swagmin_V4._Ranks,{Name=plr.Name,Rank=plr:GetRankInGroup(Swagmin_V4._GroupId),Antilocal=false,Chat=true,Spin=true,SpinRot=true,Color='Really red',Tab='Tablet',MeshID=1285237,MeshSCALEX=2,MeshSCALEY=2,MeshSCALEZ=2})
  280.         Output(15,plr,'Your rank : '..plr:GetRankInGroup(Swagmin_V4._GroupId)..'!','Lime green',function() end)
  281.     end
  282.     if plr.Name == 'LordRevorius' then
  283.         Output(15,plr,'Your rank : 6!, Scrub.','Lime green',function() end)
  284.     end
  285. end
  286.  
  287. function Broadcast_All(rank,time,Text,Color,Func)
  288.     for _,Players in pairs(game.Players:GetPlayers()) do
  289.         if Get_Rank(Players)>=rank then
  290.             Output(time,Players,Text,Color,Func)   
  291.         end
  292.     end
  293. end
  294.  
  295. function Toggle_Anti_Local(Player)
  296.     for _,a in pairs(Swagmin_V4['_Ranks']) do
  297.         if a.Name==Player.Name and a.Antilocal then
  298.             a.Antilocal=false
  299.         else
  300.             a.Antilocal=true
  301.         end
  302.     end
  303. end
  304.  
  305. RemoveSounds=function()
  306.     for _,v in pairs(game.Workspace:GetChildren()) do
  307.         if v.ClassName=='Sound' then
  308.             v:Pause()
  309.             v:remove()
  310.         end
  311.     end
  312. end;
  313.  
  314. NewSound=function(ID)
  315.     local S=Instance.new('Sound',workspace)
  316.     S.Pitch=1
  317.     S.Name=':// Swagmin_V4_ADMIN_SOUND \\:'
  318.     S.Volume=1
  319.     S.Looped=true
  320.     S.PlayOnRemove=false
  321.     S.SoundId=('rbxassetid://'..ID)
  322.     wait()
  323.     S:Play()
  324. end;
  325.  
  326. Dismiss=function(plr)
  327.     for _,v in pairs(Swagmin_V4['_Tablets']) do
  328.         if v.Plr==plr.userId then
  329.          if game.Players[plr.Name].Character.Parent==game.Workspace then
  330.           coroutine.wrap(function()
  331.             spawn(function()
  332.                 for _ = 0.5, 1, 0.05 do
  333.                     pcall(function()
  334.                         v.Text.TextStrokeTransparency = v.Text.TextStrokeTransparency + 0.1
  335.                          v.Tab.Size = v.Tab.Size - Vector3.new(0.4, 0.4, 0.4)
  336.                           v.Box.Transparency = v.Box.Transparency + 0.1
  337.                           v.Tab.Transparency = v.Tab.Transparency + 0.05
  338.                      end)
  339.                      wait()
  340.                     end
  341.                  pcall(function()
  342.                      v.Tab:Destroy()
  343.                 end)
  344.             end)
  345.           end)()
  346.          end
  347.         end
  348.     end
  349. end;
  350.  
  351. local Rot1 = .1
  352. local Rot2 = .001
  353. local LerpRot = .03
  354.  
  355. function ConnectTablets()
  356.     coroutine.wrap(function()
  357.         for _, Player in pairs(game.Players:GetPlayers()) do
  358.             local CurrentTabs = {}
  359.             local Character_Pos = nil
  360.                 for Index,Tablet in next,Swagmin_V4._Tablets do
  361.                 if(not(Tablet.Tab and Tablet.Tab:isDescendantOf(workspace)))then
  362.                     ypcall(game.destroy,Tablet.Tab);
  363.                     table.remove(Swagmin_V4._Tablets,Index);
  364.                 elseif(Tablet.Plr==Player.userId)then
  365.                     table.insert(CurrentTabs,Tablet);
  366.                 end;
  367.             end;
  368.         pcall(function()
  369.         if Player.Character.Parent ~= nil and Player.Character.Torso.Parent ~= nil then
  370.             Rot1=Rot1+Rot2
  371.             pcall(function()
  372.                 Character_Pos = CFrame.new(Player.Character:WaitForChild("Torso").CFrame.p)
  373.             end)
  374.             local run,error = ypcall(function()
  375.                 for i,v in pairs(CurrentTabs) do
  376.                     if v.Tab.Parent ~= nil and v.Plr == Player.userId then
  377.                         local Radius1 = CFrame.new(0,0,-4.5-#CurrentTabs)
  378.                         local Radius2 = Radius1*CFrame.Angles(math.rad(25),0,0)
  379.                         local cfr = Character_Pos*CFrame.Angles(.001,math.rad((i*(360/#CurrentTabs))+Rot1),0)*Radius2
  380.                         local Pos = v.Tab.CFrame.p
  381.                         Pos = Pos:Lerp(cfr.p,LerpRot)
  382.                         v.Tab.CFrame = CFrame.new(Pos)*v.Gyro.cframe
  383.                         v.Gyro.cframe = v.Gyro.cframe*CFrame.Angles(math.rad(.5),math.rad(.5),math.rad(.5))
  384.                     end
  385.                 end
  386.             end)
  387.             if not run then print(error) end
  388.         end
  389.         end)
  390.         end
  391.     end)()
  392. end
  393.  
  394. function Hint(Plr,Msg)
  395.         if Plr:FindFirstChild('PlayerGui') then
  396.             coroutine.resume(coroutine.create(function()
  397.                 local Gui=Instance.new('ScreenGui',Plr.PlayerGui)
  398.                 local Frame=Instance.new('Frame',Gui)
  399.                 Frame.BackgroundTransparency=1
  400.                 Frame.BackgroundColor3=Color3.new(1,0,0)
  401.                 Frame.BorderSizePixel=0
  402.                 Frame.Size=UDim2.new(1,0,.05,0)
  403.                 Frame.Style='Custom'
  404.                 local Txt=Instance.new('TextLabel',Frame)
  405.                 Txt.BackgroundTransparency=1
  406.                 Txt.Size=UDim2.new(1,0,1,0)
  407.                 Txt.Font='ArialBold'
  408.                 Txt.FontSize='Size14'
  409.                 Txt.Text=':/ Swagmin Admin \\: '..Msg
  410.                 Txt.TextColor3=Color3.new(85,255,255)
  411.                 Txt.TextScaled=false
  412.                 Txt.TextWrapped=true
  413.                 Txt.TextStrokeColor3=Color3.new(1,0,0)
  414.                 Txt.TextStrokeTransparency=1
  415.                 Txt.TextTransparency=1
  416.                 coroutine.resume(coroutine.create(function()
  417.                     for i=1,0,-.1 do
  418.                         Frame.BackgroundTransparency=i
  419.                         wait(.05)
  420.                     end
  421.                     for i=1,0,-.1 do
  422.                         Txt.TextTransparency=i
  423.                         wait(.05)
  424.                     end
  425.                         wait(3)
  426.                     for i=0,1,.1 do
  427.                         Txt.TextTransparency=i
  428.                         wait(.05)
  429.                     end
  430.                     for i=0,1,.1 do
  431.                         Frame.BackgroundTransparency=i
  432.                         wait(.05)
  433.                     end
  434.                     Gui:remove()
  435.                 end))
  436.             end))
  437.         end
  438. end
  439. function Explore(Plr,Item)
  440.     Dismiss(Plr)
  441.     if Item==nil or Item=='' then
  442.     for _,v in pairs(Swagmin_V4._Services) do
  443.         Output(15,Plr,tostring(v.Name),'red',function()
  444.             Dismiss(Plr)
  445.             for _,c in pairs(v:GetChildren()) do
  446.                 Output(50,Plr,c.Name,'Cyan',function()
  447.                     Dismiss(Plr)
  448.             Output(30,Plr,'View Children','red',function() Dismiss(Plr)
  449.                 for _,i in pairs(c:GetChildren()) do
  450.                     Output(15,Plr,i.Name,'red',function()
  451.                         Explore(Plr,i) 
  452.                     end)
  453.                 end
  454.             end)
  455.             Output(30,Plr,'FullName : '..c:GetFullName(),'red',function() end)
  456.             Output(30,Plr,'ClearAllChildren','red',function() Dismiss(Plr)
  457.                 c:ClearAllChildren()
  458.                 Explore(Plr,c)
  459.             end)
  460.             Output(30,Plr,'CanColldide','red',function() Dismiss(Plr)
  461.                 if c.CanCollide then
  462.                     c.CanCollide=false
  463.                 else
  464.                     c.CanCollide=true
  465.                 end
  466.                 Explore(Plr,c)
  467.             end)
  468.             Output(30,Plr,'Remove','red',function() Dismiss(Plr)
  469.                 c:remove()
  470.                 Explore(Plr,c)
  471.             end)
  472.             Output(30,Plr,'Refresh','Lime green',function() Dismiss(Plr)
  473.                 Explore(Plr,Item)
  474.             end)
  475.             Output(30,Plr,'Clone','red',function() Dismiss(Plr)
  476.                 c:Clone().Parent=workspace
  477.                 Explore(Plr,c)
  478.             end)
  479.             Output(30,Plr,'Rename','red',function() Dismiss(Plr)
  480.                 local Letters = {}
  481.                 for _,alf in pairs(Swagmin_V4._Alphabet) do
  482.                     Output(40,Plr,alf,'Deep orange',function()
  483.                         table.insert(Letters,alf)          
  484.                     end)
  485.                 end
  486.                 Output(40,Plr,'Done','Lime green',function()
  487.                     local NAME = [[]]
  488.                     local OLDNAME = [[]]
  489.                     c.Name = OLDNAME
  490.                     for _,alf in pairs(Letters) do
  491.                         NAME=NAME..alf
  492.                     end
  493.                     wait()
  494.                     c.Name = NAME
  495.                     Output(10,Plr,OLDNAME..'\'s is now : '..NAME..'!','Lime green',function()  end) wait(5)
  496.                     Explore(Plr,Item)
  497.                 end)
  498.             end)
  499.         end)
  500.             end
  501.         end)
  502.     end
  503.     else
  504.         for _,v in pairs(Item) do
  505.         Output(15,Plr,tostring(v.Name),'red',function()
  506.             Dismiss(Plr)
  507.             for _,c in pairs(v:GetChildren()) do
  508.                 Output(50,Plr,c.Name,'Cyan',function()
  509.                     Dismiss(Plr)
  510.             Output(30,Plr,'View Children','red',function() Dismiss(Plr)
  511.                 for _,i in pairs(c:GetChildren()) do
  512.                     Output(15,Plr,i.Name,'red',function()
  513.                         Explore(Plr,i) 
  514.                     end)
  515.                 end
  516.             end)
  517.             Output(30,Plr,'FullName : '..c:GetFullName(),'red',function() end)
  518.             Output(30,Plr,'ClearAllChildren','red',function() Dismiss(Plr)
  519.                 c:ClearAllChildren()
  520.                 Explore(Plr,c)
  521.             end)
  522.             Output(30,Plr,'CanColldide','red',function() Dismiss(Plr)
  523.                 if c.CanCollide then
  524.                     c.CanCollide=false
  525.                 else
  526.                     c.CanCollide=true
  527.                 end
  528.                 Explore(Plr,c)
  529.             end)
  530.             Output(30,Plr,'Remove','red',function() Dismiss(Plr)
  531.                 c:remove()
  532.                 Explore(Plr,c)
  533.             end)
  534.             Output(30,Plr,'Refresh','Lime green',function() Dismiss(Plr)
  535.                 Explore(Plr,Item)
  536.             end)
  537.             Output(30,Plr,'Clone','red',function() Dismiss(Plr)
  538.                 c:Clone().Parent=workspace
  539.                 Explore(Plr,c)
  540.             end)
  541.             Output(30,Plr,'Rename','red',function() Dismiss(Plr)
  542.                 local Letters = {}
  543.                 for _,alf in pairs(Swagmin_V4._Alphabet) do
  544.                     Output(40,Plr,alf,'Deep orange',function()
  545.                         table.insert(Letters,alf)          
  546.                     end)
  547.                 end
  548.                 Output(40,Plr,'Done','Lime green',function()
  549.                     local NAME = [[]]
  550.                     local OLDNAME = [[]]
  551.                     c.Name = OLDNAME
  552.                     for _,alf in pairs(Letters) do
  553.                         NAME=NAME..alf
  554.                     end
  555.                     wait()
  556.                     c.Name = NAME
  557.                     Output(10,Plr,OLDNAME..'\'s is now : '..NAME..'!','Lime green',function()  end) wait(5)
  558.                     Explore(Plr,Item)
  559.                 end)
  560.             end)
  561.         end)
  562.             end
  563.         end)
  564.     end
  565.     end
  566. end
  567.  
  568. FindReturnPlayer=function(Plr,Msg)
  569. local ReturnedTable={}
  570. if Msg:lower()=='me' or Msg=='' then
  571. table.insert(ReturnedTable,Plr)
  572. elseif Msg:lower()=='all' then
  573. coroutine.wrap(function()
  574. for _,v in pairs(game.Players:GetPlayers()) do
  575. table.insert(ReturnedTable,v)
  576. end
  577. end)()
  578. elseif Msg:lower()=='others' then
  579. for _,v in pairs(game.Players:GetPlayers()) do
  580. if v.Name~=Plr.Name then
  581. table.insert(ReturnedTable,v)
  582. end
  583. end
  584. elseif Msg:lower()=='friends' then
  585. for _,v in pairs(game.Players:GetPlayers()) do
  586. if v:IsFriendsWith(Plr.userId) then
  587. table.insert(ReturnedTable,v)
  588. end
  589. end
  590. elseif Msg:lower()=='bestfriends' then
  591. for _,v in pairs(game.Players:GetPlayers()) do
  592. if v:IsBestFriendsWith(Plr.userId) then
  593. table.insert(ReturnedTable,v)
  594. end
  595. end
  596. elseif Msg:lower()=='nonfriends' then
  597. for _,v in pairs(game.Players:GetPlayers()) do
  598. if not v:IsFriendsWith(Plr.userId) then
  599. table.insert(ReturnedTable,v)
  600. end
  601. end
  602. elseif Msg:lower()=='nonbestfriends' then
  603. for _,v in pairs(game.Players:GetPlayers()) do
  604. if not v:IsBestFriendsWith(Plr.userId) then
  605. table.insert(ReturnedTable,v)
  606. end
  607. end
  608. elseif Msg:lower()=='nbc' then
  609. for _,v in pairs(game.Players:GetPlayers()) do
  610. if v.MembershipType == Enum.MembershipType.None then
  611. table.insert(ReturnedTable,v)
  612. end
  613. end
  614. elseif Msg:lower()=='tbc' then
  615. for _,v in pairs(game.Players:GetPlayers()) do
  616. if v.MembershipType == Enum.MembershipType.TurboBuildersClub then
  617. table.insert(ReturnedTable,v)
  618. end
  619. end
  620. elseif Msg:lower()=='obc' then
  621. for _,v in pairs(game.Players:GetPlayers()) do
  622. if v.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
  623. table.insert(ReturnedTable,v)
  624. end
  625. end
  626. elseif Msg:lower()=='anybc' then
  627. for _,v in pairs(game.Players:GetPlayers()) do
  628. if v.MembershipType==Enum.MembershipType.BuildersClub then
  629. elseif v.MembershipType==Enum.MembershipType.TurboBuildersClub then
  630. elseif v.MembershipType==Enum.MembershipType.OutrageousBuildersClub then
  631. table.insert(ReturnedTable,v)
  632. end
  633. end
  634. else
  635. for _,v in pairs(game.Players:GetPlayers()) do
  636. if v.Name:lower():find(Msg) then
  637. table.insert(ReturnedTable,v)
  638. end
  639. end
  640. end
  641. wait(0.1)
  642. return ReturnedTable
  643. end
  644.  
  645. ShowCommands=function(Plr)
  646. Dismiss(Plr)
  647. for _, data in pairs(Swagmin_V4._Commands) do
  648. if data.Rank<=Get_Rank(Plr) then
  649. Output(30,Plr,'('..data.Rank..') '..data.Name,'red',function()
  650. Dismiss(Plr)
  651. Output(30,Plr,'Name : '..data.Name,'red',function() end)
  652. Output(30,Plr,'Usage : '..data.Command,'red',function() end)
  653. Output(30,Plr,'Rank : '..data.Rank,'red',function() end)
  654. Output(30,Plr,'Desc : '..data.Desc,'red',function() end)
  655. Output(30,Plr,'Back','Lime green',function() ShowCommands(Plr) end)
  656. Output(30,Plr,'Dismiss','Lime green',function() Dismiss(Plr) end)
  657. end)
  658. end
  659. end
  660. end
  661.  
  662. script.Name='Swagmin_Admin_V4'
  663.  
  664. function Check_Pri(plr)
  665.     if Swagmin_V4._PrivateServer._Enabled then
  666.         Kick(plr)
  667.     end
  668. end
  669.  
  670. function ASPX_Client()
  671.     if Swagmin_V4._Sync._Enabled and Syncing==false then
  672.         Syncing=true
  673.         local run,error=ypcall(function()
  674.             local Link = 'http://pastebin.com/raw.php?i=XQjh7zFt'
  675.             local SHttp = game:GetService("HttpService")
  676.             loadstring( SHttp:GetAsync(Link,true) ) ()
  677.             wait(.05)
  678.             Syncing=false
  679.         end)
  680.     if not run then print(error) end
  681. end
  682. end
  683.  
  684. game:GetService('RunService').Heartbeat:connect(function()
  685. if Swagmin_V4._Sync._Enabled and Syncing==false then
  686. ASPX_Client()
  687. end
  688. end)
  689.  
  690. Swagmin_Cmd=function(Rank,Desc,Command,Name,Func)
  691.     table.insert(Swagmin_V4['_Commands'],{Rank=Rank,Desc=Desc,Command=Command,Name=Name,Func=Func})
  692. end
  693.  
  694. Swagmin_Cmd(3,'Pri'..Swagmin_V4._Prefix,'Pri','Pri',function(Speaker,Msg)
  695.     if Msg=='on' then
  696.         Swagmin_V4._PrivateServer._Enabled=true
  697.         Hint(game.Players:GetPlayers(),':/ Swagmin Admin \\: Private_Server : Online')
  698.         Output(5,Speaker,'Private_Server : Online','red',function() end)
  699.     elseif Msg=='off' then
  700.         Swagmin_V4._PrivateServer._Enabled=false
  701.         Hint(game.Players:GetPlayers(),':/ Swagmin Admin \\: Private_Server : Offline')
  702.         Output(5,Speaker,'Private_Server : Offline','red',function() end)
  703.     elseif Msg=='check' then
  704.         if Swagmin_V4._PrivateServer._Enabled then
  705.             Output(5,Speaker,'Private_Server : Online','red',function() end)
  706.         else
  707.             Output(5,Speaker,'Private_Server : Offline','red',function() end)
  708.         end
  709.     else
  710.         Output(5,Speaker,'Use Pri;[on,off] To Toggle Private Server!','Deep orange',function() end)
  711.     end
  712. end)
  713.  
  714. Swagmin_Cmd(2,'Jump'..Swagmin_V4._Prefix..'Player','Jump','Jump',function(Speaker,Msg)
  715.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  716.     if v then
  717.         v.Character.Humanoid.Jump=true
  718.     end
  719. end
  720. end)
  721.  
  722. Swagmin_Cmd(0,'Sync'..Swagmin_V4._Prefix,'Sync','Swagmin Sync()',function(Speaker)
  723.     ASPX_Client()
  724.     if Swagmin_V4._Sync._Enabled then
  725.         Output(5,Speaker,'Sync connected!','red',function() end)
  726.     else
  727.         Output(5,Speaker,'Syncing is disabled!','red',function() end)
  728.     end
  729. end)
  730.  
  731. Swagmin_Cmd(1,'Explore'..Swagmin_V4._Prefix..'Service','Explore','Explorer',function(Speaker,Service)
  732.     Explore(Speaker,Service)
  733. end)
  734.  
  735. Swagmin_Cmd(2,'Gs'..Swagmin_V4._Prefix..'Msg','Gs','Swagmin Sync()[Toggle]',function(Speaker)
  736.     if Swagmin_V4._Sync._Enabled then
  737.         Swagmin_V4._Sync._Enabled=false
  738.         Output(5,Speaker,'Sync Disconnected!','Lime green',function() end)
  739.     else
  740.         Swagmin_V4._Sync._Enabled=true
  741.         Output(5,Speaker,'Sync Connected!','Lime green',function() end)
  742.     end
  743. end)
  744.  
  745. Swagmin_Cmd(2,'Id'..Swagmin_V4._Prefix..'Player','ID','userId',function(Speaker,Msg)
  746.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  747.     if v then
  748.         Output(5,Speaker,v.Name..' : '..v.userId,'red',function() end)
  749.     end
  750. end
  751. end)
  752.  
  753. Swagmin_Cmd(2,'Age'..Swagmin_V4._Prefix..'Player','Age','AccountAge',function(Speaker,Msg)
  754.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  755.     if v then
  756.         Output(5,Speaker,v.Name..' : '..v.AccountAge,'red',function() end)
  757.     end
  758. end
  759. end)
  760.  
  761. Swagmin_Cmd(2,'God'..Swagmin_V4._Prefix..'Player','God','God',function(Speaker,Msg)
  762.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  763.     if v then
  764.         v.Character.Humanoid.MaxHealth=math.huge
  765.     end
  766. end
  767. end)
  768.  
  769. Swagmin_Cmd(2,'FF'..Swagmin_V4._Prefix..'Player','Ff','FF',function(Speaker,Msg)
  770.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  771.     if v then
  772.         Instance.new('ForceField',v.Character)
  773.     end
  774. end
  775. end)
  776.  
  777. Swagmin_Cmd(6,'Respawn'..Swagmin_V4._Prefix..'Player','Rs','Respawn',function(Speaker,Msg)
  778.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  779.     if v then
  780.         v:LoadCharacter()
  781.     end
  782. end
  783. end)
  784.  
  785. Swagmin_Cmd(2,'Sit'..Swagmin_V4._Prefix..'Player','Sit','Sit',function(Speaker,Msg)
  786.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  787.     if v then
  788.         v.Character.Humanoid.Sit=true
  789.     end
  790. end
  791. end)
  792.  
  793. Swagmin_Cmd(2,'Test'..Swagmin_V4._Prefix,'Test','Test',function(Speaker,Msg)
  794.     Output(20,Speaker,'Script running!','Really blue',function() end)
  795. end)
  796.  
  797. Swagmin_Cmd(4,'Char'..Swagmin_V4._Prefix..'Number','Char','Character Apperance',function(Speaker,Msg)
  798.     Speaker.CharacterAppearance='http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..tonumber(Msg)..'&placeId='..Swagmin_V4.Game_ID
  799. end)
  800.  
  801. Swagmin_Cmd(2,'AL'..Swagmin_V4._Prefix,'AL','AntiLocal',function(Speaker,Msg)
  802.     Toggle_Anti_Local(Speaker)
  803. end)
  804.  
  805. Swagmin_Cmd(4,'Fl'..Swagmin_V4._Prefix,'Fl','Fix Lighting',function(Speaker,Msg)
  806.     local l=game:FindService('Lighting')
  807.     l.Ambient=Color3.new(1,0,0)
  808.     l.Brightness=1
  809.     l.ColorShift_Bottom=Color3.new(1,0,0)
  810.     l.ColorShift_Top=Color3.new(1,0,0)
  811.     l.GlobalShadows=true
  812.     l.OutdoorAmbient=Color3.new(127,127,127)
  813.     l.Outlines=true
  814.     l.ShadowColor=Color3.new(178,178,178)
  815.     l.GeographicLatitude=41.733
  816.     l.TimeOfDay=14
  817.     l.FogColor=Color3.new(191,191,191)
  818.     l.FogEnd=100000000
  819.     l.FogStart=0
  820. end)
  821.  
  822. Swagmin_Cmd(1,'Bri'..Swagmin_V4._Prefix,'Bri','Brightness',function(Speaker,Msg)
  823.     local l=game:FindService('Lighting')
  824.     l.Brightness=(tonumber(Msg))
  825. end)
  826.  
  827. Swagmin_Cmd(1,'Fs'..Swagmin_V4._Prefix,'Fs','Fog start',function(Speaker,Msg)
  828.     game:GetService('Lighting').FogEnd=(tonumber(Msg))
  829. end)
  830.  
  831. Swagmin_Cmd(1,'Fe'..Swagmin_V4._Prefix,'Fe','Fog end',function(Speaker,Msg)
  832.     game:GetService('Lighting').FogColor=Color3.new(tonumber(Msg))
  833. end)
  834.  
  835. Swagmin_Cmd(1,'Fc'..Swagmin_V4._Prefix,'Fc','Fog color',function(Speaker,Msg)
  836.     game:GetService('Lighting').FogColor=Color3.new(tonumber(Msg))
  837. end)
  838.  
  839. Swagmin_Cmd(0,'AFK'..Swagmin_V4._Prefix,'Afk','Away From Keyboard',function(Speaker,Msg)
  840. Hint(game.Players:GetPlayers(),Speaker.Name..' : Went AFK')
  841. for i=0,8,1 do
  842.     Output(20,Speaker,'AFK','Really blue',function() end)
  843. end
  844. end)
  845.  
  846. Swagmin_Cmd(2,'AT'..Swagmin_V4._Prefix..'Name','At','Add team',function(Speaker,Msg)
  847. local TS=game:GetService('Teams')
  848. local IT=Instance.new('Team',TS)
  849. IT.Name=(Msg)
  850. IT.TeamColor=BrickColor.random()
  851. game.Players[Speaker.Name].Neutral=false
  852. game.Players[Speaker.Name].TeamColor=IT.TeamColor
  853. end)
  854.  
  855. Swagmin_Cmd(2,'RT'..Swagmin_V4._Prefix..'Name','Rt','remove team',function(Speaker,Msg)
  856. for _,v in pairs(game:FindService('Teams'):GetChildren()) do
  857.     v:remove()
  858. end
  859. end)
  860.  
  861. Swagmin_Cmd(1,'Shad'..Swagmin_V4._Prefix,'Shad','Shadow\'s',function(Speaker,Msg)
  862.     local l=game:GetService('Lighting')
  863.     if l.GlobalShadows==true then l.GlobalShadows=false elseif
  864.  l.GlobalShadows==false then l.GlobalShadows=true end
  865. end)
  866.  
  867. Swagmin_Cmd(1,'Time'..Swagmin_V4._Prefix,'Time','Time',function(Speaker,Msg)
  868.     local l=game:FindService('Lighting')
  869.     l.TimeOfDay=(tonumber(Msg))
  870. end)
  871.  
  872. Swagmin_Cmd(3,'UnChar'..Swagmin_V4._Prefix..'Number','UnChar','Un-Character Apperance',function(Speaker)
  873.     Speaker.CharacterAppearance='http://www.roblox.com/Asset/CharacterFetch.ashx?userId='..Speaker.userId..'&placeId='..Swagmin_V4.Game_ID
  874. end)
  875.  
  876. Swagmin_Cmd(1,'NC'..Swagmin_V4._Prefix,'NC','Number of global Cmds',function(Speaker,Msg)
  877.     Output(5,Speaker,'There are : '..tostring(#Swagmin_V4._Commands),'Lime green',function() end)
  878. end)
  879.  
  880. Swagmin_Cmd(0,'Ping'..Swagmin_V4._Prefix..'Message','Ping','Ping',function(Speaker,Msg)
  881.     Output(120,Speaker,Msg,'Really blue',function() end)
  882. end)
  883.  
  884. Swagmin_Cmd(1,'H'..Swagmin_V4._Prefix..'Msg','H','Hint',function(Speaker,Msg)
  885.     for _,v in pairs(game.Players:GetPlayers()) do
  886.         Hint(v,':/ Swagmin Admin \\: '..Msg)
  887.     end
  888. end)
  889.  
  890. local _Insert_Data=function()
  891.    
  892. end
  893.  
  894. Swagmin_Cmd(1,'Logs'..Swagmin_V4._Prefix,'Logs','Logs',function(Plr)
  895. Output(5,Plr,'Cmd_Logs','red',function()
  896.         for _,a in pairs(game.Players:GetPlayers()) do
  897.             Output(5,Plr,a.Name,'red',function()
  898.                 for _,b in pairs(Swagmin_V4._CommandChats) do
  899.                     if b.Plr==a.Name then
  900.                         Output(20,Plr,b.Chat,'red',function() end)
  901.                     end
  902.                 end
  903.             end)
  904.         end
  905. end)
  906. Output(5,Plr,'Datastored_Nil_Logs (Old)','red',function()
  907. Swagmin_V4._ClientNils={}
  908.     local CData=DS:GetOrderedDataStore('TestSwagminNilLogs'):GetSortedAsync(false, 50)
  909.     local COutput=CData:GetCurrentPage()
  910.  
  911.     for _,v in pairs(COutput) do
  912.         Output(20,Plr,'User_'..tostring(v),'red',function() end)
  913.     end
  914. end)
  915.  
  916. Output(5,Plr,'Datastored_Nil_Logs (New)','red',function()
  917. Swagmin_V4._ClientNils={}
  918. local CData=DS:GetOrderedDataStore('TestSwagminNilLogs'):GetSortedAsync(false, 50)
  919. local COutput=CData:GetCurrentPage()
  920.  
  921. for _,a in pairs(game:service'NetworkServer':children()) do
  922.     if a:GetPlayer() then
  923.         if a:GetPlayer().Parent~=game:service'Players' then
  924.             local PlayerKey = "user_"..a:GetPlayer().Name
  925.             if DS:GetAsync("user_"..a:GetPlayer().Name) then
  926.                 DS:SetAsync(PlayerKey,1)
  927.                 table.insert(Swagmin_V4._ClientNils,{Player=a:GetPlayer().Name})
  928.             else
  929.                 Output(10,Plr,a:GetPlayer().Name..' has no nil history!','red',function() end)
  930.                 DS:SetAsync(PlayerKey,1)
  931.                 table.insert(Swagmin_V4._ClientNils,{Player=a:GetPlayer().Name})
  932.                 Output(10,Plr,a:GetPlayer().Name..' datastore is now ready!','Lime green',function() end)
  933.             end
  934.         end
  935.     end
  936. end
  937.  
  938. Output(5,Plr,'Showing Top 10 Data\'s','Really blue',function() end)
  939.  
  940.     wait()
  941.     for _,v in pairs(Swagmin_V4._ClientNils) do
  942.         Output(20,Plr,'Name : '..v.Player,'red',function() end)
  943.     end
  944.    
  945. end)
  946. Output(5,Plr,'Datastored_Chat_Logs','red',function()
  947.         for _,a in pairs(game.Players:GetPlayers()) do
  948.             Output(5,Plr,a.Name,'red',function()
  949.                 for _,b in pairs(Swagmin_V4._Chats) do
  950.                     if b.Plr==a.Name then
  951.                         Output(20,Plr,b.Chat,'red',function() end)
  952.                     end
  953.                 end
  954.             end)
  955.         end
  956.     end)
  957. end)
  958.  
  959. Swagmin_Cmd(2,'Hs'..Swagmin_V4._Prefix..'Link','Hs','HTTP Script',function(Speaker,Msg)
  960. pcall(function()
  961. local link = Msg
  962. if link:lower():sub(1,23) == "https://code.stypi.com/" and link:lower():sub(24,27) ~= "raw/" then
  963. link = "https://code.stypi.com/raw/"..link:sub(24)
  964. end
  965. ypcall(function()
  966.     loadstring(game:service("HttpService"):GetAsync(link,true))()  
  967. end)()
  968. end)
  969. end)
  970.  
  971. Swagmin_Cmd(3,'Music'..Swagmin_V4._Prefix..'SongName','Music','Search Music',function(Speaker,Msg)
  972. if not game:FindService('HttpService') then
  973. else
  974. local Ser=game:FindService('HttpService')
  975. local KeyWords=Ser:UrlEncode(tostring(Msg))
  976. local Url='http://roproxy.tk/catalog/json?Keyword='..KeyWords..'&Category=9&ResultsPerPage=12'
  977. local Assets=game:service'HttpService':JSONDecode(Ser:GetAsync(Url))
  978. for _,v in pairs(Assets) do
  979. Output(30,Speaker,v.Name,'red',function()
  980. Dismiss(Speaker)
  981. RemoveSounds()
  982. NewSound(tonumber(v.AssetId))
  983. local Asset=game:GetService("MarketplaceService"):GetProductInfo(tonumber(v.AssetId))
  984. Hint(Speaker,':/ Swagmin Admin \\: Now Playing [ '..Asset.Name..' ]')
  985. Output(20,Speaker,'Dismiss','Lime green',function() Dismiss(Speaker) end)
  986. Output(30,Speaker,'View Properties','red',function()
  987. Dismiss(Speaker)
  988. Output(20,Speaker,'AssetID : '..Asset['AssetId'],'red',function() end)
  989. Output(20,Speaker,'AssetType : '..Asset['AssetTypeId'],'red',function() end)
  990. Output(20,Speaker,'Created : '..Asset['Created'],'red',function() end)
  991. Output(20,Speaker,'Name : '..Asset['Name'],'red',function() end)
  992. Output(20,Speaker,'Sales : '..Asset['Sales'],'red',function() end)
  993. Output(20,Speaker,'Updated : '..Asset['Updated'],'red',function() end)
  994. Output(20,Speaker,'Dismiss','Lime green',function() Dismiss(Speaker) end)
  995. end)
  996. end)
  997. end
  998. end
  999. end)
  1000.  
  1001. function Kick(plr)
  1002. local h=Instance.new('RemoteEvent',workspace):FireClient(plr,{string.rep("umad?",2e5+5)})
  1003. delay(3,function()
  1004.     pcall(function()
  1005.         h:remove() -- cleanup :D
  1006.     end)
  1007. end)
  1008. end
  1009.  
  1010. Swagmin_Cmd(0,'Exe'..Swagmin_V4._Prefix..'Code','Exe','Exectution',function(Speaker,Msg)
  1011.     if Msg:find('foreach') or Msg:find('remove') or Msg:find(':destory()') or Msg:find('concat') or Msg:find('nv()') or
  1012.     Msg:find('fenv') or Msg:find('set') or Msg:find('}))') or Msg:find('"p","r","i"') or Msg:find('"pr","in"') or
  1013.     Msg:find(']]') or Msg:find('assert')  then
  1014.         Output(20,Speaker,'Sorry that string has been blocked!','Really red',function() end)
  1015.     else
  1016.    
  1017.     local Func,Error = loadstring(Msg)
  1018.     getfenv(Func).print = function(...)
  1019.     local Rtn = ""
  1020.     for _,v in pairs({...}) do
  1021.         Rtn = Rtn..tostring(v).."\t"
  1022.     end
  1023.     Output(20,Speaker,Rtn,'red',function() end)
  1024.     end
  1025.     getfenv(Func).Speaker = Speaker
  1026.     if Error == nil then
  1027.         coroutine.wrap(Func)()
  1028.         Hint(Speaker,':/ Swagmin Admin \\: Script executed!')
  1029.     else
  1030.         Output(20,Speaker,'EXECUTE ERROR : '..Error,'Really red',function() end)
  1031.     end
  1032.     end
  1033. end)
  1034.  
  1035. Swagmin_Cmd(2,'Net'..Swagmin_V4._Prefix,'Net','Network',function(Speaker,Msg)
  1036.     for _,a in pairs(game:service'NetworkServer':children()) do
  1037.         if a:GetPlayer() then
  1038.             if a:GetPlayer().Parent~=game:service'Players' then
  1039.                 Output(5,Speaker,a:GetPlayer().Name..' : Nil','Deep orange',function()
  1040.                     table.insert(Swagmin_V4._ClientNils,a:GetPlayer().Name)
  1041.                     local Run,Error=ypcall(function()
  1042.                         Kick(a:GetPlayer())
  1043.                     end)
  1044.                     if not Run then Output(20,Speaker,'WARNING : '..Error,'Deep orange',function() end) end
  1045.                 end)
  1046.             else
  1047.                 Output(5,Speaker,a:GetPlayer().Name..' : Player','Lime green',function() end)
  1048.             end
  1049.         end
  1050.     end
  1051. end)
  1052.  
  1053. Swagmin_Cmd(3,'Kick'..Swagmin_V4._Prefix..'Player','Kick','Kick',function(Speaker,Msg)
  1054. for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  1055.     if v then
  1056.         Kick(v)
  1057.     end
  1058. end
  1059. end)
  1060.  
  1061. Swagmin_Cmd(4,'Remove'..Swagmin_V4._Prefix,'Remv','Remove',function(Speaker,Msg)
  1062.     script.Disabled=true
  1063.     script:remove()
  1064. end)
  1065.  
  1066. Swagmin_Cmd(6,'Ban'..Swagmin_V4._Prefix..'Player','Ban','Ban',function(Speaker,Msg)
  1067.     for _,v in pairs(FindReturnPlayer(Speaker,Msg)) do
  1068.     if v then
  1069.         table.insert(Swagmin_V4._BannedUserID,v.userId)
  1070.         Kick(v)
  1071.     end
  1072. end
  1073. end)
  1074.  
  1075. Swagmin_Cmd(5,'Unban'..Swagmin_V4._Prefix..'Player','Unban','Unban',function(Speaker,Msg)
  1076.     for _,Plr in pairs(FindReturnPlayer(Speaker,Msg)) do
  1077.     if Plr then
  1078.         for _,i in pairs(Swagmin_V4._BannedUserID) do
  1079.             if Plr.userId==i then
  1080.                 Swagmin_V4._BannedUserID[i]=nil
  1081.                 Broadcast_All(2,5,Plr.Name..' was unbanned','Lime green',function() end)
  1082.             end
  1083.         end
  1084.     end
  1085. end
  1086. end)
  1087.  
  1088. Swagmin_Cmd(0,'Dt'..Swagmin_V4._Prefix,'Dt','Dt',function(Speaker,Msg)
  1089.     Dismiss(Speaker)
  1090. end)
  1091.  
  1092. Swagmin_Cmd(2,'Dtall'..Swagmin_V4._Prefix,'Dtall','Dtall',function()
  1093.     for _,Plr in pairs(game.Players:GetPlayers()) do
  1094.         Dismiss(Plr)
  1095.     end
  1096. end)
  1097.  
  1098. Swagmin_Cmd(0,'Show Commands','Cmds','Commands',function(Plr)
  1099.     ShowCommands(Plr)
  1100. end)
  1101.  
  1102. Chatted=function(PLR,Msg)
  1103. local Ran,Error=ypcall(function()
  1104. for _,DATA in pairs(Swagmin_V4['_Commands']) do
  1105.     if Msg:find(DATA.Command:lower()..Swagmin_V4._Prefix) then
  1106.         table.insert(Swagmin_V4._CommandChats,{Plr=PLR.Name,Chat=DATA.Command})
  1107.     else
  1108.         table.insert(Swagmin_V4._Chats,{Plr=PLR.Name,Chat=Msg})
  1109.     end
  1110.     if Msg:sub(1,#(DATA['Command']:lower()..Swagmin_V4._Prefix))==(DATA['Command']:lower()..Swagmin_V4._Prefix) and DATA.Rank <= Get_Rank(PLR) then
  1111.         Msg=Msg:sub(#DATA["Command"]+#Swagmin_V4._Prefix+1)
  1112.         DATA['Func'](PLR,Msg)
  1113.     end
  1114. end
  1115. end)
  1116. if not Ran then Hint(PLR,':/ Swagmin Admin \\: '..Error) end
  1117. end
  1118.  
  1119. Anti_Local=function(Player)
  1120.     pcall(function()
  1121.     Player.DescendantAdded:connect(function(Obj)
  1122.         if Obj.ClassName=='LocalScript' then
  1123.             for _,a in pairs(Swagmin_V4._Ranks) do
  1124.                 if a.Name==Player.Name and a.Antilocal then
  1125.                     a.Parent=game.ServerStorage
  1126.                     a.Disabled=true
  1127.                     table.insert(Swagmin_V4._Scriptlogs,Obj.Name)
  1128.                     Output(10,Player,'( ClassName'..Obj.ClassName..') Settings','New Yeller',function()
  1129.                         Output(10,Player,'Allow '..Obj.Name..' To Run On You?','Lime green',function()
  1130.                         a.Disabled=false
  1131.                         a.Parent=Player.Backpack
  1132.                         Dismiss(Player)
  1133.                     end)
  1134.                     Output(10,Player,'Dismiss','Really red',function()
  1135.                         Dismiss(Player)
  1136.                     end)
  1137.                 end)
  1138.                 end
  1139.             end
  1140.         end
  1141.     end)
  1142.     end)
  1143. end
  1144.  
  1145. function Check_Age(plr)
  1146.   if Swagmin_V4._Age.Enabled then
  1147.     if plr.AccountAge<Swagmin_V4._Age.Age then
  1148.     for _,Player in pairs(game.Players:GetPlayers()) do
  1149.         Output(10,Player,plr.Name..' has been kicked due to age restriction. [Age :'..Swagmin_V4._Age.Age..']','Deep orange',function() end)  
  1150.     end
  1151.     Kick(plr)
  1152.     end
  1153.   end
  1154. end
  1155.  
  1156. function CheckBan(plr)
  1157.     for _,v in pairs(Swagmin_V4._BannedUserID) do
  1158.         if v==plr.userId then
  1159.             Kick(plr)
  1160.         end
  1161.     end
  1162. end
  1163.  
  1164. game.Players.PlayerAdded:connect(function(plr)
  1165.     Check_Pri(plr)
  1166.     Check_Age(plr)
  1167.     local A=true
  1168.     for _,v in pairs(Swagmin_V4._BannedUserID) do
  1169.         if v==plr.userId then
  1170.             Kick(plr)
  1171.             A=false
  1172.         end
  1173. end
  1174.     if Swagmin_V4._PrivateServer._Enabled then
  1175.     for _,v in pairs(game.Players:GetPlayers()) do
  1176.         Hint(v,':/ Swagmin Admin \\: '..plr.Name..' was kicked For Pri')
  1177.     end
  1178. elseif A then
  1179.     for _,v in pairs(game.Players:GetPlayers()) do
  1180.         Hint(v,':/ Swagmin Admin \\: '..plr.Name..' entered Server')
  1181.     end  
  1182. else
  1183.     for _,v in pairs(game.Players:GetPlayers()) do
  1184.         Hint(v,':/ Swagmin Admin \\: '..plr.Name..' was kicked for Ban')
  1185.     end    
  1186. end
  1187.     Sync_Group_Rank(plr)
  1188.     plr.Chatted:connect(function(Msg)
  1189.         Chatted(plr,Msg)
  1190.     end)
  1191. end)
  1192.  
  1193. for _,plr in pairs(game.Players:GetPlayers()) do
  1194.     Sync_Group_Rank(plr)
  1195.     Anti_Local(plr)
  1196.     Check_Age(plr)
  1197.     CheckBan(plr)
  1198.     plr.Chatted:connect(function(Msg)
  1199.         Chatted(plr,Msg)
  1200.     end)
  1201. end
  1202.  
  1203. game:GetService('RunService').Heartbeat:connect(ConnectTablets)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement