Advertisement
princeofheaven

Untitled

Aug 4th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character ~= nil
  2. local radio = game.Players.LocalPlayer.Character:WaitForChild("Radio")
  3. local sound = Instance.new("Sound",radio)
  4. sound.Volume=1
  5. sound.Pitch=1
  6. sound.Name=""
  7. sound.Looped=true
  8. sound.PlayOnRemove=false
  9. local player = game.Players.LocalPlayer
  10. local Format = "http://www.roblox.com/asset/?id=##ID##"
  11. local frame = script.Parent:WaitForChild("Frame")
  12. local radbutton = script.Parent:WaitForChild("RadioButton")
  13.  
  14. frame:WaitForChild("Play").MouseButton1Click:connect(function()
  15. local input = tonumber(frame:WaitForChild("Input").Text)
  16. if input then
  17. sound:Stop()
  18. sound.SoundId=Format:gsub("##ID##", tostring(input))
  19. sound:Play()
  20. end
  21. end)
  22. frame:WaitForChild("Stop").MouseButton1Click:connect(function()
  23. sound:Stop()
  24. end)
  25.  
  26. radbutton.MouseButton1Click:connect(function()
  27. frame.Visible=not frame.Visible
  28. end)
  29. if game:GetService("UserInputService").MouseEnabled == true then -- only non-mobile devices!
  30. radbutton.MouseEnter:connect(function()
  31. radbutton.ImageColor3=Color3.new(0,1,0)
  32. end)
  33. radbutton.MouseLeave:connect(function()
  34. radbutton.ImageColor3=Color3.new(1,1,1)
  35. end)
  36. end
  37. frame.Visible=false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement