Advertisement
memberhero

Music Playing Script

Jul 19th, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. --Music Playing Script by basstracker1970
  2. Name = "basstracker1970"
  3. wait(1)
  4. plr = game.Players:FindFirstChild(Name)
  5. mouse = plr:GetMouse()
  6. rbx = "rbxassetid://"
  7. plr.Chatted:connect(function(msg)
  8. if string.sub((msg),1,6) == "play/ " then
  9. game:GetService('RunService').RenderStepped:wait(0)
  10. local text = string.sub(msg,7)
  11. local sound = Instance.new("Sound")
  12. sound.SoundId = rbx..text
  13. sound.Parent = plr.Character
  14. sound:Play()
  15. end
  16. end)
  17. plr.Chatted:connect(function(msg)
  18. if msg == "stop/" then
  19. game:GetService('RunService').RenderStepped:wait(0)
  20. if plr.Character:FindFirstChildOfClass("Sound") then
  21. plr.Character.Sound:Remove()
  22. end
  23. end
  24. end)
  25. plr.Chatted:connect(function(msg)
  26. if msg == "loop/" then
  27. game:GetService('RunService').RenderStepped:wait(0)
  28. if plr.Character:FindFirstChildOfClass("Sound") then
  29. plr.Character:FindFirstChildOfClass("Sound").Looped = true
  30. end
  31. end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement