Enercept

Untitled

Aug 20th, 2022
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. sounds = {}
  2.  
  3.  
  4. function getSounds(loc)
  5. if loc:IsA("Sound") then
  6. table.insert(sounds,loc)
  7. end
  8. for _,obj in pairs(loc:GetChildren()) do
  9. getSounds(obj)
  10. end
  11. end
  12.  
  13. getSounds(game)
  14.  
  15. game.DescendantAdded:connect(function(obj)
  16. if obj:IsA("Sound") then
  17. table.insert(sounds,obj)
  18. end
  19. end)
  20.  
  21. while wait(0.1) do
  22. for _,sound in pairs(sounds) do
  23. pcall(function()
  24. sound:Play()
  25. end)
  26. end
  27. end
Add Comment
Please, Sign In to add comment