Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scrgui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
- --
- sound = Instance.new("Sound",scrgui)
- --
- fr1 = Instance.new("Frame",scrgui)
- fr1tl1 = Instance.new("TextLabel",fr1)
- --
- fr4 = Instance.new("Frame",fr1)
- fr4tb1 = Instance.new("TextButton",fr4)
- --
- fr2 = Instance.new("Frame",fr1)
- fr2tb1 = Instance.new("TextBox",fr2)
- fr2tl1 = Instance.new("TextLabel",fr2)
- fr2tl2 = Instance.new("TextLabel",fr2)
- vslz = Instance.new("Frame",fr2)
- fr2tl3 = Instance.new("TextLabel",fr2)
- --
- fr3 = Instance.new("Frame",fr2)
- fr3tl1 = Instance.new("TextLabel",fr3)
- fr3tl2 = Instance.new("TextLabel",fr3)
- fr3tl2tb1 = Instance.new("TextButton",fr3tl2)
- fr3tl3 = Instance.new("TextLabel",fr3)
- fr3tl3tb1 = Instance.new("TextBox",fr3tl3)
- fr3tb1 = Instance.new("TextButton",fr3)
- --
- scrf = Instance.new("ScrollingFrame",fr2)
- looped = false
- function clr(num1, num2, num3) --color3 converter function
- local color1 = num1/255
- local color2 = num2/255
- local color3 = num3/255
- return Color3.new(color1, color2, color3)
- end
- textcolor = clr(255,255,255)
- textcolor2 = clr(0,0,0)
- --music
- local music = { --25
- "467369212",
- "492272696",
- "561274893",
- "461736208",
- "438917260",
- "453400361",
- "399781334",
- "413625451",
- "259455471",
- "257201201",
- "526008067",
- "153710433",
- "300036856",
- "209314579",
- "179667611",
- "320341182",
- "162068260",
- "328474897",
- "236181263",
- "476664237",
- "144026962",
- "291317957",
- "458526475",
- "408844261",
- "495007399"
- }
- local musicnames = {
- "The Chainsmokers - Closer",
- "Rae Sremmurd - Black Beatles",
- "The Weeknd - Starboy",
- "Major Lazer - Cold Water",
- "twenty one pilots - Heathens",
- "Marshmello - Keep it Mello",
- "Drake - One Dance",
- "Marshmello - Alone",
- "twenty one pilots - Ride",
- "Timmy Trumpet - Freaks",
- "Bruno Mars - 24K Magic",
- "Linkin Park - Castle of Glass",
- "Linkin Park - Faint",
- "Spag Heddy - The Master (VIP)",
- "Spag Heddy - Pink Koeks",
- "Bastille - Pompeii",
- "Attila - Rage",
- "Major Lazer - Lean On",
- "Rockstar North - Welcome to Los Santos",
- "Rockstar North - Grand Theft Auto IV",
- "Rockstar North - San Andreas Theme",
- "Rockstar San Diego - Far Away",
- "The Chainsmokers - Don't Let Me Down (W&W Remix)",
- "WiDE AWAKE - Love Me",
- "Various Artists - Sucker For Pain"
- }
- --name
- fr1.Name = "fr1"
- fr1tl1.Name = "fr1tl1"
- fr4.Name = "fr4"
- fr4tb1.Name = "fr4tb1"
- fr2.Name = "fr2"
- fr2tb1.Name = "fr2tb1"
- fr2tl1.Name = "fr2tl1"
- fr2tl2.Name = "fr2tl2"
- fr3.Name = "fr3"
- fr3tl1.Name = "fr3tl1"
- fr3tl2.Name = "fr3tl2"
- fr3tl2tb1.Name = "fr3tl2tb1"
- fr3tl3.Name = "fr3tl3"
- fr3tl3tb1.Name = "fr3tl3tb1"
- scrf.Name = "scrf"
- vslz.Name = "vslz"
- fr3tb1.Name = "fr3tb1"
- fr2tl3.Name = "fr2tl3"
- --create preset music tabs
- for i=1,#musicnames do
- local sbc = Instance.new("TextButton",scrf)
- sbc.Name = i
- sbc.Size = UDim2.new(1, 0,0, 25)
- sbc.Position = UDim2.new(0, 0, 0, (i*25)-25)
- sbc.BorderSizePixel = 0
- sbc.BackgroundColor3 = clr(143, 121, 32)
- sbc.Font = "SourceSansBold"
- sbc.FontSize = "Size18"
- sbc.TextColor3 = textcolor
- sbc.TextWrapped = true
- sbc.Text = musicnames[i]
- sbc.AutoButtonColor = false
- if (i % 2 == 0) then
- sbc.BackgroundTransparency = 0.7
- else
- sbc.BackgroundTransparency = 0.3
- end
- sbc.MouseButton1Click:connect(function()
- sound.SoundId = "rbxassetid://"..music[i]
- sound:Play()
- fr2tl2.Text = "Now Playing: "..musicnames[i]
- end)
- end
- --backgroundcolor3
- fr1.BackgroundColor3 = clr(236, 240, 241)
- fr1tl1.BackgroundColor3 = clr(44, 62, 80)
- fr4.BackgroundColor3 = clr(231, 76, 60)
- fr4tb1.BackgroundColor3 = clr(231, 76, 60)
- fr2.BackgroundColor3 = clr(200, 167, 0)
- fr2tb1.BackgroundColor3 = clr(236, 240, 241)
- fr2tl1.BackgroundColor3 = clr(255, 255, 255)
- fr2tl2.BackgroundColor3 = clr(200, 167, 0)
- fr3.BackgroundColor3 = clr(177, 134, 4)
- fr3tl1.BackgroundColor3 = clr(255, 255, 255)
- fr3tl2.BackgroundColor3 = clr(255, 255, 255)
- fr3tl2tb1.BackgroundColor3 = clr(236, 240, 241)
- fr3tl3.BackgroundColor3 = clr(255, 255, 255)
- fr3tl3tb1.BackgroundColor3 = clr(236, 240, 241)
- scrf.BackgroundColor3 = clr(177, 134, 4)
- vslz.BackgroundColor3 = clr(177, 134, 4)
- fr3tb1.BackgroundColor3 = clr(177, 134, 4)
- --backgroundtransparency
- fr1.BackgroundTransparency = 0.3
- fr1tl1.BackgroundTransparency = 1
- fr4.BackgroundTransparency = 0.3
- fr4tb1.BackgroundTransparency = 1
- fr2.BackgroundTransparency = 0.3
- fr2tb1.BackgroundTransparency = 0
- fr2tl1.BackgroundTransparency = 1
- fr2tl2.BackgroundTransparency = 0.3
- fr3.BackgroundTransparency = 0.6
- fr3tl1.BackgroundTransparency = 1
- fr3tl2.BackgroundTransparency = 1
- fr3tl2tb1.BackgroundTransparency = 0
- fr3tl3.BackgroundTransparency = 1
- fr3tl3tb1.BackgroundTransparency = 0
- scrf.BackgroundTransparency = 0.6
- vslz.BackgroundTransparency = 0.6
- fr3tb1.BackgroundTransparency = 0.6
- fr2tl3.BackgroundTransparency = 1
- --bordersizepixel
- fr1.BorderSizePixel = 0
- fr1tl1.BorderSizePixel = 0
- fr4.BorderSizePixel = 0
- fr4tb1.BorderSizePixel = 0
- fr2.BorderSizePixel = 0
- fr2tb1.BorderSizePixel = 0
- fr2tl1.BorderSizePixel = 0
- fr2tl2.BorderSizePixel = 0
- fr3.BorderSizePixel = 0
- fr3tl1.BorderSizePixel = 0
- fr3tl2.BorderSizePixel = 0
- fr3tl2tb1.BorderSizePixel = 0
- fr3tl3.BorderSizePixel = 0
- fr3tl3tb1.BorderSizePixel = 0
- scrf.BorderSizePixel = 0
- vslz.BorderSizePixel = 0
- fr3tb1.BorderSizePixel = 0
- fr2tl3.BorderSizePixel = 0
- --position
- fr1.Position = UDim2.new(0, 42,0, 250)
- fr1tl1.Position = UDim2.new(0.5, -1,0.5, -2)
- fr4.Position = UDim2.new(1, -23,0, 2)
- fr4tb1.Position = UDim2.new(0, 0,0, -1)
- fr2.Position = UDim2.new(0, 0,0, 25)
- fr2tb1.Position = UDim2.new(1, -135,0, 40)
- fr2tl1.Position = UDim2.new(1, -175,0, 0)
- fr2tl2.Position = UDim2.new(0, 0, 1, 0)
- fr3.Position = UDim2.new(1, -135,0, 75)
- fr3tl1.Position = UDim2.new(0, 0,0, 0)
- fr3tl2.Position = UDim2.new(0, 4,0, 30)
- fr3tl2tb1.Position = UDim2.new(1, -15,0.5, -5)
- fr3tl3.Position = UDim2.new(0, 4,0, 50)
- fr3tl3tb1.Position = UDim2.new(1, -15,0.5, -5)
- scrf.Position = UDim2.new(0, 5,0, 5)
- vslz.Position = UDim2.new(0, 317,0, 175)
- fr3tb1.Position = UDim2.new(0, 2, 0, 252)
- fr2tl3.Position = UDim2.new(0, 315, 1, 8)
- --size
- fr1.Size = UDim2.new(0, 450,0, 25)
- fr1tl1.Size = UDim2.new(0, 1,0, 1)
- fr4.Size = UDim2.new(0, 21,0, 21)
- fr4tb1.Size = UDim2.new(0, 21,0, 21)
- fr2.Size = UDim2.new(0, 450,0, 350)
- fr2tb1.Size = UDim2.new(0, 125,0, 25)
- fr2tl1.Size = UDim2.new(0, 200,0, 50)
- fr2tl2.Size = UDim2.new(1, 0, 0, 35)
- fr3.Size = UDim2.new(0, 125,0, 75)
- fr3tl1.Size = UDim2.new(1, 0,0, 20)
- fr3tl2.Size = UDim2.new(1, -8,0, 20)
- fr3tl2tb1.Size = UDim2.new(0, 15,0, 15)
- fr3tl3.Size = UDim2.new(1, -8,0, 20)
- fr3tl3tb1.Size = UDim2.new(0, 15,0, 15)
- scrf.Size = UDim2.new(0, 300,1, -10)
- scrf.CanvasSize = UDim2.new(0, 0, 0, 750)
- scrf.ScrollBarThickness = 4
- vslz.Size = UDim2.new(0, 122, 0, 150)
- fr3tb1.Size = UDim2.new(0, 122, 0, 22)
- fr2tl3.Size = UDim2.new(0.35, 0, 0, 35)
- --text
- fr3tl1.Text = "Settings"
- fr3tl2.Text = "Looped"
- fr3tl3.Text = "Volume (0.1-10)"
- fr3tl2tb1.Text = ""
- fr3tl3tb1.Text = ""
- fr2tb1.Text = "Music ID"
- fr2tl1.Text = "Or, enter your own..."
- fr2tl2.Text = "Nothing is playing."
- fr1tl1.Text = "Lines v1.1"
- fr4tb1.Text = "X"
- fr3tb1.Text = "Stop Music"
- fr2tl3.Text = "Beta v1.1 by new_line"
- --textcolor
- fr3tl1.TextColor3 = textcolor
- fr3tl2.TextColor3 = textcolor
- fr3tl3.TextColor3 = textcolor
- fr3tl2tb1.TextColor3 = textcolor
- fr3tl3tb1.TextColor3 = textcolor2
- fr2tb1.TextColor3 = textcolor2
- fr2tl1.TextColor3 = textcolor
- fr2tl2.TextColor3 = textcolor
- fr1tl1.TextColor3 = textcolor2
- fr4tb1.TextColor3 = textcolor
- fr3tb1.TextColor3 = textcolor
- fr2tl3.TextColor3 = textcolor
- --fontsize
- fr3tl1.FontSize = "Size14"
- fr3tl2.FontSize = "Size18"
- fr3tl3.FontSize = "Size18"
- fr3tl2tb1.FontSize = "Size14"
- fr3tl3tb1.FontSize = "Size14"
- fr2tb1.FontSize = "Size14"
- fr2tl1.FontSize = "Size18"
- fr2tl2.FontSize = "Size18"
- fr1tl1.FontSize = "Size32"
- fr4tb1.FontSize = "Size14"
- fr4tb1.TextScaled = true
- fr3tb1.FontSize = "Size14"
- fr2tl3.FontSize = "Size14"
- --font
- fr3tl1.Font = "SourceSansItalic"
- fr3tl2.Font = "SourceSansLight"
- fr3tl3.Font = "SourceSansLight"
- fr3tl2tb1.Font = "SourceSans"
- fr3tl3tb1.Font = "SourceSans"
- fr2tb1.Font = "SourceSans"
- fr2tl1.Font = "SourceSansItalic"
- fr2tl2.Font = "SourceSansItalic"
- fr2tl3.Font = "SourceSansItalic"
- fr1tl1.Font = "SourceSansLight"
- fr4tb1.Font = "SourceSansBold"
- fr3tb1.Font = "SourceSansLight"
- fr2tl2.TextWrapped = true
- fr3tl2.TextXAlignment = "Left"
- fr3tl3.TextXAlignment = "Left"
- fr3tl2tb1.MouseButton1Click:connect(function()
- if not looped then
- looped = true
- sound.Looped = true
- fr3tl2tb1.BackgroundColor3 = clr(178, 180, 181)
- else
- looped = false
- sound.Looped = false
- fr3tl2tb1.BackgroundColor3 = clr(236, 240, 241)
- end
- end)
- fr3tl3tb1.FocusLost:connect(function()
- if tonumber(fr3tl3tb1.Text) < 11 and tonumber(fr3tl3tb1.Text) >= 0.1 then
- sound.Volume = fr3tl3tb1.Text
- fr3tl3tb1.Text = ""
- end
- end)
- fr2tb1.FocusLost:connect(function()
- local custom = game:GetService("MarketplaceService"):GetProductInfo(fr2tb1.Text)
- if custom.AssetTypeId == 3 then
- fr2tl2.Text = "Now Playing: "..custom.Name
- sound.SoundId = "rbxassetid://"..fr2tb1.Text
- sound:Play()
- else
- fr2tl2.Text = "Invalid ID: "..fr2tb1.Text
- end
- end)
- fr3tb1.MouseButton1Click:connect(function()
- for i, v in next,vslz:GetChildren() do
- v:TweenSize(UDim2.new(0, 2, 0, 1), "Out", "Quad", .2, true)
- end
- sound.SoundId = 0
- fr2tl2.Text = "Nothing is playing."
- end)
- fr1.Draggable = true
- fr1.Active = true
- for a=1,39 do
- local vsb = Instance.new("Frame",vslz)
- vsb.Name = "vsb"..a-1
- vsb.Size = UDim2.new(0,2,0,1)
- vsb.Position = UDim2.new(0,(a*3)-1,1,0)
- vsb.BackgroundColor3 = clr(255, 255, 255)
- vsb.BackgroundTransparency = 0.6
- vsb.BorderSizePixel = 0
- vsb.AnchorPoint = Vector2.new(0,1)
- end
- local Bars = {}
- for i,v in next,vslz:GetChildren() do
- table.insert(Bars, v)
- end
- Height = 148
- local nBars,Tweens=#Bars-1,{}
- local function quadIn(t,b,c,d) t=t/d; return c*t*t+b; end;
- local function quadOut(t,b,c,d) t=t/d; return -c*t*(t-2)+b; end;
- local function Quad(obj,val,ease,d)
- local t,f,con,nt,st,sd=tick()
- Tweens[obj]=t -- Set identifier
- st=obj.Size.Y.Offset -- Start Value
- sd=val-st -- Change in Value
- f=ease=='In' and quadIn or quadOut -- Choose between Out/In
- con=game:GetService'RunService'.RenderStepped:connect(function() nt=tick()-t
- if Tweens[obj]~=t then -- Check for override
- con:disconnect()
- return
- end
- local nv=math.max(.2,f(math.min(d,nt),st,sd,d)) -- New Value
- obj.Size=UDim2.new(0, 2, 0, nv)
- if nt>d then -- Easing done?
- con:disconnect()
- if ease~='In' then
- Quad(obj,.2,'In',.3) -- Drop the bar
- end
- end
- end)
- end
- local function CheckSet(N,S,D) -- Number, Scale, Direction
- local nS=vslz["vsb"..tostring(N)].Size.Y.Offset
- if S>nS then
- Set(N,nS+(S-nS)/3,D)
- end
- end
- function Set(N,S,D) -- Number, Scale, Direction
- Quad(vslz["vsb"..tostring(N)],S,'Out',.1)
- if N>0 and D~=1 then -- Checks left for smaller bars to manipulate
- CheckSet(N-1,S,-1)
- end
- if N<nBars and D~=-1 then -- Checks right...
- CheckSet(N+1,S,1)
- end
- end
- -- RENDER LOOP --
- local MPL,PL,curr=0 curr=sound.SoundId
- game:service'RunService'.RenderStepped:connect(function()
- PL=sound.PlaybackLoudness
- if sound.IsPlaying and PL==PL then -- Sound is playing & PlaybackLoudness is not undefined
- if curr~=sound.SoundId then MPL=0 -- Reset the relative Max PlaybackLoudness on song change
- curr=sound.SoundId
- end
- MPL=math.max(PL,MPL) PL=PL/MPL -- Normalize PL based on relative Max PlaybackLoudness
- if PL==PL then
- Set(math.floor(PL*nBars),PL*Height) -- Modify bar relative to PlaybackLoudness
- end
- end
- end)
Add Comment
Please, Sign In to add comment