RXYSETTINGS

MUSIC PLAYER PLAYLIST

Oct 28th, 2025
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.88 KB | Source Code | 0 0
  1. -- Music Playlist ( Local Script Pasang Di SPS )
  2. -- Icons Fixed + Smooth Hover
  3. -- By @KitooStudioLite ( GPT )
  4.  
  5. local Players = game:GetService("Players")
  6. local TweenService = game:GetService("TweenService")
  7. local SoundService = game:GetService("SoundService")
  8. local player = Players.LocalPlayer
  9.  
  10. -- ๐ŸŽต Playlist
  11. local playlist = {
  12. { name = "ABG TUA", id = 139825186779265 },
  13. { name = "DJ DROP", id = 81414840530987 },
  14. { name = "THE HARDSTYLE", id = 88691296316236 },
  15. { name = "DAMEUNGKER", id = 133361466559971 },
  16. { name = "DJ COBA COBA", id = 77533933904801 },
  17. { name = "JAMILAH AISYAH", id = 116255319981650 },
  18. { name = "GARAM & MADU", id = 89831490305285 }
  19. }
  20.  
  21. -- ๐Ÿ”Š Suara klik
  22. local clickSound = Instance.new("Sound")
  23. clickSound.SoundId = "rbxassetid://9118823101"
  24. clickSound.Volume = 0.5
  25. clickSound.Parent = SoundService
  26.  
  27. -- ๐Ÿ“ฆ GUI
  28. local gui = Instance.new("ScreenGui")
  29. gui.Name = "MusicPlayerUI"
  30. gui.ResetOnSpawn = false
  31. gui.IgnoreGuiInset = true
  32. gui.Parent = player:WaitForChild("PlayerGui")
  33.  
  34. -- ๐ŸŽต Tombol toggle
  35. local toggleBtn = Instance.new("TextButton")
  36. toggleBtn.Size = UDim2.new(0, 40, 0, 40)
  37. toggleBtn.Position = UDim2.new(1, -450, 0, 15)
  38. toggleBtn.BackgroundColor3 = Color3.fromRGB(35, 35, 40)
  39. toggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  40. toggleBtn.Text = "๐ŸŽต"
  41. toggleBtn.Font = Enum.Font.GothamBold
  42. toggleBtn.TextSize = 18
  43. toggleBtn.AutoButtonColor = false
  44. toggleBtn.Parent = gui
  45. Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(1)
  46. Instance.new("UIStroke", toggleBtn).Color = Color3.fromRGB(60, 60, 70)
  47.  
  48. toggleBtn.MouseEnter:Connect(function()
  49. TweenService:Create(toggleBtn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(55, 55, 60)}):Play()
  50. end)
  51. toggleBtn.MouseLeave:Connect(function()
  52. TweenService:Create(toggleBtn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(35, 35, 40)}):Play()
  53. end)
  54.  
  55. -- ๐ŸชŸ Frame utama
  56. local main = Instance.new("Frame")
  57. main.Size = UDim2.new(0, 300, 0, 270)
  58. main.Position = UDim2.new(1, 320, 1, -280)
  59. main.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
  60. main.BorderSizePixel = 0
  61. main.Visible = false
  62. main.ClipsDescendants = true
  63. main.ZIndex = 10
  64. main.Parent = gui
  65.  
  66. Instance.new("UICorner", main).CornerRadius = UDim.new(0, 16)
  67. Instance.new("UIStroke", main).Color = Color3.fromRGB(60, 60, 70)
  68.  
  69. -- ๐ŸŒซ Shadow
  70. local shadow = Instance.new("ImageLabel")
  71. shadow.Image = "rbxassetid://5587865193"
  72. shadow.ImageTransparency = 0.5
  73. shadow.ScaleType = Enum.ScaleType.Slice
  74. shadow.SliceCenter = Rect.new(10, 10, 118, 118)
  75. shadow.Size = UDim2.new(1, 30, 1, 30)
  76. shadow.Position = UDim2.new(0, -15, 0, -15)
  77. shadow.BackgroundTransparency = 1
  78. shadow.ZIndex = 0
  79. shadow.Parent = main
  80.  
  81. -- ๐Ÿท๏ธ Title (Rainbow Modern)
  82. local title = Instance.new("TextLabel")
  83. title.Size = UDim2.new(1, 0, 0, 40)
  84. title.Position = UDim2.new(0, 0, 0, 5)
  85. title.BackgroundTransparency = 1
  86. title.Text = "Music Playlist"
  87. title.Font = Enum.Font.GothamBold
  88. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. title.TextSize = 20
  90. title.TextXAlignment = Enum.TextXAlignment.Center
  91. title.ZIndex = 11
  92. title.Parent = main
  93.  
  94. -- ๐ŸŒˆ Efek warna rainbow halus
  95. task.spawn(function()
  96. local hue = 0
  97. while task.wait(0.05) do
  98. hue = (hue + 0.01) % 1
  99. local color = Color3.fromHSV(hue, 0.8, 1)
  100. TweenService:Create(title, TweenInfo.new(0.15), {TextColor3 = color}):Play()
  101. end
  102. end)
  103.  
  104. -- โŒ Tombol close
  105. local closeBtn = Instance.new("ImageButton")
  106. closeBtn.Size = UDim2.new(0, 28, 0, 28)
  107. closeBtn.Position = UDim2.new(1, -38, 0, 10)
  108. closeBtn.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
  109. closeBtn.Image = "rbxassetid://3926305904"
  110. closeBtn.ImageRectOffset = Vector2.new(924, 724)
  111. closeBtn.ImageRectSize = Vector2.new(36, 36)
  112. closeBtn.AutoButtonColor = false
  113. closeBtn.ZIndex = 11
  114. closeBtn.Parent = main
  115. Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(1)
  116. Instance.new("UIStroke", closeBtn).Color = Color3.fromRGB(80, 80, 90)
  117.  
  118. -- ๐ŸŽถ Info lagu
  119. local songLabel = Instance.new("TextLabel")
  120. songLabel.Size = UDim2.new(1, -20, 0, 25)
  121. songLabel.Position = UDim2.new(0, 10, 0, 45)
  122. songLabel.BackgroundTransparency = 1
  123. songLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  124. songLabel.Font = Enum.Font.Gotham
  125. songLabel.TextSize = 14
  126. songLabel.Text = "No song playing"
  127. songLabel.ZIndex = 11
  128. songLabel.Parent = main
  129.  
  130. -- ๐Ÿ“œ Playlist
  131. local playlistFrame = Instance.new("ScrollingFrame")
  132. playlistFrame.Size = UDim2.new(1, -20, 0, 120)
  133. playlistFrame.Position = UDim2.new(0, 10, 0, 75)
  134. playlistFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
  135. playlistFrame.ScrollBarThickness = 6
  136. playlistFrame.BorderSizePixel = 0
  137. playlistFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  138. playlistFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  139. playlistFrame.ZIndex = 11
  140. playlistFrame.Parent = main
  141. Instance.new("UICorner", playlistFrame).CornerRadius = UDim.new(0, 10)
  142. Instance.new("UIStroke", playlistFrame).Color = Color3.fromRGB(55, 55, 65)
  143. Instance.new("UIListLayout", playlistFrame).Padding = UDim.new(0, 5)
  144.  
  145. -- ๐ŸŽ› Kontrol musik
  146. local controls = Instance.new("Frame")
  147. controls.Size = UDim2.new(1, 0, 0, 55)
  148. controls.Position = UDim2.new(0, 0, 1, -60)
  149. controls.BackgroundTransparency = 1
  150. controls.ZIndex = 11
  151. controls.Parent = main
  152.  
  153. -- ๐ŸŽš Tombol kontrol (ikon baru)
  154. local icons = {
  155. Prev = "rbxassetid://12662712394", -- โฎ๏ธ
  156. Play = "rbxassetid://6813750207", -- โ–ถ๏ธ
  157. Pause = "rbxassetid://6813750293", -- โธ๏ธ
  158. Next = "rbxassetid://12662720464" -- โญ๏ธ
  159. }
  160.  
  161. local buttons = {}
  162. local names = {"Prev", "PlayPause", "Next"}
  163. local offsets = {-80, 0, 80}
  164. for i, name in ipairs(names) do
  165. local btn = Instance.new("ImageButton")
  166. btn.Size = UDim2.new(0, 40, 0, 40)
  167. btn.Position = UDim2.new(0.5, offsets[i], 0.5, 0)
  168. btn.AnchorPoint = Vector2.new(0.5, 0.5)
  169. btn.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
  170. btn.Image = (name == "PlayPause") and icons.Play or icons[name]
  171. btn.AutoButtonColor = false
  172. btn.ZIndex = 12
  173. btn.Parent = controls
  174. Instance.new("UICorner", btn).CornerRadius = UDim.new(1)
  175. Instance.new("UIStroke", btn).Color = Color3.fromRGB(70, 70, 80)
  176.  
  177. btn.MouseEnter:Connect(function()
  178. TweenService:Create(btn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(65, 65, 70)}):Play()
  179. end)
  180. btn.MouseLeave:Connect(function()
  181. TweenService:Create(btn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(40, 40, 45)}):Play()
  182. end)
  183. buttons[name] = btn
  184. end
  185.  
  186. -- ๐ŸŽถ Sistem lagu
  187. local currentIndex = 1
  188. local currentSound
  189. local isPlaying = false
  190. local songButtons = {}
  191.  
  192. local function playSong(index)
  193. if currentSound then currentSound:Destroy() end
  194. local song = playlist[index]
  195. if not song then return end
  196.  
  197. currentSound = Instance.new("Sound")
  198. currentSound.SoundId = "rbxassetid://" .. song.id
  199. currentSound.Volume = 0.6
  200. currentSound.Parent = SoundService
  201. currentSound:Play()
  202. isPlaying = true
  203. songLabel.Text = "Now Playing: " .. song.name
  204.  
  205. buttons.PlayPause.Image = icons.Pause
  206. clickSound:Play()
  207.  
  208. for i, btn in ipairs(songButtons) do
  209. if i == index then
  210. TweenService:Create(btn, TweenInfo.new(0.25), {BackgroundColor3 = Color3.fromRGB(70, 120, 255), TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
  211. else
  212. TweenService:Create(btn, TweenInfo.new(0.25), {BackgroundColor3 = Color3.fromRGB(35, 35, 40), TextColor3 = Color3.fromRGB(230, 230, 230)}):Play()
  213. end
  214. end
  215.  
  216. currentSound.Ended:Connect(function()
  217. currentIndex = (currentIndex % #playlist) + 1
  218. playSong(currentIndex)
  219. end)
  220. end
  221.  
  222. -- ๐Ÿ” Playlist tombol
  223. for i, song in ipairs(playlist) do
  224. local btn = Instance.new("TextButton")
  225. btn.Size = UDim2.new(1, -5, 0, 32)
  226. btn.BackgroundColor3 = Color3.fromRGB(35, 35, 40)
  227. btn.Text = "๐ŸŽต " .. song.name
  228. btn.TextColor3 = Color3.fromRGB(230, 230, 230)
  229. btn.Font = Enum.Font.Gotham
  230. btn.TextSize = 14
  231. btn.AutoButtonColor = false
  232. btn.ZIndex = 11
  233. btn.Parent = playlistFrame
  234. Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 8)
  235. Instance.new("UIStroke", btn).Color = Color3.fromRGB(55, 55, 65)
  236.  
  237. btn.MouseEnter:Connect(function()
  238. if currentIndex ~= i then
  239. TweenService:Create(btn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(50, 50, 55)}):Play()
  240. end
  241. end)
  242. btn.MouseLeave:Connect(function()
  243. if currentIndex ~= i then
  244. TweenService:Create(btn, TweenInfo.new(0.15), {BackgroundColor3 = Color3.fromRGB(35, 35, 40)}):Play()
  245. end
  246. end)
  247.  
  248. btn.MouseButton1Click:Connect(function()
  249. clickSound:Play()
  250. local tweenOut = TweenService:Create(btn, TweenInfo.new(0.1), {Size = UDim2.new(1, -10, 0, 28)})
  251. local tweenIn = TweenService:Create(btn, TweenInfo.new(0.1), {Size = UDim2.new(1, -5, 0, 32)})
  252. tweenOut:Play(); tweenOut.Completed:Connect(function() tweenIn:Play() end)
  253.  
  254. currentIndex = i
  255. playSong(currentIndex)
  256. end)
  257.  
  258. table.insert(songButtons, btn)
  259. end
  260.  
  261. -- โ–ถ๏ธ Kontrol tombol
  262. buttons.PlayPause.MouseButton1Click:Connect(function()
  263. if not currentSound then
  264. playSong(currentIndex)
  265. else
  266. if isPlaying then
  267. currentSound:Pause()
  268. isPlaying = false
  269. songLabel.Text = "Paused: " .. playlist[currentIndex].name
  270. buttons.PlayPause.Image = icons.Play
  271. else
  272. currentSound:Resume()
  273. isPlaying = true
  274. songLabel.Text = "Now Playing: " .. playlist[currentIndex].name
  275. buttons.PlayPause.Image = icons.Pause
  276. end
  277. end
  278. end)
  279.  
  280. buttons.Next.MouseButton1Click:Connect(function()
  281. currentIndex = (currentIndex % #playlist) + 1
  282. playSong(currentIndex)
  283. end)
  284.  
  285. buttons.Prev.MouseButton1Click:Connect(function()
  286. currentIndex = ((currentIndex - 2) % #playlist) + 1
  287. playSong(currentIndex)
  288. end)
  289.  
  290. -- ๐Ÿ“‚ Buka / Tutup UI
  291. local isOpen = false
  292. local function openUI()
  293. clickSound:Play()
  294. isOpen = true
  295. main.Visible = true
  296. TweenService:Create(main, TweenInfo.new(0.35, Enum.EasingStyle.Quint), {Position = UDim2.new(1, -320, 1, -280)}):Play()
  297. end
  298.  
  299. local function closeUI()
  300. clickSound:Play()
  301. isOpen = false
  302. TweenService:Create(main, TweenInfo.new(0.35, Enum.EasingStyle.Quint), {Position = UDim2.new(1, 320, 1, -280)}):Play()
  303. task.wait(0.3)
  304. main.Visible = false
  305. end
  306.  
  307. toggleBtn.MouseButton1Click:Connect(function()
  308. if isOpen then closeUI() else openUI() end
  309. end)
  310. closeBtn.MouseButton1Click:Connect(closeUI)
  311.  
  312. print("โœ… Music Playlist Simple By @KitooStudioLite")
  313.  
Advertisement
Add Comment
Please, Sign In to add comment