Advertisement
derpslerpmerpkerp

Untitled

Jun 25th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.46 KB | None | 0 0
  1. -- Created by uyjulian
  2. -- Part of this script by crazyman32
  3. local rbxassetbeguin = "http://www.roblox.com/asset/?id=184393248
  4.  
  5. --function pluginmanagement()
  6. local plugin = PluginManager():CreatePlugin()
  7. local toolbar = plugin:CreateToolbar("Music GUI")
  8. local bttn = toolbar:CreateButton(
  9.     "Music",
  10.     "Activate Music GUI!",""
  11. )
  12.  
  13. --end
  14.  
  15. function makegui()
  16. MusicGui = Instance.new("ScreenGui")
  17.     MusicGui.Name = "MusicGui"
  18.    
  19.  
  20. MusicPlayer = Instance.new("Frame")
  21.     MusicPlayer.Name = "MusicPlayer"
  22.     MusicPlayer.Parent = MusicGui
  23.     MusicPlayer.Position = UDim2.new(0, 10, 0.93999999761581, -10)
  24.     MusicPlayer.Size = UDim2.new(0, 250, 0, -440)
  25.     MusicPlayer.BackgroundColor = BrickColor.new("Really black")
  26.     MusicPlayer.BackgroundTransparency = 0.30000001192093
  27.     MusicPlayer.BorderColor = BrickColor.new("Really black")
  28.     MusicPlayer.BorderSizePixel = 0
  29.     MusicPlayer.Style = Enum.FrameStyle.RobloxRound
  30.     MusicPlayer.Transparency = 0.30000001192093
  31.  
  32. Title = Instance.new("TextLabel")
  33.     Title.Name = "Title"
  34.     Title.Parent = MusicPlayer
  35.     Title.Position = UDim2.new(0.5, 0, 0, 0)
  36.     Title.Font = Enum.Font.ArialBold
  37.     Title.FontSize = Enum.FontSize.Size14
  38.     Title.Text = "Music Player"
  39.     Title.TextColor = BrickColor.new("Institutional white")
  40.  
  41. Play = Instance.new("TextButton")
  42.     Play.Name = "Play"
  43.     Play.Parent = MusicPlayer
  44.     Play.Active = false
  45.     Play.Position = UDim2.new(0.10000000149012, 0, 1, 0)
  46.     Play.Size = UDim2.new(0, 75, 0, -30)
  47.     Play.Style = Enum.ButtonStyle.RobloxButtonDefault
  48.     Play.Font = Enum.Font.ArialBold
  49.     Play.FontSize = Enum.FontSize.Size12
  50.     Play.Text = ""
  51.     Play.TextColor = BrickColor.new("Institutional white")
  52.  
  53. Songs = Instance.new("Frame")
  54.     Songs.Name = "Songs"
  55.     Songs.Parent = MusicPlayer
  56.     Songs.Position = UDim2.new(0, 0, 0, 30)
  57.     Songs.Size = UDim2.new(1, 0, 1, -50)
  58.     Songs.BackgroundColor = BrickColor.new("Really black")
  59.     Songs.BackgroundTransparency = 1
  60.     Songs.BorderColor = BrickColor.new("Really black")
  61.     Songs.Transparency = 1
  62.  
  63. s01 = Instance.new("TextButton")
  64.     s01.Name = "s01"
  65.     s01.Parent = Songs
  66.     s01.Size = UDim2.new(1, 0, 0, 20)
  67.     s01.Style = Enum.ButtonStyle.RobloxButton
  68.     s01.AutoButtonColor = false
  69.     s01.Font = Enum.Font.ArialBold
  70.     s01.FontSize = Enum.FontSize.Size14
  71.     s01.Text = "Flight of the Bumblebee"
  72.     s01.TextColor = BrickColor.new("Institutional white")
  73.     s01.TextXAlignment = Enum.TextXAlignment.Left
  74.  
  75. Song = Instance.new("Sound")
  76.     Song.Name = "Song"
  77.     Song.Parent = s01
  78.     Song.Pitch = 3
  79.     Song.SoundId = rbxassetbeguin .. "27697719"
  80.     Song.Volume = 1
  81.  
  82. s02 = Instance.new("TextButton")
  83.     s02.Name = "s02"
  84.     s02.Parent = Songs
  85.     s02.Position = UDim2.new(0, 0, 0, 20)
  86.     s02.Size = UDim2.new(1, 0, 0, 20)
  87.     s02.Style = Enum.ButtonStyle.RobloxButton
  88.     s02.AutoButtonColor = false
  89.     s02.Font = Enum.Font.ArialBold
  90.     s02.FontSize = Enum.FontSize.Size14
  91.     s02.Text = "Gothic"
  92.     s02.TextColor = BrickColor.new("Institutional white")
  93.     s02.TextXAlignment = Enum.TextXAlignment.Left
  94.  
  95. Song2 = Instance.new("Sound")
  96.     Song2.Name = "Song"
  97.     Song2.Parent = s02
  98.     Song2.Pitch = 3
  99.     Song2.SoundId = rbxassetbeguin .. "27697743"
  100.     Song2.Volume = 1
  101.  
  102. s03 = Instance.new("TextButton")
  103.     s03.Name = "s03"
  104.     s03.Parent = Songs
  105.     s03.Position = UDim2.new(0, 0, 0, 40)
  106.     s03.Size = UDim2.new(1, 0, 0, 20)
  107.     s03.Style = Enum.ButtonStyle.RobloxButton
  108.     s03.AutoButtonColor = false
  109.     s03.Font = Enum.Font.ArialBold
  110.     s03.FontSize = Enum.FontSize.Size14
  111.     s03.Text = "Tunnel"
  112.     s03.TextColor = BrickColor.new("Institutional white")
  113.     s03.TextXAlignment = Enum.TextXAlignment.Left
  114.  
  115. Song3 = Instance.new("Sound")
  116.     Song3.Name = "Song"
  117.     Song3.Parent = s03
  118.     Song3.SoundId = rbxassetbeguin .. "9650822"
  119.     Song3.Volume = 1
  120.  
  121. s04 = Instance.new("TextButton")
  122.     s04.Name = "s04"
  123.     s04.Parent = Songs
  124.     s04.Position = UDim2.new(0, 0, 0, 60)
  125.     s04.Size = UDim2.new(1, 0, 0, 20)
  126.     s04.Style = Enum.ButtonStyle.RobloxButton
  127.     s04.AutoButtonColor = false
  128.     s04.Font = Enum.Font.ArialBold
  129.     s04.FontSize = Enum.FontSize.Size14
  130.     s04.Text = "Action"
  131.     s04.TextColor = BrickColor.new("Institutional white")
  132.     s04.TextXAlignment = Enum.TextXAlignment.Left
  133.  
  134. Song4 = Instance.new("Sound")
  135.     Song4.Name = "Song"
  136.     Song4.Parent = s04
  137.     Song4.Pitch = 3
  138.     Song4.SoundId = rbxassetbeguin .. "27697713"
  139.     Song4.Volume = 1
  140.  
  141. s05 = Instance.new("TextButton")
  142.     s05.Name = "s05"
  143.     s05.Parent = Songs
  144.     s05.Position = UDim2.new(0, 0, 0, 80)
  145.     s05.Size = UDim2.new(1, 0, 0, 20)
  146.     s05.Style = Enum.ButtonStyle.RobloxButton
  147.     s05.AutoButtonColor = false
  148.     s05.Font = Enum.Font.ArialBold
  149.     s05.FontSize = Enum.FontSize.Size14
  150.     s05.Text = "Nezzera"
  151.     s05.TextColor = BrickColor.new("Institutional white")
  152.     s05.TextXAlignment = Enum.TextXAlignment.Left
  153.  
  154. Song5 = Instance.new("Sound")
  155.     Song5.Name = "Song"
  156.     Song5.Parent = s05
  157.     Song5.SoundId = rbxassetbeguin .. "8610025"
  158.     Song5.Volume = 1
  159.  
  160. s06 = Instance.new("TextButton")
  161.     s06.Name = "s06"
  162.     s06.Parent = Songs
  163.     s06.Position = UDim2.new(0, 0, 0, 100)
  164.     s06.Size = UDim2.new(1, 0, 0, 20)
  165.     s06.Style = Enum.ButtonStyle.RobloxButton
  166.     s06.AutoButtonColor = false
  167.     s06.Font = Enum.Font.ArialBold
  168.     s06.FontSize = Enum.FontSize.Size14
  169.     s06.Text = "Halo Theme Song"
  170.     s06.TextColor = BrickColor.new("Institutional white")
  171.     s06.TextXAlignment = Enum.TextXAlignment.Left
  172.  
  173. Song6 = Instance.new("Sound")
  174.     Song6.Name = "Song"
  175.     Song6.Parent = s06
  176.     Song6.SoundId = rbxassetbeguin .. "1034065"
  177.     Song6.Volume = 1
  178.  
  179. s07 = Instance.new("TextButton")
  180.     s07.Name = "s07"
  181.     s07.Parent = Songs
  182.     s07.Position = UDim2.new(0, 0, 0, 120)
  183.     s07.Size = UDim2.new(1, 0, 0, 20)
  184.     s07.Style = Enum.ButtonStyle.RobloxButton
  185.     s07.AutoButtonColor = false
  186.     s07.Font = Enum.Font.ArialBold
  187.     s07.FontSize = Enum.FontSize.Size14
  188.     s07.Text = "Medieval"
  189.     s07.TextColor = BrickColor.new("Institutional white")
  190.     s07.TextXAlignment = Enum.TextXAlignment.Left
  191.  
  192. Song7 = Instance.new("Sound")
  193.     Song7.Name = "Song"
  194.     Song7.Parent = s07
  195.     Song7.SoundId = rbxassetbeguin .. "5982975"
  196.     Song7.Volume = 1
  197.  
  198. s08 = Instance.new("TextButton")
  199.     s08.Name = "s08"
  200.     s08.Parent = Songs
  201.     s08.Position = UDim2.new(0, 0, 0, 140)
  202.     s08.Size = UDim2.new(1, 0, 0, 20)
  203.     s08.Style = Enum.ButtonStyle.RobloxButton
  204.     s08.AutoButtonColor = false
  205.     s08.Font = Enum.Font.ArialBold
  206.     s08.FontSize = Enum.FontSize.Size14
  207.     s08.Text = "Schala"
  208.     s08.TextColor = BrickColor.new("Institutional white")
  209.     s08.TextXAlignment = Enum.TextXAlignment.Left
  210.  
  211. Song8 = Instance.new("Sound")
  212.     Song8.Name = "Song"
  213.     Song8.Parent = s08
  214.     Song8.SoundId = rbxassetbeguin .. "5985787"
  215.     Song8.Volume = 1
  216.  
  217. s09 = Instance.new("TextButton")
  218.     s09.Name = "s09"
  219.     s09.Parent = Songs
  220.     s09.Position = UDim2.new(0, 0, 0, 160)
  221.     s09.Size = UDim2.new(1, 0, 0, 20)
  222.     s09.Style = Enum.ButtonStyle.RobloxButton
  223.     s09.AutoButtonColor = false
  224.     s09.Font = Enum.Font.ArialBold
  225.     s09.FontSize = Enum.FontSize.Size14
  226.     s09.Text = "Sweedish Techno"
  227.     s09.TextColor = BrickColor.new("Institutional white")
  228.     s09.TextXAlignment = Enum.TextXAlignment.Left
  229.  
  230. Song9 = Instance.new("Sound")
  231.     Song9.Name = "Song"
  232.     Song9.Parent = s09
  233.     Song9.SoundId = rbxassetbeguin .. "2303479"
  234.     Song9.Volume = 1
  235.  
  236. s10 = Instance.new("TextButton")
  237.     s10.Name = "s10"
  238.     s10.Parent = Songs
  239.     s10.Position = UDim2.new(0, 0, 0, 180)
  240.     s10.Size = UDim2.new(1, 0, 0, 20)
  241.     s10.Style = Enum.ButtonStyle.RobloxButton
  242.     s10.AutoButtonColor = false
  243.     s10.Font = Enum.Font.ArialBold
  244.     s10.FontSize = Enum.FontSize.Size14
  245.     s10.Text = "One Winged Angel"
  246.     s10.TextColor = BrickColor.new("Institutional white")
  247.     s10.TextXAlignment = Enum.TextXAlignment.Left
  248.  
  249. Song10 = Instance.new("Sound")
  250.     Song10.Name = "Song"
  251.     Song10.Parent = s10
  252.     Song10.SoundId = rbxassetbeguin .. "1372260"
  253.     Song10.Volume = 1
  254.  
  255. s11 = Instance.new("TextButton")
  256.     s11.Name = "s11"
  257.     s11.Parent = Songs
  258.     s11.Position = UDim2.new(0, 0, 0, 200)
  259.     s11.Size = UDim2.new(1, 0, 0, 20)
  260.     s11.Style = Enum.ButtonStyle.RobloxButton
  261.     s11.AutoButtonColor = false
  262.     s11.Font = Enum.Font.ArialBold
  263.     s11.FontSize = Enum.FontSize.Size14
  264.     s11.Text = "Cursed Abbey"
  265.     s11.TextColor = BrickColor.new("Institutional white")
  266.     s11.TextXAlignment = Enum.TextXAlignment.Left
  267.  
  268. Song11 = Instance.new("Sound")
  269.     Song11.Name = "Song"
  270.     Song11.Parent = s11
  271.     Song11.SoundId = rbxassetbeguin .. "1372257"
  272.     Song11.Volume = 1
  273.  
  274. s12 = Instance.new("TextButton")
  275.     s12.Name = "s12"
  276.     s12.Parent = Songs
  277.     s12.Position = UDim2.new(0, 0, 0, 220)
  278.     s12.Size = UDim2.new(1, 0, 0, 20)
  279.     s12.Style = Enum.ButtonStyle.RobloxButton
  280.     s12.AutoButtonColor = false
  281.     s12.Font = Enum.Font.ArialBold
  282.     s12.FontSize = Enum.FontSize.Size14
  283.     s12.Text = "Wind Of Jords"
  284.     s12.TextColor = BrickColor.new("Institutional white")
  285.     s12.TextXAlignment = Enum.TextXAlignment.Left
  286.  
  287. Song12 = Instance.new("Sound")
  288.     Song12.Name = "Song"
  289.     Song12.Parent = s12
  290.     Song12.SoundId = rbxassetbeguin .. "1015394"
  291.     Song12.Volume = 1
  292.  
  293. s13 = Instance.new("TextButton")
  294.     s13.Name = "s13"
  295.     s13.Parent = Songs
  296.     s13.Position = UDim2.new(0, 0, 0, 240)
  297.     s13.Size = UDim2.new(1, 0, 0, 20)
  298.     s13.Style = Enum.ButtonStyle.RobloxButton
  299.     s13.AutoButtonColor = false
  300.     s13.Font = Enum.Font.ArialBold
  301.     s13.FontSize = Enum.FontSize.Size14
  302.     s13.Text = "Woman King"
  303.     s13.TextColor = BrickColor.new("Institutional white")
  304.     s13.TextXAlignment = Enum.TextXAlignment.Left
  305.  
  306. Song13 = Instance.new("Sound")
  307.     Song13.Name = "Song"
  308.     Song13.Parent = s13
  309.     Song13.SoundId = rbxassetbeguin .. "5986151"
  310.     Song13.Volume = 1
  311.  
  312. s14 = Instance.new("TextButton")
  313.     s14.Name = "s14"
  314.     s14.Parent = Songs
  315.     s14.Position = UDim2.new(0, 0, 0, 260)
  316.     s14.Size = UDim2.new(1, 0, 0, 20)
  317.     s14.Style = Enum.ButtonStyle.RobloxButton
  318.     s14.AutoButtonColor = false
  319.     s14.Font = Enum.Font.ArialBold
  320.     s14.FontSize = Enum.FontSize.Size14
  321.     s14.Text = "DOTR"
  322.     s14.TextColor = BrickColor.new("Institutional white")
  323.     s14.TextXAlignment = Enum.TextXAlignment.Left
  324.  
  325. Song14 = Instance.new("Sound")
  326.     Song14.Name = "Song"
  327.     Song14.Parent = s14
  328.     Song14.SoundId = rbxassetbeguin .. "11420922"
  329.     Song14.Volume = 1
  330.  
  331. s15 = Instance.new("TextButton")
  332.     s15.Name = "s15"
  333.     s15.Parent = Songs
  334.     s15.Position = UDim2.new(0, 0, 0, 280)
  335.     s15.Size = UDim2.new(1, 0, 0, 20)
  336.     s15.Style = Enum.ButtonStyle.RobloxButton
  337.     s15.AutoButtonColor = false
  338.     s15.Font = Enum.Font.ArialBold
  339.     s15.FontSize = Enum.FontSize.Size14
  340.     s15.Text = "Entertainer"
  341.     s15.TextColor = BrickColor.new("Institutional white")
  342.     s15.TextXAlignment = Enum.TextXAlignment.Left
  343.  
  344. Song15 = Instance.new("Sound")
  345.     Song15.Name = "Song"
  346.     Song15.Parent = s15
  347.     Song15.Pitch = 1.2000000476837
  348.     Song15.SoundId = rbxassetbeguin .. "27697267"
  349.     Song15.Volume = 1
  350.  
  351. s16 = Instance.new("TextButton")
  352.     s16.Name = "s16"
  353.     s16.Parent = Songs
  354.     s16.Position = UDim2.new(0, 0, 0, 300)
  355.     s16.Size = UDim2.new(1, 0, 0, 20)
  356.     s16.Style = Enum.ButtonStyle.RobloxButton
  357.     s16.AutoButtonColor = false
  358.     s16.Font = Enum.Font.ArialBold
  359.     s16.FontSize = Enum.FontSize.Size14
  360.     s16.Text = "Foggy Moutain"
  361.     s16.TextColor = BrickColor.new("Institutional white")
  362.     s16.TextXAlignment = Enum.TextXAlignment.Left
  363.  
  364. Song16 = Instance.new("Sound")
  365.     Song16.Name = "Song"
  366.     Song16.Parent = s16
  367.     Song16.SoundId = rbxassetbeguin .. "27697298"
  368.     Song16.Volume = 1
  369.  
  370. s17 = Instance.new("TextButton")
  371.     s17.Name = "s17"
  372.     s17.Parent = Songs
  373.     s17.Position = UDim2.new(0, 0, 0, 320)
  374.     s17.Size = UDim2.new(1, 0, 0, 20)
  375.     s17.Style = Enum.ButtonStyle.RobloxButton
  376.     s17.AutoButtonColor = false
  377.     s17.Font = Enum.Font.ArialBold
  378.     s17.FontSize = Enum.FontSize.Size14
  379.     s17.Text = "TOPW"
  380.     s17.TextColor = BrickColor.new("Institutional white")
  381.     s17.TextXAlignment = Enum.TextXAlignment.Left
  382.  
  383. Song17 = Instance.new("Sound")
  384.     Song17.Name = "Song"
  385.     Song17.Parent = s17
  386.     Song17.SoundId = rbxassetbeguin .. "11420933"
  387.     Song17.Volume = 1
  388.  
  389. s18 = Instance.new("TextButton")
  390.     s18.Name = "s18"
  391.     s18.Parent = Songs
  392.     s18.Position = UDim2.new(0, 0, 0, 340)
  393.     s18.Size = UDim2.new(1, 0, 0, 20)
  394.     s18.Style = Enum.ButtonStyle.RobloxButton
  395.     s18.AutoButtonColor = false
  396.     s18.Font = Enum.Font.ArialBold
  397.     s18.FontSize = Enum.FontSize.Size14
  398.     s18.Text = "Chrono Trigger - The BEST music on a cartage in the WORLD!!!"
  399.     s18.TextColor = BrickColor.new("Institutional white")
  400.     s18.TextXAlignment = Enum.TextXAlignment.Left
  401.  
  402. Song18 = Instance.new("Sound")
  403.     Song18.Name = "Song"
  404.     Song18.Parent = s18
  405.     Song18.SoundId = rbxassetbeguin .. "1280463"
  406.     Song18.Volume = 1
  407.  
  408. Volume = Instance.new("Frame")
  409.     Volume.Name = "Volume"
  410.     Volume.Parent = MusicPlayer
  411.     Volume.Position = UDim2.new(0.89999997615814, -75, 1, -16)
  412.     Volume.Size = UDim2.new(0, 75, 0, 2)
  413.     Volume.BackgroundColor = BrickColor.new("Institutional white")
  414.     Volume.BorderColor = BrickColor.new("Institutional white")
  415.     Volume.BorderSizePixel = 0
  416.  
  417. Current = Instance.new("TextButton")
  418.     Current.Name = "Current"
  419.     Current.Parent = Volume
  420.     Current.Position = UDim2.new(1, -3, 0, -15)
  421.     Current.Size = UDim2.new(0, 6, 0, 30)
  422.     Current.BackgroundColor = BrickColor.new("Really red")
  423.     Current.BorderColor = BrickColor.new("Institutional white")
  424.     Current.ZIndex = 2
  425.     Current.Text = ""
  426.     Current.TextColor = BrickColor.new("Institutional white")
  427.  
  428. MouseArea = Instance.new("Frame")
  429.     MouseArea.Name = "MouseArea"
  430.     MouseArea.Parent = Volume
  431.     MouseArea.Position = UDim2.new(0, -10, 0, -15)
  432.     MouseArea.Size = UDim2.new(1, 20, 1, 30)
  433.     MouseArea.BackgroundTransparency = 1
  434.     MouseArea.Transparency = 1
  435.  
  436. Vol = Instance.new("NumberValue")
  437.     Vol.Name = "Vol"
  438.     Vol.Parent = Volume
  439.     Vol.Value = 1
  440.  
  441. Title2 = Instance.new("TextLabel")
  442.     Title2.Name = "Title"
  443.     Title2.Parent = Volume
  444.     Title2.Position = UDim2.new(0.5, 0, 5, 0)
  445.     Title2.ZIndex = 3
  446.     Title2.Font = Enum.Font.ArialBold
  447.     Title2.FontSize = Enum.FontSize.Size12
  448.     Title2.Text = "Volume"
  449.     Title2.TextColor = BrickColor.new("Institutional white")
  450. --[[
  451. Collapse = Instance.new("TextButton")
  452.     Collapse.Name = "Collapse"
  453.     Collapse.Parent = MusicPlayer
  454.     Collapse.Position = UDim2.new(1, 0, 0, -6)
  455.     Collapse.Size = UDim2.new(0, -32, 0, 16)
  456.     Collapse.Style = Enum.ButtonStyle.RobloxButton
  457.     Collapse.Font = Enum.Font.ArialBold
  458.     Collapse.FontSize = Enum.FontSize.Size12
  459.     Collapse.Text = "<<"
  460.     Collapse.TextColor = BrickColor.new("Institutional white")
  461. --]]
  462. MusicGui.Parent = game:GetService("CoreGui")
  463. end
  464. makegui()
  465.  
  466. local songs = {}
  467. local selected = {button=nil;song=nil}
  468. local playing = {button=nil;song=nil}
  469. local playB = MusicPlayer.Play
  470. local volume = MusicPlayer.Volume
  471.  
  472. --local player = game.Players.LocalPlayer
  473.  
  474. function getSongs()
  475.     for _,v in pairs(MusicPlayer.Songs:GetChildren()) do
  476.         table.insert(songs,{button=v;song=v.Song})
  477.     end
  478. end
  479.  
  480. function openCloseGui()
  481.     if (cur == 0) then return
  482.     elseif (cur == 1) then
  483.         cur = 0
  484.         for i = 10,-MusicPlayer.AbsoluteSize.x,-20 do
  485.             MusicPlayer.Position = UDim2.new(0,i,MusicPlayer.Position.Y.Scale,MusicPlayer.Position.Y.Offset)
  486.             wait()
  487.         end
  488.         MusicPlayer.Position = UDim2.new(0,-MusicPlayer.AbsoluteSize.x,MusicPlayer.Position.Y.Scale,MusicPlayer.Position.Y.Offset)
  489.         cur = -1
  490.     else
  491.         cur = 0
  492.         for i = -MusicPlayer.AbsoluteSize.x,10,20 do
  493.             MusicPlayer.Position = UDim2.new(0,i,MusicPlayer.Position.Y.Scale,MusicPlayer.Position.Y.Offset)
  494.             wait()
  495.         end
  496.         MusicPlayer.Position = UDim2.new(0,10,MusicPlayer.Position.Y.Scale,MusicPlayer.Position.Y.Offset)
  497.         cur = 1
  498.     end
  499.  
  500. end
  501.  
  502. function setup()
  503.     for _,data0 in pairs(songs) do
  504.         data0.button.MouseButton1Click:connect(function()
  505.             for _,data1 in pairs(songs) do
  506.                 data1.button.Style = 2
  507.             end
  508.             if (selected.button == data0.button) then
  509.                 selected.button,selected.song = nil,nil
  510.                 playB.Active = false
  511.                 playB.Text = ""
  512.             else
  513.                 selected.button,selected.song = data0.button,data0.song
  514.                 playB.Active = true
  515.                 playB.Text = (playing.button == data0.button and "STOP" or "PLAY")
  516.                 data0.button.Style = 1
  517.             end
  518.         end)
  519.     end
  520.     local function red(b)
  521.         delay(0,function()
  522.             for i = 1,0,-0.1 do
  523.                 b.TextColor3 = Color3.new((0.6+(i*0.4)),i,i)
  524.                 wait()
  525.             end
  526.             b.TextColor3 = Color3.new(0.6,0,0)
  527.         end)
  528.     end
  529.     local function white(b)
  530.         delay(0,function()
  531.             for i = 0,1,0.1 do
  532.                 b.TextColor3 = Color3.new((0.6+(i*0.4)),i,i)
  533.                 wait()
  534.             end
  535.             b.TextColor3 = Color3.new(1,1,1)
  536.         end)
  537.     end
  538.     playB.MouseButton1Click:connect(function()
  539.         if (not playB.Active) then return end
  540.         if (selected.button ~= playing.button) then
  541.             if (playing.song) then playing.song:stop() end
  542.             if (playing.button) then white(playing.button) end
  543.             playing.button,playing.song = nil,nil
  544.         end
  545.         if (playing.button) then
  546.             playing.song:stop()
  547.             white(playing.button)
  548.             playing.button,playing.song = nil,nil
  549.             playB.Text = "PLAY"
  550.         elseif (selected.button) then
  551.             playing.button,playing.song = selected.button,selected.song
  552.             playing.song:play()
  553.             red(playing.button)
  554.             playB.Text = "STOP"
  555.         end
  556.     end)
  557.     volume.Vol.Changed:connect(function()
  558.         for _,data in pairs(songs) do
  559.             data.song.Volume = volume.Vol.Value
  560.         end
  561.     end)
  562.     local drag = false
  563.     local function setCur(x)
  564.         if (not drag) then return end
  565.         local Start = volume.AbsolutePosition.x
  566.         local End = (volume.AbsolutePosition.x+volume.AbsoluteSize.x)
  567.         local full = (End-Start)
  568.         local cur = (x-Start)
  569.         local ratio = (cur/full)
  570.         ratio = (ratio < 0.05 and 0 or ratio > 0.95 and 1 or ratio)
  571.         volume.Current.Position = UDim2.new(ratio,-3,0,-15)
  572.         volume.Vol.Value = ratio
  573.     end
  574.     local cur = 1
  575.     bttn.Click:connect(function()
  576.         openCloseGui()
  577.     end)
  578.     volume.Current.MouseButton1Down:connect(function(x) drag = true setCur(x) end)
  579.     volume.Current.MouseButton1Up:connect(function() drag = false end)
  580.     volume.Current.MouseMoved:connect(function(x) setCur(x) end)
  581.     volume.MouseArea.MouseMoved:connect(function(x) setCur(x) end)
  582.     volume.MouseArea.MouseLeave:connect(function() drag = false end)
  583. end
  584.  
  585. getSongs()
  586. setup()
  587. openCloseGui()
  588. openCloseGui()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement