This makes a new command called "Loopsound" which lets you loop any vanilla sound or song in the game. I'm not too sure if it works with custom things but it could, you can change the volume, pitch, and duration which is how long before it loops again.