lolita5432

Untitled

Oct 5th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. local sounds = { }
  2. local recurse
  3. function recurse(instance)
  4. if instance:IsA "Sound" then
  5. sounds[#sounds + 1] = instance
  6. end
  7. for i, child in ipairs (instance:GetChildren()) do
  8. recurse(child)
  9. end
  10. end
  11. recurse(game)
  12. game.DescendantAdded:connect(recurse)
  13. spawn(function()
  14. while true do
  15. game:GetService "RunService".RenderStepped:wait()
  16. for i, sound in ipairs (sounds) do
  17. sound:Play()
  18. end
  19. end
  20. end)
Add Comment
Please, Sign In to add comment