Advertisement
Laiser

Roblox Music Player GUI Script

Jun 28th, 2017
20,917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local sound = Instance.new("Sound",script.Parent)
  2. sound.Volume=1
  3. sound.Pitch=1
  4. sound.Name=""
  5. sound.Looped=true
  6. sound.PlayOnRemove=false
  7. local player = game.Players.LocalPlayer
  8. local Format = "http://www.roblox.com/asset/?id=##ID##"
  9. local frame = script.Parent:WaitForChild("Frame")
  10.  
  11. frame:WaitForChild("Play").MouseButton1Click:connect(function()
  12. local input = tonumber(frame:WaitForChild("Input").Text)
  13. if input then
  14. sound:Stop()
  15. sound.SoundId=Format:gsub("##ID##", tostring(input))
  16. sound:Play()
  17. end
  18. end)
  19. frame:WaitForChild("Stop").MouseButton1Click:connect(function()
  20. sound:Stop()
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement