Advertisement
Derek1017

Swagmin - Random Colors - No Transparent

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