Advertisement
Derek1017

Swagmin

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