Sir_Spaceboi

Untitled

Mar 9th, 2021
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. local MarketPlaceService = game:GetService("MarketplaceService")
  2.  
  3. local Songs = {
  4.     2733053836,
  5.     130763583
  6. }
  7.  
  8. local SongObject = script.Parent.Song
  9. local SongLabel = script.Parent.SongLabel
  10. local SkipButton = script.Parent.SkipButton
  11. local MuteButton = script.Parent.MuteButton
  12. local InputBox = script.Parent.Input
  13. local ConfirmButton = script.Parent.ConfirmInput
  14.  
  15. MuteButton.MouseButton1Click:Connect(function()
  16.     if SongObject.Volume == 0.5 then
  17.         SongObject.Volume = 0
  18.     else
  19.         SongObject.Volume = 0.5
  20.     end
  21. end)
  22.  
  23. SkipButton.MouseButton1Click:Connect(function()
  24.     SongObject:Stop()
  25. end)
  26.  
  27. ConfirmButton.MouseButton1Click:Connect(function()
  28.     SongObject.Ended:Wait()
  29.     local input = InputBox.Text
  30.     SongObject.SoundId = "rbxassetid://" .. input
  31.     SongObject:Play()
  32. end)
  33.  
  34. while true do
  35.     for i = 1, #Songs do
  36.         local Song = Songs[i]
  37.         local SongInfo = MarketPlaceService:GetProductInfo(Song)
  38.        
  39.         SongObject.SoundId = "rbxassetid://" .. Song
  40.         SongObject:Play()
  41.         SongLabel.Visible = true
  42.         SongLabel.Text = SongInfo.Name
  43.         wait(3)
  44.         SongLabel.Visible = false
  45.        
  46.         repeat wait() until not SongObject.IsPlaying
  47.     end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment