Advertisement
XZTablets

Tune-In

Jul 5th, 2020
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.82 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local Visualiser = Instance.new("ScreenGui")
  7. local MainFrame = Instance.new("ImageLabel")
  8. local Display = Instance.new("ImageLabel")
  9. local Bars = Instance.new("Frame")
  10. local PaddingList = Instance.new("UIListLayout")
  11. local Recommended = Instance.new("ScrollingFrame")
  12. local MainBar = Instance.new("Frame")
  13. local TextLabel = Instance.new("TextLabel")
  14. local UIListLayout = Instance.new("UIListLayout")
  15. local Recent = Instance.new("ScrollingFrame")
  16. local MainBar_2 = Instance.new("Frame")
  17. local TextLabel_2 = Instance.new("TextLabel")
  18. local UIListLayout_2 = Instance.new("UIListLayout")
  19. local Click = Instance.new("TextButton")
  20. local SongTitle = Instance.new("TextBox")
  21. local ProgressBar = Instance.new("Frame")
  22. local Frame = Instance.new("Frame")
  23. local CurrentSong = Instance.new("Sound")
  24. CurrentSong.Name = "CurrentSong"
  25. CurrentSong.Parent = Visualiser
  26.  
  27. --Properties:
  28.  
  29. Visualiser.Name = "Visualiser"
  30. Visualiser.Parent = game:GetService("CoreGui")
  31.  
  32. MainFrame.Name = "MainFrame"
  33. MainFrame.Parent = Visualiser
  34. MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  35. MainFrame.BackgroundTransparency = 1.000
  36. MainFrame.Position = UDim2.new(0.314074069, 0, 0.377811104, 0)
  37. MainFrame.Size = UDim2.new(0, 400, 0, 200)
  38. MainFrame.Image = "rbxassetid://3570695787"
  39. MainFrame.ImageColor3 = Color3.fromRGB(50, 50, 50)
  40. MainFrame.ScaleType = Enum.ScaleType.Slice
  41. MainFrame.SliceCenter = Rect.new(100, 100, 100, 100)
  42. MainFrame.SliceScale = 0.040
  43.  
  44. Display.Name = "Display"
  45. Display.Parent = MainFrame
  46. Display.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  47. Display.BackgroundTransparency = 1.000
  48. Display.Position = UDim2.new(0, 2, 0, 2)
  49. Display.Size = UDim2.new(1, -4, 1, -4)
  50. Display.Image = "rbxassetid://3570695787"
  51. Display.ImageColor3 = Color3.fromRGB(30, 30, 30)
  52. Display.ScaleType = Enum.ScaleType.Slice
  53. Display.SliceCenter = Rect.new(100, 100, 100, 100)
  54. Display.SliceScale = 0.040
  55.  
  56. Bars.Name = "Bars"
  57. Bars.Parent = Display
  58. Bars.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59. Bars.BackgroundTransparency = 1.000
  60. Bars.Position = UDim2.new(0, 10, 0, 10)
  61. Bars.Size = UDim2.new(1, -20, 0, 40)
  62.  
  63. PaddingList.Name = "PaddingList"
  64. PaddingList.Parent = Bars
  65. PaddingList.FillDirection = Enum.FillDirection.Horizontal
  66. PaddingList.SortOrder = Enum.SortOrder.LayoutOrder
  67. PaddingList.VerticalAlignment = Enum.VerticalAlignment.Bottom
  68.  
  69. Recommended.Name = "Recommended"
  70. Recommended.Parent = Display
  71. Recommended.Active = true
  72. Recommended.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. Recommended.BackgroundTransparency = 1.000
  74. Recommended.BorderSizePixel = 0
  75. Recommended.Position = UDim2.new(0, 10, 1, -100)
  76. Recommended.Size = UDim2.new(0.5, -10, 0, 90)
  77. Recommended.BottomImage = "http://www.roblox.com/asset/?id=4812947"
  78. Recommended.CanvasSize = UDim2.new(0, 0, 1, 0)
  79. Recommended.MidImage = "http://www.roblox.com/asset/?id=4812947"
  80. Recommended.ScrollBarThickness = 0
  81. Recommended.TopImage = "http://www.roblox.com/asset/?id=4812947"
  82.  
  83. MainBar.Name = "MainBar"
  84. MainBar.Parent = Recommended
  85. MainBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  86. MainBar.BorderSizePixel = 0
  87. MainBar.Size = UDim2.new(1, 0, 0, 20)
  88.  
  89. TextLabel.Parent = MainBar
  90. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  91. TextLabel.BackgroundTransparency = 1.000
  92. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  93. TextLabel.Font = Enum.Font.SourceSansBold
  94. TextLabel.Text = "Recommended"
  95. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  96. TextLabel.TextSize = 16.000
  97.  
  98. UIListLayout.Parent = Recommended
  99. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  100.  
  101. Recent.Name = "Recent"
  102. Recent.Parent = Display
  103. Recent.Active = true
  104. Recent.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  105. Recent.BackgroundTransparency = 1.000
  106. Recent.BorderSizePixel = 0
  107. Recent.Position = UDim2.new(0.5, 0, 1, -100)
  108. Recent.Size = UDim2.new(0.5, -10, 0, 90)
  109. Recent.BottomImage = "http://www.roblox.com/asset/?id=4812947"
  110. Recent.CanvasSize = UDim2.new(0, 0, 1, 0)
  111. Recent.MidImage = "http://www.roblox.com/asset/?id=4812947"
  112. Recent.ScrollBarThickness = 0
  113. Recent.TopImage = "http://www.roblox.com/asset/?id=4812947"
  114.  
  115. MainBar_2.Name = "MainBar"
  116. MainBar_2.Parent = Recent
  117. MainBar_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  118. MainBar_2.BorderSizePixel = 0
  119. MainBar_2.Size = UDim2.new(1, 0, 0, 20)
  120.  
  121. TextLabel_2.Parent = MainBar_2
  122. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  123. TextLabel_2.BackgroundTransparency = 1.000
  124. TextLabel_2.Size = UDim2.new(1, 0, 1, 0)
  125. TextLabel_2.Font = Enum.Font.SourceSansBold
  126. TextLabel_2.Text = "Recently Played"
  127. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  128. TextLabel_2.TextSize = 16.000
  129.  
  130. UIListLayout_2.Parent = Recent
  131. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  132.  
  133. Click.Name = "Click"
  134. Click.Parent = Display
  135. Click.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  136. Click.BackgroundTransparency = 1.000
  137. Click.Size = UDim2.new(1, 0, 0, 10)
  138. Click.Font = Enum.Font.SourceSans
  139. Click.Text = ""
  140. Click.TextColor3 = Color3.fromRGB(0, 0, 0)
  141. Click.TextSize = 14.000
  142.  
  143. SongTitle.Name = "SongTitle"
  144. SongTitle.Parent = Display
  145. SongTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  146. SongTitle.BackgroundTransparency = 1.000
  147. SongTitle.Position = UDim2.new(0, 0, 0, 50)
  148. SongTitle.Size = UDim2.new(1, 0, 0, 30)
  149. SongTitle.Font = Enum.Font.SourceSansBold
  150. SongTitle.Text = "nil"
  151. SongTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  152. SongTitle.TextSize = 16.000
  153.  
  154. ProgressBar.Name = "ProgressBar"
  155. ProgressBar.Parent = SongTitle
  156. ProgressBar.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  157. ProgressBar.BorderSizePixel = 0
  158. ProgressBar.Position = UDim2.new(0, 10, 1, 0)
  159. ProgressBar.Size = UDim2.new(1, -20, 0, 2)
  160.  
  161. Frame.Parent = ProgressBar
  162. Frame.BackgroundColor3 = Color3.fromRGB(0, 255, 109)
  163. Frame.BorderSizePixel = 0
  164. Frame.Size = UDim2.new(0.5, 0, 1, 0)
  165.  
  166. -- Scripts:
  167.  
  168. local function PUWBAAI_fake_script() -- Bars.InitScript
  169. local script = Instance.new('LocalScript', Bars)
  170.  
  171. local player = game.Players.LocalPlayer
  172. local mouse = player:GetMouse()
  173.  
  174. local amount = script.Parent.AbsoluteSize.X / 4
  175. local sensitivity = 800
  176. local padding = 2
  177. local waittime = 0.05
  178.  
  179. local spaceleft = script.Parent.AbsoluteSize.X - (padding * amount)
  180. local sizeforeach = spaceleft / amount
  181.  
  182. local bars = script.Parent
  183. local display = bars.Parent
  184. local songtitle = display.SongTitle
  185. local progressbar = songtitle.ProgressBar
  186. local progressframe = progressbar.Frame
  187. local mainframe = display.Parent
  188. local maingui = mainframe.Parent
  189. local song = maingui.CurrentSong
  190. local recommended = display.Recommended
  191. local recent = display.Recent
  192. local clickbutton = display.Click
  193.  
  194. local userinput = game:GetService("UserInputService")
  195.  
  196. local lastmx
  197. local lastmy
  198.  
  199. clickbutton.MouseButton1Down:Connect(function()
  200. lastmx, lastmy = mouse.X, mouse.Y
  201. local move
  202. local kill
  203. move = mouse.Move:Connect(function()
  204. local newmx, newmy = mouse.X, mouse.Y
  205. local dx, dy = newmx - lastmx, newmy - lastmy
  206. mainframe.Position = mainframe.Position + UDim2.new(0,dx,0,dy)
  207. lastmx, lastmy = newmx, newmy
  208. end)
  209. kill = userinput.InputEnded:Connect(function(input)
  210. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  211. move:Disconnect()
  212. kill:Disconnect()
  213. end
  214. end)
  215. end)
  216.  
  217. local runservice = game:GetService("RunService")
  218. script.Parent.PaddingList.Padding = UDim.new(0, padding)
  219.  
  220. local marketplace = game:GetService("MarketplaceService")
  221. local http = game:GetService("HttpService")
  222. local tween = game:GetService("TweenService")
  223.  
  224. for i = 1, amount + 1 do
  225. local nbar = Instance.new("Frame")
  226. nbar.BackgroundColor3 = Color3.fromRGB(0,255,109)
  227. nbar.BorderSizePixel = 0
  228. nbar.Size = UDim2.new(0,sizeforeach,0,1)
  229. nbar.Name = ("Bar"..tostring(i))
  230. nbar.LayoutOrder = i
  231. nbar.Parent = script.Parent
  232. end
  233.  
  234. local function PascalCase(str)
  235. local t = str:split(" ")
  236. local build = {}
  237.  
  238. for i,v in pairs(t) do
  239. local lower = v
  240. lower = lower:sub(1,1):upper() .. lower:sub(2)
  241. table.insert(build, lower)
  242. end
  243.  
  244. return table.concat(build, " ")
  245. end
  246.  
  247. function PlaySong(id)
  248. local assetid = id
  249. local info = marketplace:GetProductInfo(assetid)
  250.  
  251. local recentID = recent:FindFirstChild(id)
  252.  
  253. for i,v in pairs(recent:GetChildren()) do
  254. if v:IsA("Frame") and v.Name ~= "MainBar" then
  255. v.BackgroundTransparency = math.clamp(0.2 + (i * 0.05), 0, 0.5)
  256. v.LayoutOrder = 2 + i
  257. end
  258. end
  259.  
  260. if recentID then
  261. recentID:Destroy()
  262. end
  263.  
  264. local container = Instance.new("Frame")
  265. container.Name = id
  266. container.Size = UDim2.new(1,0,0,20)
  267. container.BackgroundColor3 = Color3.fromRGB(0,255,109)
  268. container.BackgroundTransparency = 0.2
  269. container.BorderSizePixel = 0
  270. container.LayoutOrder = 2
  271. container.Parent = recent
  272.  
  273. local recentsong = Instance.new("TextButton")
  274. recentsong.Text = PascalCase(info.Name)
  275. recentsong.BackgroundTransparency = 1
  276. recentsong.Size = UDim2.new(1,0,1,0)
  277. recentsong.TextColor3 = Color3.fromRGB(30,30,30)
  278. recentsong.Font = Enum.Font.SourceSansBold
  279. recentsong.TextSize = 16
  280. recentsong.Parent = container
  281.  
  282. recentsong.MouseButton1Down:Connect(function()
  283. PlaySong(assetid)
  284. end)
  285.  
  286. song.SoundId = "rbxassetid://" .. tostring(assetid)
  287. song:Play()
  288.  
  289. local getURL = game:HttpGet("https://catalog.roblox.com/v1/recommendations/asset/3?contextAssetId=3536304764&numItems=7")
  290. getURL = http:JSONDecode(getURL)
  291. getURL = getURL.data
  292.  
  293. for i,v in pairs(recommended:GetChildren()) do
  294. if v:IsA("Frame") and v.Name ~= "MainBar" then
  295. v:Destroy()
  296. end
  297. end
  298.  
  299. for i,v in next, getURL do
  300. local item = v.item
  301. local creator = v.creator
  302. local product = v.product
  303.  
  304. local info2 = marketplace:GetProductInfo(item.assetId)
  305.  
  306. local container2 = Instance.new("Frame")
  307. container2.Name = item.assetId
  308. container2.Size = UDim2.new(1,0,0,20)
  309. container2.BackgroundColor3 = Color3.fromRGB(0,255,109)
  310. container2.BackgroundTransparency = math.clamp(0.2 + (i * 0.05), 0, 0.5)
  311. container2.BorderSizePixel = 0
  312. container2.LayoutOrder = 2 + i
  313. container2.Parent = recommended
  314.  
  315. local recentsong2 = Instance.new("TextButton")
  316. recentsong2.Text = PascalCase(info2.Name)
  317. recentsong2.BackgroundTransparency = 1
  318. recentsong2.Size = UDim2.new(1,0,1,0)
  319. recentsong2.TextColor3 = Color3.fromRGB(30,30,30)
  320. recentsong2.Font = Enum.Font.SourceSansBold
  321. recentsong2.TextSize = 16
  322. recentsong2.Parent = container2
  323.  
  324. recentsong2.MouseButton1Down:Connect(function()
  325. PlaySong(item.assetId)
  326. end)
  327. end
  328.  
  329. songtitle.Text = PascalCase(info.Name)
  330. end
  331.  
  332. songtitle.FocusLost:Connect(function()
  333. PlaySong(songtitle.Text)
  334. end)
  335.  
  336. spawn(function()
  337. runservice.RenderStepped:Connect(function()
  338. local volume = song.PlaybackLoudness
  339. local lastsize = math.clamp(volume / sensitivity, 0, 1)
  340. local ntofind = math.ceil((amount + 1) / 2)
  341. local excess = amount - tonumber(ntofind)
  342. local middlebar = script.Parent:FindFirstChild("Bar"..ntofind)
  343. local length = song.TimeLength
  344. local current = song.TimePosition
  345. local lengthscale = current / length
  346. progressframe.Size = UDim2.new(lengthscale,0,1,0)
  347. middlebar.Size = UDim2.new(0,sizeforeach,lastsize,0)
  348. for i = ntofind - 1, 1, -1 do
  349. local left = i
  350. local right = (amount + 1) - i + 1
  351. left = bars:FindFirstChild("Bar"..left)
  352. right = bars:FindFirstChild("Bar"..right)
  353. if left and right then
  354. local vscale = left.Size.Y.Scale
  355. left:TweenSize(UDim2.new(0,sizeforeach,lastsize,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, waittime, true)
  356. right:TweenSize(UDim2.new(0,sizeforeach,lastsize,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, waittime, true)
  357. lastsize = vscale
  358. end
  359. end
  360. end)
  361. end)
  362.  
  363. PlaySong(3536304764)
  364. end
  365. coroutine.wrap(PUWBAAI_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement