Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local Visualiser = Instance.new("ScreenGui")
- local MainFrame = Instance.new("ImageLabel")
- local Display = Instance.new("ImageLabel")
- local Bars = Instance.new("Frame")
- local PaddingList = Instance.new("UIListLayout")
- local Recommended = Instance.new("ScrollingFrame")
- local MainBar = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local UIListLayout = Instance.new("UIListLayout")
- local Recent = Instance.new("ScrollingFrame")
- local MainBar_2 = Instance.new("Frame")
- local TextLabel_2 = Instance.new("TextLabel")
- local UIListLayout_2 = Instance.new("UIListLayout")
- local Click = Instance.new("TextButton")
- local SongTitle = Instance.new("TextBox")
- local ProgressBar = Instance.new("Frame")
- local Frame = Instance.new("Frame")
- local CurrentSong = Instance.new("Sound")
- CurrentSong.Name = "CurrentSong"
- CurrentSong.Parent = Visualiser
- --Properties:
- Visualiser.Name = "Visualiser"
- Visualiser.Parent = game:GetService("CoreGui")
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = Visualiser
- MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- MainFrame.BackgroundTransparency = 1.000
- MainFrame.Position = UDim2.new(0.314074069, 0, 0.377811104, 0)
- MainFrame.Size = UDim2.new(0, 400, 0, 200)
- MainFrame.Image = "rbxassetid://3570695787"
- MainFrame.ImageColor3 = Color3.fromRGB(50, 50, 50)
- MainFrame.ScaleType = Enum.ScaleType.Slice
- MainFrame.SliceCenter = Rect.new(100, 100, 100, 100)
- MainFrame.SliceScale = 0.040
- Display.Name = "Display"
- Display.Parent = MainFrame
- Display.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Display.BackgroundTransparency = 1.000
- Display.Position = UDim2.new(0, 2, 0, 2)
- Display.Size = UDim2.new(1, -4, 1, -4)
- Display.Image = "rbxassetid://3570695787"
- Display.ImageColor3 = Color3.fromRGB(30, 30, 30)
- Display.ScaleType = Enum.ScaleType.Slice
- Display.SliceCenter = Rect.new(100, 100, 100, 100)
- Display.SliceScale = 0.040
- Bars.Name = "Bars"
- Bars.Parent = Display
- Bars.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Bars.BackgroundTransparency = 1.000
- Bars.Position = UDim2.new(0, 10, 0, 10)
- Bars.Size = UDim2.new(1, -20, 0, 40)
- PaddingList.Name = "PaddingList"
- PaddingList.Parent = Bars
- PaddingList.FillDirection = Enum.FillDirection.Horizontal
- PaddingList.SortOrder = Enum.SortOrder.LayoutOrder
- PaddingList.VerticalAlignment = Enum.VerticalAlignment.Bottom
- Recommended.Name = "Recommended"
- Recommended.Parent = Display
- Recommended.Active = true
- Recommended.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Recommended.BackgroundTransparency = 1.000
- Recommended.BorderSizePixel = 0
- Recommended.Position = UDim2.new(0, 10, 1, -100)
- Recommended.Size = UDim2.new(0.5, -10, 0, 90)
- Recommended.BottomImage = "http://www.roblox.com/asset/?id=4812947"
- Recommended.CanvasSize = UDim2.new(0, 0, 1, 0)
- Recommended.MidImage = "http://www.roblox.com/asset/?id=4812947"
- Recommended.ScrollBarThickness = 0
- Recommended.TopImage = "http://www.roblox.com/asset/?id=4812947"
- MainBar.Name = "MainBar"
- MainBar.Parent = Recommended
- MainBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- MainBar.BorderSizePixel = 0
- MainBar.Size = UDim2.new(1, 0, 0, 20)
- TextLabel.Parent = MainBar
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Size = UDim2.new(1, 0, 1, 0)
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Text = "Recommended"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 16.000
- UIListLayout.Parent = Recommended
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- Recent.Name = "Recent"
- Recent.Parent = Display
- Recent.Active = true
- Recent.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Recent.BackgroundTransparency = 1.000
- Recent.BorderSizePixel = 0
- Recent.Position = UDim2.new(0.5, 0, 1, -100)
- Recent.Size = UDim2.new(0.5, -10, 0, 90)
- Recent.BottomImage = "http://www.roblox.com/asset/?id=4812947"
- Recent.CanvasSize = UDim2.new(0, 0, 1, 0)
- Recent.MidImage = "http://www.roblox.com/asset/?id=4812947"
- Recent.ScrollBarThickness = 0
- Recent.TopImage = "http://www.roblox.com/asset/?id=4812947"
- MainBar_2.Name = "MainBar"
- MainBar_2.Parent = Recent
- MainBar_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- MainBar_2.BorderSizePixel = 0
- MainBar_2.Size = UDim2.new(1, 0, 0, 20)
- TextLabel_2.Parent = MainBar_2
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Size = UDim2.new(1, 0, 1, 0)
- TextLabel_2.Font = Enum.Font.SourceSansBold
- TextLabel_2.Text = "Recently Played"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 16.000
- UIListLayout_2.Parent = Recent
- UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- Click.Name = "Click"
- Click.Parent = Display
- Click.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Click.BackgroundTransparency = 1.000
- Click.Size = UDim2.new(1, 0, 0, 10)
- Click.Font = Enum.Font.SourceSans
- Click.Text = ""
- Click.TextColor3 = Color3.fromRGB(0, 0, 0)
- Click.TextSize = 14.000
- SongTitle.Name = "SongTitle"
- SongTitle.Parent = Display
- SongTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SongTitle.BackgroundTransparency = 1.000
- SongTitle.Position = UDim2.new(0, 0, 0, 50)
- SongTitle.Size = UDim2.new(1, 0, 0, 30)
- SongTitle.Font = Enum.Font.SourceSansBold
- SongTitle.Text = "nil"
- SongTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
- SongTitle.TextSize = 16.000
- ProgressBar.Name = "ProgressBar"
- ProgressBar.Parent = SongTitle
- ProgressBar.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- ProgressBar.BorderSizePixel = 0
- ProgressBar.Position = UDim2.new(0, 10, 1, 0)
- ProgressBar.Size = UDim2.new(1, -20, 0, 2)
- Frame.Parent = ProgressBar
- Frame.BackgroundColor3 = Color3.fromRGB(0, 255, 109)
- Frame.BorderSizePixel = 0
- Frame.Size = UDim2.new(0.5, 0, 1, 0)
- -- Scripts:
- local function PUWBAAI_fake_script() -- Bars.InitScript
- local script = Instance.new('LocalScript', Bars)
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local amount = script.Parent.AbsoluteSize.X / 4
- local sensitivity = 800
- local padding = 2
- local waittime = 0.05
- local spaceleft = script.Parent.AbsoluteSize.X - (padding * amount)
- local sizeforeach = spaceleft / amount
- local bars = script.Parent
- local display = bars.Parent
- local songtitle = display.SongTitle
- local progressbar = songtitle.ProgressBar
- local progressframe = progressbar.Frame
- local mainframe = display.Parent
- local maingui = mainframe.Parent
- local song = maingui.CurrentSong
- local recommended = display.Recommended
- local recent = display.Recent
- local clickbutton = display.Click
- local userinput = game:GetService("UserInputService")
- local lastmx
- local lastmy
- clickbutton.MouseButton1Down:Connect(function()
- lastmx, lastmy = mouse.X, mouse.Y
- local move
- local kill
- move = mouse.Move:Connect(function()
- local newmx, newmy = mouse.X, mouse.Y
- local dx, dy = newmx - lastmx, newmy - lastmy
- mainframe.Position = mainframe.Position + UDim2.new(0,dx,0,dy)
- lastmx, lastmy = newmx, newmy
- end)
- kill = userinput.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- move:Disconnect()
- kill:Disconnect()
- end
- end)
- end)
- local runservice = game:GetService("RunService")
- script.Parent.PaddingList.Padding = UDim.new(0, padding)
- local marketplace = game:GetService("MarketplaceService")
- local http = game:GetService("HttpService")
- local tween = game:GetService("TweenService")
- for i = 1, amount + 1 do
- local nbar = Instance.new("Frame")
- nbar.BackgroundColor3 = Color3.fromRGB(0,255,109)
- nbar.BorderSizePixel = 0
- nbar.Size = UDim2.new(0,sizeforeach,0,1)
- nbar.Name = ("Bar"..tostring(i))
- nbar.LayoutOrder = i
- nbar.Parent = script.Parent
- end
- local function PascalCase(str)
- local t = str:split(" ")
- local build = {}
- for i,v in pairs(t) do
- local lower = v
- lower = lower:sub(1,1):upper() .. lower:sub(2)
- table.insert(build, lower)
- end
- return table.concat(build, " ")
- end
- function PlaySong(id)
- local assetid = id
- local info = marketplace:GetProductInfo(assetid)
- local recentID = recent:FindFirstChild(id)
- for i,v in pairs(recent:GetChildren()) do
- if v:IsA("Frame") and v.Name ~= "MainBar" then
- v.BackgroundTransparency = math.clamp(0.2 + (i * 0.05), 0, 0.5)
- v.LayoutOrder = 2 + i
- end
- end
- if recentID then
- recentID:Destroy()
- end
- local container = Instance.new("Frame")
- container.Name = id
- container.Size = UDim2.new(1,0,0,20)
- container.BackgroundColor3 = Color3.fromRGB(0,255,109)
- container.BackgroundTransparency = 0.2
- container.BorderSizePixel = 0
- container.LayoutOrder = 2
- container.Parent = recent
- local recentsong = Instance.new("TextButton")
- recentsong.Text = PascalCase(info.Name)
- recentsong.BackgroundTransparency = 1
- recentsong.Size = UDim2.new(1,0,1,0)
- recentsong.TextColor3 = Color3.fromRGB(30,30,30)
- recentsong.Font = Enum.Font.SourceSansBold
- recentsong.TextSize = 16
- recentsong.Parent = container
- recentsong.MouseButton1Down:Connect(function()
- PlaySong(assetid)
- end)
- song.SoundId = "rbxassetid://" .. tostring(assetid)
- song:Play()
- local getURL = game:HttpGet("https://catalog.roblox.com/v1/recommendations/asset/3?contextAssetId=3536304764&numItems=7")
- getURL = http:JSONDecode(getURL)
- getURL = getURL.data
- for i,v in pairs(recommended:GetChildren()) do
- if v:IsA("Frame") and v.Name ~= "MainBar" then
- v:Destroy()
- end
- end
- for i,v in next, getURL do
- local item = v.item
- local creator = v.creator
- local product = v.product
- local info2 = marketplace:GetProductInfo(item.assetId)
- local container2 = Instance.new("Frame")
- container2.Name = item.assetId
- container2.Size = UDim2.new(1,0,0,20)
- container2.BackgroundColor3 = Color3.fromRGB(0,255,109)
- container2.BackgroundTransparency = math.clamp(0.2 + (i * 0.05), 0, 0.5)
- container2.BorderSizePixel = 0
- container2.LayoutOrder = 2 + i
- container2.Parent = recommended
- local recentsong2 = Instance.new("TextButton")
- recentsong2.Text = PascalCase(info2.Name)
- recentsong2.BackgroundTransparency = 1
- recentsong2.Size = UDim2.new(1,0,1,0)
- recentsong2.TextColor3 = Color3.fromRGB(30,30,30)
- recentsong2.Font = Enum.Font.SourceSansBold
- recentsong2.TextSize = 16
- recentsong2.Parent = container2
- recentsong2.MouseButton1Down:Connect(function()
- PlaySong(item.assetId)
- end)
- end
- songtitle.Text = PascalCase(info.Name)
- end
- songtitle.FocusLost:Connect(function()
- PlaySong(songtitle.Text)
- end)
- spawn(function()
- runservice.RenderStepped:Connect(function()
- local volume = song.PlaybackLoudness
- local lastsize = math.clamp(volume / sensitivity, 0, 1)
- local ntofind = math.ceil((amount + 1) / 2)
- local excess = amount - tonumber(ntofind)
- local middlebar = script.Parent:FindFirstChild("Bar"..ntofind)
- local length = song.TimeLength
- local current = song.TimePosition
- local lengthscale = current / length
- progressframe.Size = UDim2.new(lengthscale,0,1,0)
- middlebar.Size = UDim2.new(0,sizeforeach,lastsize,0)
- for i = ntofind - 1, 1, -1 do
- local left = i
- local right = (amount + 1) - i + 1
- left = bars:FindFirstChild("Bar"..left)
- right = bars:FindFirstChild("Bar"..right)
- if left and right then
- local vscale = left.Size.Y.Scale
- left:TweenSize(UDim2.new(0,sizeforeach,lastsize,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, waittime, true)
- right:TweenSize(UDim2.new(0,sizeforeach,lastsize,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, waittime, true)
- lastsize = vscale
- end
- end
- end)
- end)
- PlaySong(3536304764)
- end
- coroutine.wrap(PUWBAAI_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement