Advertisement
ZeeDerp

Untitled

Nov 8th, 2014
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.26 KB | None | 0 0
  1.  wait(1.5)
  2. local admin = "iiXynx"
  3. local ssv_dir = nil
  4. local audio = {session=185506492,screenbuild=184145453,sleep=184142869,notification=184142889,error=185506448,locked=185506529,login=184142906}
  5. local loadingImg = "rbxassetid://185630585"
  6. local tileImage = "rbxassetid://186075313"
  7. local music = true
  8. local sounds = true
  9. local running = true
  10. local stopping = false
  11. local nilScript = true
  12. local staticOptimizations=true
  13. local clearResistant = true
  14. local showGuiToAll = true
  15. local notification=""
  16. local error=""
  17. local guisToRemove = {}
  18. local appsToRemove = {}
  19. local appAudio = {}
  20. local updatePos=true
  21. local resolution = 1.5 --1 for 1x, 2 for 2x etc
  22. if nilScript then script.Parent=workspace:FindFirstChild(admin) end
  23.  
  24. function ssa_play(audioid,pitch)
  25.     if sounds then
  26.     local s=Instance.new("Sound",showGuiToAll and ssv_dir or game:GetService("Players"):FindFirstChild(admin).PlayerGui)
  27.     s.SoundId="http://www.roblox.com/asset/?id="..audioid
  28.     s.Pitch=pitch
  29.     s:Play()
  30.     end
  31. end
  32.  
  33.  
  34. function ssa_playMusic(audioid,pitch)
  35.     if music then
  36.     local s=Instance.new("Sound",showGuiToAll and ssv_dir or game:GetService("Players"):FindFirstChild(admin).PlayerGui)
  37.     s.SoundId="http://www.roblox.com/asset/?id="..audioid
  38.     s.Pitch=pitch
  39.     s:Play()
  40.     end
  41. end
  42. function sst_addApp(frame,themeIcon,sgui,scr)
  43.     appsToRemove[scr]={frame,themeIcon,sgui}
  44. end
  45.  
  46. function sst_removeApp(i)
  47.     sst_closeTile(unpack(appsToRemove[i]))
  48.     appsToRemove[i]=nil
  49. end
  50.  
  51. function sst_createOpenTileScreen(sgui,themeColor,themeIcon,scr,col,tileframe,name)
  52.     local nCol = col and col or themeColor
  53.                 local frame = Instance.new("Frame",sgui)
  54.                             sst_addApp(frame,themeIcon,sgui,scr)
  55.             frame.BackgroundColor3=themeColor
  56.             frame.Position=UDim2.new(0.5,0,0,0)
  57.             frame.Size=UDim2.new(0,0,0,0)
  58.             frame.ClipsDescendants=true
  59.             frame.ZIndex=9
  60.             frame.BorderSizePixel=0
  61.            
  62.             local hoverBar = Instance.new("Frame",frame)
  63.             hoverBar.ZIndex=0
  64.             hoverBar.Active=true
  65.             hoverBar.Size=UDim2.new(1,0,0.1,0)
  66.            
  67.             local icon = Instance.new("ImageLabel",frame)
  68.             icon.ZIndex=9
  69.             icon.BackgroundTransparency=1
  70.             icon.Image=themeIcon
  71.             icon.Position=UDim2.new(0.25,0,0.25,0)
  72.             icon.Size=UDim2.new(0.5,0,0.5,0)
  73.             icon.Visible=false
  74.            
  75.             local top = Instance.new("TextLabel",hoverBar)
  76.             top.ZIndex=10
  77.             top.Size=UDim2.new(0.9,0,1,0)
  78.             top.Position=UDim2.new(0,0,-1,0)
  79.             top.BackgroundColor=BrickColor.Black()
  80.             top.BorderSizePixel=0
  81.             top.TextColor3=Color3.new(1,1,1)
  82.             top.Text=name and name or "Untitled"
  83.             top.FontSize="Size12"
  84.            
  85.             local closeButton = Instance.new("TextButton",top)
  86.             closeButton.ZIndex=10
  87.             closeButton.Size=UDim2.new(0.1*(1+1/9),0,1,0)
  88.             closeButton.Position=UDim2.new(1,0,0,0)
  89.             closeButton.BackgroundColor=BrickColor.Red()
  90.             closeButton.BorderSizePixel=0
  91.             closeButton.TextColor3=Color3.new(1,1,1)
  92.             closeButton.Text="X"
  93.             closeButton.FontSize="Size12"
  94.             local canTween=true
  95.  
  96.             hoverBar.MouseEnter:connect(function()
  97.                 if canTween then
  98.                 top:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",0.25,true)
  99.                 end
  100.             end)       
  101.             hoverBar.MouseLeave:connect(function()
  102.                 top:TweenPosition(UDim2.new(0,0,-1,0),"In","Quad",0.25,true)
  103.             end)               
  104.             closeButton.MouseButton1Click:connect(function()
  105.                 canTween=false
  106.                 top:TweenPosition(UDim2.new(0,0,-1,0),"In","Quad",0.25,true)
  107.                 sst_closeTile(frame,themeIcon,tileframe,themeColor)
  108.             end)
  109.            
  110.             frame:TweenSizeAndPosition(UDim2.new(1,0,1,0),UDim2.new(0,0,0,0),"Out","Quad",0.25)
  111.             wait(0.3)
  112.             frame:TweenSizeAndPosition(UDim2.new(0,0,1,0),UDim2.new(0.5,0,0,0),"In","Quad",0.25)
  113.             wait(0.3)
  114.             icon.Visible=true
  115.             frame:TweenSizeAndPosition(UDim2.new(1,0,1,0),UDim2.new(0,0,0,0),"Out","Quad",0.25)
  116.             wait(2.5)
  117.             local function l(a,b,c)
  118.                 return ((b-a)*c)+a
  119.             end
  120.             for i=1,10 do
  121.                 icon.ImageTransparency=(i/10)
  122.                 frame.BackgroundColor3=Color3.new(l(themeColor.r,nCol.r,(i/10)),l(themeColor.g,nCol.g,(i/10)),l(themeColor.b,nCol.b,(i/10)))
  123.                 wait(0.05)
  124.             end
  125.             icon:Destroy()
  126.             return frame
  127. end
  128.  
  129. function sst_createTitle(frame,titleText,themeIcon,textCol)
  130.     local icon = Instance.new("ImageLabel",frame)
  131.     icon.ZIndex=9
  132.     icon.BackgroundTransparency=1
  133.     icon.ImageTransparency=1
  134.     icon.Image=themeIcon
  135.     icon.ImageColor3=textCol
  136.     icon.Size=UDim2.new(0.2,0,0.2,0)
  137.     icon.Position=UDim2.new(-0.1,0,0,0)
  138.     local title = Instance.new("TextLabel",frame)
  139.     title.ZIndex=9
  140.     title.BackgroundTransparency=1
  141.     title.TextTransparency=1
  142.     title.TextColor3=textCol
  143.     title.Size=UDim2.new(0.8,0,0.2,0)
  144.     title.Position=UDim2.new(0.1,0,0,0)
  145.     title.TextScaled=true
  146.     title.Text=titleText
  147.     title.TextXAlignment="Left"
  148.     icon:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",0.5)
  149.     title:TweenPosition(UDim2.new(0.2,0,0,0),"Out","Quad",0.5)
  150.     for i=1,10 do
  151.         icon.ImageTransparency=1-(i/10)
  152.         title.TextTransparency=1-(i/10)
  153.         wait(0.05)
  154.     end
  155. end
  156.  
  157. function sst_closeTile(frame,themeIcon,tileframe,themeColor)
  158.         frame:TweenSizeAndPosition(UDim2.new(0,0,1,0),UDim2.new(0.5,0,0,0),"In","Quad",0.5)
  159.         wait(0.55)
  160.         frame:ClearAllChildren()
  161.         frame.BackgroundColor3=themeColor
  162.         local icon = Instance.new("ImageLabel",frame)
  163.         icon.ZIndex=9
  164.         icon.BackgroundTransparency=1
  165.         icon.Image=themeIcon
  166.         icon.Position=UDim2.new(0.25,0,0.25,0)
  167.         icon.Size=UDim2.new(0.5,0,0.5,0)
  168.         frame:TweenSizeAndPosition(UDim2.new(1,0,1,0),UDim2.new(0,0,0,0),"Out","Quad",0.5)
  169.         wait(0.55)
  170.         frame:TweenSizeAndPosition(UDim2.new(0,0,1,0),UDim2.new(0.5,0,0,0),"In","Quad",0.5)
  171.         wait(0.55)
  172.         frame:Destroy()
  173.         tileframe:TweenPosition(UDim2.new(0,0,0.175,0),"Out","Quad",0.5)
  174. end
  175.  
  176. function sst_createOptions(frame,udim,options,prefix,color,bcolor)
  177.    
  178.     local case = Instance.new("TextButton",frame)
  179.     case.Position = UDim2.new(0.1,0,udim.Scale,udim.Offset)
  180.     case.Size = UDim2.new(0.2,0,0.2,0)
  181.     case.BackgroundColor3=color
  182.     case.BorderColor3=bcolor
  183.     case.ZIndex=9
  184.     case.TextColor3=bcolor
  185.     case.BackgroundTransparency=1
  186.     case.TextTransparency=1
  187.    
  188.     local index = 1
  189.    
  190.     local image = Instance.new("ImageLabel",case)
  191.     image.ZIndex=9
  192.     image.Size=UDim2.new(1,0,1,0)
  193.     image.BackgroundTransparency=1
  194.     image.ImageTransparency=1
  195.     image.ImageColor3=bcolor
  196.    
  197.     local text = Instance.new("TextLabel",case)
  198.     text.ZIndex=9
  199.     text.Size=UDim2.new(1,0,1,0)
  200.     text.Position=UDim2.new(1.2,0,0,0)
  201.     text.BackgroundTransparency=1
  202.     text.TextColor3=bcolor
  203.     text.TextXAlignment="Left"
  204.     text.TextTransparency=1
  205.    
  206.     local function update()
  207.     image.Image=options[index][2]
  208.     text.Text=prefix..options[index][1]
  209.     case.Text=options[index][1]
  210.     end
  211.     update()
  212.     for i=1,10 do
  213.         local j = 1-(i/10)
  214.     case.BackgroundTransparency=j
  215.     image.ImageTransparency=j
  216.     text.TextTransparency=j
  217.     wait(0.05)
  218.     end
  219.     case.MouseButton1Click:connect(function()
  220.         index=index+1
  221.         if index>#options then index=1 end
  222.         update()
  223.     end)
  224.     return case
  225. end
  226.  
  227. function sst_lock(frame,themeIcon,tileframe,themeColor)
  228.     if showGuiToAll then
  229.         ssa_playMusic(audio.locked,1)
  230.         local text = Instance.new("TextLabel",frame)
  231.         text.BackgroundColor=BrickColor.Black()
  232.         text.BorderSizePixel=0
  233.         text.TextColor=BrickColor.White()
  234.         text.FontSize="Size12"
  235.         text.TextWrapped=true
  236.         text.Position=UDim2.new(0.1,0,-1.1,0)
  237.         text.ZIndex=9
  238.         text.Size=UDim2.new(0.8,0,0.8,0)
  239.         text.Text = "You cannot view this app in Presentation Mode."
  240.         text:TweenPosition(UDim2.new(0.1,0,0.1,0))
  241.         wait(4)
  242.         sst_closeTile(frame,themeIcon,tileframe,themeColor)
  243.     else
  244.         ssa_playMusic(audio.login,1)
  245.     end
  246. end
  247.  
  248. local tiles = {
  249.    
  250.     {
  251.         tileName = "Sleep",
  252.         tileColor = Color3.new(255/255, 170/255, 255/255),
  253.         tileImg = "rbxassetid://184428876",
  254.         tileFunction = function(scr,sgui,tileframe)
  255.             local frame = sst_createOpenTileScreen(sgui,Color3.new(255/255, 170/255, 255/255),"rbxassetid://184428876",scr,nil,tileframe,"Sleep")
  256.             notification="Sleeping..."
  257.             sst_closeTile(frame,"rbxassetid://184428876",tileframe,Color3.new(255/255, 170/255, 255/255))
  258.             delay(5,function() stopping=true end)
  259.         end
  260.     },
  261.    
  262.         {
  263.         tileName = "Search",
  264.         tileColor = Color3.new(114/255, 184/255, 253/255),
  265.         tileImg = "rbxassetid://184431447",
  266.         tileFunction = function(scr,sgui,tileframe)
  267.             local tcol = Color3.new(61/255, 99/255, 135/255)
  268.             local scol = Color3.new(1,1,1)
  269.             local frame = sst_createOpenTileScreen(sgui,Color3.new(114/255, 184/255, 253/255),"rbxassetid://184431447",scr,tcol,tileframe,"Search")
  270.             local frame2 = Instance.new("Frame",frame)
  271.             frame2.BackgroundTransparency=1
  272.             frame2.Size=UDim2.new(1,0,1,0)
  273.             local frame3 = Instance.new("ScrollingFrame",frame)
  274.             frame3.BackgroundTransparency=1
  275.             frame3.Size=UDim2.new(0.8,0,0.5,0)
  276.             frame3.Position=UDim2.new(0.1,0,1.2,0)
  277.             frame3.ZIndex=9
  278.             sst_createTitle(frame,"Search","rbxassetid://184431447",scol)
  279.            
  280.             local options1 = {{"World","rbxassetid://184553964"},{"Players","rbxassetid://184553949"}}
  281.             local options2 = {{"All","rbxassetid://184553942"},{"Bricks","rbxassetid://184553945"},{"Players","rbxassetid://184553949"},{"Scripts","rbxassetid://184553954"}}
  282.             local locations = {World=workspace,Players=game:GetService("Players")}
  283.             local objects= {All="Instance",Bricks="BasePart",Players="Player",Scripts="BaseScript"}
  284.             local searchin = sst_createOptions(frame2,UDim.new(0.3,0),options1,"Search in: ",tcol,scol)
  285.             local searchfor = sst_createOptions(frame2,UDim.new(0.6,0),options2,"Search for: ",tcol,scol)
  286.             local case = Instance.new("TextButton",frame)
  287.             case.Position = UDim2.new(1,0,0,0)
  288.             case.Size = UDim2.new(0.2,0,0.2,0)
  289.             case.BackgroundColor3=tcol
  290.             case.BorderColor3=scol
  291.             case.ZIndex=9
  292.             case.TextColor3=scol
  293.             case.Text="Go!"
  294.             case:TweenPosition(UDim2.new(0.8,0,0,0),"Out","Quad",0.5)
  295.             wait(0.5)
  296.            
  297.             local case2 = Instance.new("TextButton",frame)
  298.             case2.Position = UDim2.new(1,0,0,0)
  299.             case2.Size = UDim2.new(0.2,0,0.2,0)
  300.             case2.BackgroundColor3=tcol
  301.             case2.BorderColor3=scol
  302.             case2.ZIndex=9
  303.             case2.TextColor3=scol
  304.             case2.Text="Search"
  305.            
  306.             local results = {}
  307.            
  308.             local function search(searchLocation,searchCriteria)
  309.                 local children = searchLocation:GetChildren()
  310.                 results={}
  311.                 for i,v in pairs(children) do
  312.                     if v and
  313.                         v:IsA(searchCriteria) then
  314.                         table.insert(results,v)
  315.                     end
  316.                 end
  317.             frame3:TweenPosition(UDim2.new(0.1,0,1.2,0),"In","Quad",1)
  318.             wait(1)
  319.             case2:TweenPosition(UDim2.new(0.8,0,0,0),"Out","Quad",0.5)
  320.             frame3:ClearAllChildren()
  321.             frame3.CanvasSize=UDim2.new(0,0,0,#results*40)
  322.             frame3.CanvasPosition=Vector2.new(0,0)
  323.             for i,v in pairs(results) do
  324.             local button = Instance.new("TextButton",frame3)
  325.             button.Size=UDim2.new(0.8,0,0,32)
  326.             button.Position=UDim2.new(0.1,0,0,(i-1)*36)
  327.             button.BackgroundColor3=tcol
  328.             button.BorderColor3=scol
  329.             button.ZIndex=9
  330.             button.TextColor3=scol
  331.             button.Text=v.Name.." : "..v.ClassName
  332.             button.MouseButton1Up:connect(function() search(v,searchCriteria) end)
  333.             end
  334.             frame3:TweenPosition(UDim2.new(0.1,0,0.3,0),"Out","Quad",1)
  335.             end
  336.            
  337.             case.MouseButton1Click:connect(function()
  338.                 local searchLocation = locations[searchin.Text]
  339.                 local searchCriteria = (searchLocation==workspace and searchfor.Text=="Players") and "Humanoid" or objects[searchfor.Text]
  340.                 local children = searchLocation:GetChildren()
  341.                 results={}
  342.                 for i,v in pairs(children) do
  343.                     if v and
  344.                         v:IsA(searchCriteria) then
  345.                         table.insert(results,v)
  346.                     end
  347.                 end
  348.             case:TweenPosition(UDim2.new(1,0,0,0),"In","Quad",0.5)
  349.             frame2:TweenPosition(UDim2.new(-1,0,0,0),"In","Quad",1)
  350.             wait(1)
  351.             case2:TweenPosition(UDim2.new(0.8,0,0,0),"Out","Quad",0.5)
  352.             frame3:ClearAllChildren()
  353.             frame3.CanvasSize=UDim2.new(0,0,0,#results*40)
  354.             frame3.CanvasPosition=Vector2.new(0,0)
  355.             for i,v in pairs(results) do
  356.             local button = Instance.new("TextButton",frame3)
  357.             button.Size=UDim2.new(0.8,0,0,32)
  358.             button.Position=UDim2.new(0.1,0,0,(i-1)*36)
  359.             button.BackgroundColor3=tcol
  360.             button.BorderColor3=scol
  361.             button.ZIndex=9
  362.             button.TextColor3=scol
  363.             button.Text=v.Name.." : "..v.ClassName
  364.             button.MouseButton1Up:connect(function() search(v,searchCriteria) end)
  365.             end
  366.             frame3:TweenPosition(UDim2.new(0.1,0,0.3,0),"Out","Quad",1)
  367.             wait(1)
  368.             end)
  369.             case2.MouseButton1Click:connect(function()
  370.             case2:TweenPosition(UDim2.new(1,0,0,0),"In","Quad",0.5)
  371.             frame3:TweenPosition(UDim2.new(0.1,0,1.2,0),"In","Quad",1)
  372.             wait(1)
  373.             frame3:ClearAllChildren()
  374.             case:TweenPosition(UDim2.new(0.8,0,0,0),"Out","Quad",0.5)
  375.             frame2:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",1)
  376.             wait(1)
  377.             end)
  378.         end
  379.         },
  380.        
  381.     {
  382.         tileName = "Settings",
  383.         tileColor = Color3.new(85/255, 170/255, 127/255),
  384.         tileImg = "rbxassetid://184439366",
  385.         tileFunction = function(scr,sgui,tileframe)
  386.             local frame = sst_createOpenTileScreen(sgui,Color3.new(85/255, 170/255, 127/255),"rbxassetid://184439366",scr,nil,tileframe,"Settings")
  387.             sst_lock(frame,"rbxassetid://184439366",tileframe,Color3.new(85/255, 170/255, 127/255))
  388.         end
  389.     },
  390.    
  391.     {
  392.         tileName = "Admin",
  393.         tileColor = Color3.new(255/255, 0/255, 127/255),
  394.         tileImg = "rbxassetid://184553935",
  395.         tileFunction = function(scr,sgui,tileframe)
  396.             local frame = sst_createOpenTileScreen(sgui,Color3.new(255/255, 0/255, 127/255),"rbxassetid://184553935",scr,nil,tileframe,"Admin")
  397.             sst_lock(frame,"rbxassetid://184553935",tileframe,Color3.new(255/255, 0/255, 127/255))
  398.         end
  399.     },
  400.        
  401.     {
  402.         tileName = "Music",
  403.         tileColor = Color3.new(255/255, 85/255, 0/255),
  404.         tileImg = "rbxassetid://186020917",
  405.         tileFunction = function(scr,sgui,tileframe)
  406.             local pcol = Color3.new(255/255, 85/255, 0/255)
  407.             local scol = BrickColor.Black().Color
  408.             local frame = sst_createOpenTileScreen(sgui,Color3.new(255/255, 85/255, 0/255),"rbxassetid://186020917",scr,BrickColor.White().Color,tileframe,"Music")
  409.             sst_createTitle(frame,"Music","rbxassetid://186020917",scol)
  410.         end
  411.     },
  412.    
  413.         {
  414.         tileName = "tDev Network",
  415.         tileColor = Color3.new(85/255, 170/255, 0/255),
  416.         tileImg = "rbxassetid://184553964",
  417.         tileFunction = function(scr,sgui,tileframe)
  418.             local pcol = Color3.new(85/255, 170/255, 0/255)
  419.             local scol = BrickColor.Black().Color
  420.             local frame = sst_createOpenTileScreen(sgui,pcol,"rbxassetid://184553964",scr,nil,tileframe,"tDev Network")
  421.             notification="Connecting to Think Development Network..."
  422.             delay(5,function() error="Cannot connect; closing app." sst_closeTile(frame,tileframe,"rbxassetid://184553964") end)
  423.         end
  424.     },
  425.    
  426. }
  427.  
  428. function ssv_initDir()
  429.    
  430.     ssv_dir = Instance.new("Model",workspace)
  431.     ssv_dir.Name="ssv_"..admin
  432.    
  433. end
  434.  
  435. function ssv_buildScr(cf)
  436.    
  437.     for scr=1, 8 do
  438.        
  439.         local s = Instance.new("Part",ssv_dir)
  440.         s.Name="scr"..scr
  441.         s.CanCollide=false
  442.         s.Anchored=true
  443.         s.Locked=true
  444.         s.Transparency=1
  445.         s.Size=Vector3.new(12,10.8,1)
  446.         s.CFrame=cf*CFrame.Angles(0,math.rad((360/8)*(scr-1)),0)
  447.         s.BrickColor=BrickColor.Blue()
  448.        
  449.         local g = Instance.new("SurfaceGui",s)
  450.         g.CanvasSize = Vector2.new(160*resolution,160*resolution)
  451.         g.Enabled=true
  452.         if not showGuiToAll then
  453.         g.Adornee=g.Parent
  454.         g.Parent=game:GetService("Players"):FindFirstChild(admin).PlayerGui
  455.         g.Name="scr"..scr
  456.         end
  457.                 guisToRemove[scr]=g
  458.         ssv_initAppScr(scr,g)
  459.     end
  460.    
  461. end
  462.  
  463. local aeromenu=false
  464. local desktop=false
  465.  
  466. function ssv_initAppScr(scr,g)
  467.    
  468.     local frame=Instance.new("Frame",g)
  469.     frame.Size=UDim2.new(1,0,1,0)
  470.     frame.BackgroundTransparency=1
  471.     frame.ClipsDescendants=true
  472.     local text = Instance.new("TextLabel",frame)
  473.     text.Name="Taskbar"
  474.     text.Size=UDim2.new(1,0,0.15,0)
  475.     text.Position=UDim2.new(0,0,-0.5,0)
  476.     text.BorderSizePixel=0
  477.     text.BackgroundColor=BrickColor.Black()
  478.     text.TextColor3=Color3.new(1,1,1)
  479.     text.FontSize="Size12"
  480.     text.Text=scr==1 and "Sounds: "..(sounds and "ON" or "OFF") or (scr==7 and "Made by DuckWick" or (scr==3 and "Aero Admin (server)" or (scr==5 and "Melodies: "..(music and "ON" or "OFF") or (showGuiToAll and "Presentation Mode" or ""))))
  481.     text:TweenPosition(UDim2.new(0,0,0.85,0),"Out","Quad",1)
  482.     delay(3,function() ssv_createAppScr(scr,g) end)
  483. end
  484.  
  485. function ssv_updateAeroMenu(scr,g)
  486.     local frame = g:FindFirstChild("Frame")
  487.     if frame then
  488.     if scr==1 or scr==5 then
  489.         local loading = frame:FindFirstChild("Loading")
  490.         if loading and loading.Visible then
  491.         loading.Rotation=loading.Rotation+5
  492.         end
  493.     end
  494.     end
  495. end
  496.  
  497. function ssv_createSleepText(scr,g)
  498.     local text = g.Frame.Taskbar
  499.     local gframe = g.Frame
  500.     if text then
  501.         local frame=Instance.new("Frame",g)
  502.         gframe.Parent=frame
  503.         frame.BackgroundTransparency=1
  504.         frame.ClipsDescendants=true
  505.         frame.Size=UDim2.new(1,0,1,0)
  506.         text.Parent=frame
  507.         gframe:TweenPosition(UDim2.new(0,0,0.85,0),"InOut","Quad",1)
  508.         text:TweenPosition(UDim2.new(0,0,0.85,0),"InOut","Quad",1)
  509.         delay(1.05,function()gframe:TweenPosition(UDim2.new(0,0,0.85*2,0),"In","Quad",1) end)
  510.         delay(2,function()text:TweenPosition(UDim2.new(0,0,-0.2,0),"In","Quad",1) delay(1,function()ssv_stop()end)end)
  511.     end
  512. end
  513. local tpsX = 3
  514. local tpsY = 2
  515. function ssv_createTiles(scr,f)
  516.             local function getSurfaceGui(part,screen)
  517.             return showGuiToAll and part.SurfaceGui or game:GetService("Players"):FindFirstChild(admin).PlayerGui:FindFirstChild("scr"..screen)
  518.         end
  519.     local frame = Instance.new("Frame",f)
  520.     frame.BackgroundTransparency=1
  521.     frame.Size=UDim2.new(1,0,0.65,0)
  522.     frame.Position=UDim2.new(0,0,0.175,0)
  523.     frame.Name="TileFrame"
  524.     for i=1,tpsX do
  525.         for j=1,tpsY do
  526.             local case = Instance.new("Frame",frame)
  527.             case.Name="TileCase"
  528.             case.Position=UDim2.new((i-1)/tpsX,0,(j-1)/tpsY)
  529.             case.Size=UDim2.new(1/tpsX,0,1/tpsY)
  530.             case.BackgroundTransparency=1
  531.             local tile = Instance.new("ImageButton",case)
  532.             tile.Name="Tile"
  533.             tile.Image=tileImage
  534.             tile.Position=UDim2.new(0.1,0,0.1,0)
  535.             tile.Size=UDim2.new(0.8,0,0.8,0)
  536.             tile.BackgroundTransparency=1
  537.             tile.ImageTransparency=1
  538.             tile.ZIndex=9
  539.             local tileID = (((j-1)*tpsX)+(i-1))+((scr-1)*tpsX*tpsY)+1
  540.             local tileData = tiles[tileID]
  541.             if tileData then
  542.                 tile.ImageTransparency=0
  543.                 local c = tileData.tileColor
  544.                 if tileData.tileImg then
  545.                     local img = Instance.new("ImageLabel",tile)
  546.                     img.ZIndex=9
  547.                     img.Image=tileData.tileImg
  548.                     img.BackgroundTransparency=1
  549.                     img.Size=UDim2.new(1,0,1,0)
  550.                 tile.MouseEnter:connect(function()tile.ImageColor3=Color3.new(1,1,1) img.ImageColor3=c end)
  551.                 tile.MouseLeave:connect(function()tile.ImageColor3=c img.ImageColor3=Color3.new(1,1,1) end)
  552.                 tile.MouseButton1Click:connect(function()tile.ImageColor3=c img.ImageColor3=Color3.new(1,1,1) ssa_play(audio.screenbuild,1) frame:TweenPosition(UDim2.new(1,0,0.175,0),"In","Quad",0.5) wait(0.5) tileData.tileFunction(scr,f.Parent,frame) end)
  553.                 else
  554.                 end
  555.                 tile.ImageColor3=c
  556.             end
  557.         end
  558.     end
  559. end
  560.  
  561. function ssv_createAeroMenu(scr,g)
  562.         local function getSurfaceGui(part,screen)
  563.             return showGuiToAll and part.SurfaceGui or game:GetService("Players"):FindFirstChild(admin).PlayerGui:FindFirstChild("scr"..screen)
  564.         end
  565.     local other = g:FindFirstChild("Frame"):FindFirstChild("Frame")
  566.     local frame = Instance.new("Frame",g:FindFirstChild("Frame"))
  567.         frame.BackgroundColor=BrickColor.Black()
  568.         frame.ClipsDescendants=true
  569.         frame.BorderSizePixel=0
  570.         frame.BackgroundTransparency=0.5
  571.         frame.Position=UDim2.new(0,0,1,0)
  572.         frame.Size=UDim2.new(1,0,1,0)
  573.         frame.Name="Frame"
  574.         frame.ZIndex=9
  575.         frame:TweenPosition(UDim2.new(0,0,0,0))
  576.     ssv_createTiles(scr,frame)
  577. end
  578. function ssv_createAppScr(scr,sg)
  579.         local g = sg:FindFirstChild("Frame")
  580.         local taskbar=g:FindFirstChild("Taskbar")
  581.         local frame = Instance.new("Frame",g)
  582.         frame.BackgroundColor=BrickColor.White()
  583.         frame.ClipsDescendants=true
  584.         frame.BorderSizePixel=0
  585.         frame.Position=UDim2.new(0,0,1,0)
  586.         frame.Size=UDim2.new(1,0,0.85,0)
  587.         frame.Name="Frame"
  588.         if scr==1 then
  589.             local text=Instance.new("TextLabel",frame)
  590.             text.TextScaled=true
  591.             text.Text="Welcome"
  592.             text.BackgroundTransparency=1
  593.             text.Size=UDim2.new(1,0,0.3,0)
  594.         elseif scr==5 then
  595.             local button = Instance.new("TextButton",frame)
  596.             button.BackgroundColor = BrickColor.White()
  597.             button.BorderSizePixel=2
  598.             button.BorderColor = BrickColor.Black()
  599.             button.Position=UDim2.new(0.25,0,0.25,0)
  600.             button.Size=UDim2.new(0.5,0,0.5,0)
  601.             button.ZIndex=5
  602.             button.Text="Apps"
  603.             button.Name="Button"
  604.             button.TextScaled=true
  605.             button.TextColor=BrickColor.Black()
  606.             local loading = Instance.new("ImageLabel",g)
  607.             loading.ZIndex=8
  608.             loading.Visible=false
  609.             loading.Size=UDim2.new(0.5,0,0.5,0)
  610.             loading.Position=UDim2.new(0.25,0,0.25,0)
  611.             loading.BackgroundTransparency=1
  612.             loading.ImageTransparency=1
  613.             loading.Image=loadingImg
  614.             loading.Name="Loading"
  615.             local pressed = false
  616.             button.MouseButton1Click:connect(function()
  617.                     if not pressed then
  618.                         pressed=true
  619.                     loading.Visible=true
  620.                     for i=1,10 do
  621.                         loading.ImageTransparency=1-(i/10)
  622.                         button.BackgroundTransparency=i/10
  623.                         button.TextTransparency=i/10
  624.                         wait(0.05)
  625.                     end
  626.                     wait(2)
  627.                     aeromenu=true
  628.                         for i=1,10 do
  629.                         loading.ImageTransparency=(i/10)
  630.                         button.BackgroundTransparency=1-(i/10)
  631.                         button.TextTransparency=1-(i/10)
  632.                         wait(0.05)
  633.                     end
  634.                     end
  635.             end)
  636.         end
  637.         frame:TweenPosition(UDim2.new(0,0,0.15,0),"InOut","Quad",1)
  638.         if taskbar then taskbar:TweenPosition(UDim2.new(0,0,0,0),"InOut","Quad",1) end
  639. end
  640. function ssv_updateAppScr(scr,g)
  641.     local frame = g:FindFirstChild("Frame")
  642.     if frame then
  643.     if scr==1 or scr==5 then
  644.         local loading = frame:FindFirstChild("Loading")
  645.         if loading and loading.Visible then
  646.         loading.Rotation=loading.Rotation+5
  647.         end
  648.     end
  649.     end
  650. end
  651.  
  652. function weight(x)
  653.     return (3*x*x)-(2*x*x*x)
  654. end
  655. local builtAeroMenu = false
  656. local builtDesktop = false
  657. local builtSleep = false
  658.  
  659. function ssv_createNotification(parent)
  660.     local msgBox=Instance.new("TextLabel",parent)
  661.     local effect=Instance.new("Frame",msgBox)
  662.     effect.Position=UDim2.new(0,0,1,0)
  663.     effect.Size=UDim2.new(1,0,0,5)
  664.     effect.BackgroundColor=BrickColor.Blue()
  665.     effect.BorderSizePixel=0
  666.     effect.ZIndex=9
  667.     msgBox.Name="Notify"
  668.     msgBox.Position=UDim2.new(0,0,-0.2,0)
  669.     msgBox.Size=UDim2.new(1,0,0.2,0)
  670.     msgBox:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",1)
  671.     msgBox.BackgroundColor=BrickColor.Black()
  672.     msgBox.BorderSizePixel=0
  673.     msgBox.TextColor=BrickColor.White()
  674.     msgBox.Text=notification
  675.     msgBox.FontSize="Size12"
  676.     msgBox.ZIndex=9
  677.     msgBox.TextWrapped=true
  678. end
  679.  
  680. function ssv_removeNotification(parent)
  681.     local msgBox=parent:FindFirstChild("Notify")
  682.     if msgBox then msgBox:TweenPosition(UDim2.new(0,0,-0.2,0),"In","Quad",1) delay(1,function() msgBox:Destroy() end) end
  683. end
  684.  
  685. function ssv_createError(parent)
  686.     local msgBox=Instance.new("TextLabel",parent)
  687.     local effect=Instance.new("Frame",msgBox)
  688.     effect.Position=UDim2.new(0,0,1,0)
  689.     effect.Size=UDim2.new(1,0,0,5)
  690.     effect.BackgroundColor=BrickColor.Red()
  691.     effect.BorderSizePixel=0
  692.     effect.ZIndex=9
  693.     msgBox.Name="Error"
  694.     msgBox.Position=UDim2.new(0,0,-0.2,0)
  695.     msgBox.Size=UDim2.new(1,0,0.2,0)
  696.     msgBox:TweenPosition(UDim2.new(0,0,0,0),"Out","Quad",1)
  697.     msgBox.BackgroundColor=BrickColor.Black()
  698.     msgBox.BorderSizePixel=0
  699.     msgBox.TextColor=BrickColor.White()
  700.     msgBox.Text=error
  701.     msgBox.FontSize="Size12"
  702.     msgBox.ZIndex=9
  703.     msgBox.TextWrapped=true
  704. end
  705. function ssv_updateAllGui(scr,g)
  706.     if aeromenu then ssv_updateAeroMenu(scr,g) else ssv_updateAppScr(scr,g) end
  707. end
  708. function ssv_removeError(parent)
  709.     local msgBox=parent:FindFirstChild("Error")
  710.     if msgBox then msgBox:TweenPosition(UDim2.new(0,0,-0.2,0),"In","Quad",1) delay(1,function() msgBox:Destroy() end) end
  711. end
  712. local adminCF = CFrame.new(workspace:FindFirstChild(admin).Torso.Position)
  713. function ssv_updateScr(doPos)
  714.         local function getSurfaceGui(part,screen)
  715.             return showGuiToAll and part.SurfaceGui or game:GetService("Players"):FindFirstChild(admin).PlayerGui:FindFirstChild("scr"..screen)
  716.         end
  717.         local buildAero=false
  718.         local buildDesktop=false
  719.         local buildSleep=false
  720.         for scr=1, 8 do
  721.         local s = ssv_dir:FindFirstChild("scr"..scr)
  722.         if doPos then
  723.         adminCF =  CFrame.new(workspace:FindFirstChild(admin).Torso.Position)
  724.         s.CFrame=adminCF*CFrame.Angles(0,math.rad((360/8)*(scr-1)),0)*CFrame.new(0,6,15)
  725.         end
  726.         if aeromenu and not builtAeroMenu then
  727.             ssv_createAeroMenu(scr,getSurfaceGui(s,scr))
  728.             buildAero=true
  729.             desktop=false
  730.         elseif not aeromenu then builtAeroMenu=false end
  731.         if desktop and not builtDesktop then
  732.             ssv_createAppScr(scr,getSurfaceGui(s,scr))
  733.             buildDesktop=true
  734.             aeromenu=false
  735.         elseif not desktop then builtDesktop=false end
  736.         if stopping and not builtSleep then
  737.             if scr==1 then ssa_playMusic(audio.sleep,1)  end
  738.             ssv_createSleepText(scr,getSurfaceGui(s,scr))
  739.             buildSleep=true
  740.          end
  741.         ssv_updateAllGui(scr,getSurfaceGui(s,scr))
  742.         end
  743.         if buildAero then
  744.             builtAeroMenu=true
  745.         end
  746.         if buildDesktop then
  747.             builtDesktop=true
  748.         end
  749.         if buildSleep then
  750.             builtSleep=true
  751.             wait(3)
  752.         end
  753.         if notification~="" then
  754.             ssa_playMusic(audio.notification,1)
  755.             for scr=1,8 do
  756.                 local s = ssv_dir:FindFirstChild("scr"..scr)
  757.                 local sgui = getSurfaceGui(s,scr)
  758.                 ssv_createNotification(sgui.Frame)
  759.             end
  760.             notification=""
  761.             delay(3,function()
  762.             for scr=1,8 do
  763.                 local s = ssv_dir:FindFirstChild("scr"..scr)
  764.                 local sgui = getSurfaceGui(s,scr)
  765.                 ssv_removeNotification(sgui.Frame)
  766.             end
  767.             end)
  768.         end
  769.                 if error~="" then
  770.             ssa_playMusic(audio.error,1)
  771.             for scr=1,8 do
  772.                 local s = ssv_dir:FindFirstChild("scr"..scr)
  773.                 local sgui = getSurfaceGui(s,scr)
  774.                 ssv_createError(sgui.Frame)
  775.             end
  776.             error=""
  777.             delay(3,function()
  778.             for scr=1,8 do
  779.                 local s = ssv_dir:FindFirstChild("scr"..scr)
  780.                 local sgui = getSurfaceGui(s,scr)
  781.                 ssv_removeError(sgui.Frame)
  782.             end
  783.             end)
  784.         end
  785. end
  786.  
  787. function ssv_stop()
  788.    
  789.     for i=1,8 do
  790.         guisToRemove[i]:Destroy()
  791.     end
  792.     ssv_dir:Destroy()
  793.     running = false
  794.    
  795. end
  796.  
  797. function ssv_addNotificationEvents()
  798. local p = game:GetService("Players")
  799. p.PlayerAdded:connect(function(i)
  800.     notification=i.Name.." entered the server."
  801. end)
  802. p.PlayerRemoving:connect(function(i)
  803.     notification=i.Name.." left the server."
  804. end)
  805. end
  806.  
  807. ssv_initDir()
  808. ssv_buildScr(adminCF*CFrame.new(0,6,0))
  809. ssa_playMusic(audio.session,1)
  810. ff = Instance.new("ForceField",workspace:FindFirstChild(admin))
  811. ssv_addNotificationEvents()
  812. if staticOptimizations then workspace:FindFirstChild(admin).Torso.Anchored=true end
  813. while wait(1/60) and running do
  814. ssv_updateScr((not staticOptimizations) or updatePos)
  815. end
  816. script.Parent=workspace
  817. ff:Destroy()
  818. workspace:FindFirstChild(admin).Torso.Anchored=false
  819. script.Disabled=true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement