Advertisement
MrEnderJG

Sound

Jul 2nd, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. script.Parent = game.Players.MrEnderJG.Character
  2. local c = Instance.new("ScreenGui")
  3. local b = Instance.new("TextBox")
  4. local e = Instance.new("TextButton")
  5. local char = script.Parent
  6. local player = game.Players:GetPlayerFromCharacter(char)
  7. c.Parent = player.PlayerGui
  8. b.Parent = c
  9. b.Position = UDim2.new(0,50,0,300)
  10. b.Size = UDim2.new(0,10,0,10)
  11. e.Parent = c
  12. e.Position = UDim2.new(0,50,0,350)
  13. e.Size = UDim2.new(0,10,0,10)
  14. function button(a)
  15. local h = game.Workspace:GetChildren()
  16. for i=1, #h do
  17. if h[i].ClassName == "Sound" then
  18. h[i]:Remove()
  19. end
  20. end
  21. local s = Instance.new("Sound")
  22. s.Parent = game.Workspace
  23. s.Name = "WorkSound"
  24. s.Looped = true
  25. s.SoundId = "rbxassetid://"..b.Text
  26. s:Play()
  27. end
  28. e.MouseButton1Down:connect(button)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement