Advertisement
Derek1017

Swagmin - Auto Colors

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