Cut off and loop a script at a specific time

@tanalepy
please re-edit your post with the code
so the code is shown as a code-section
See the tutorial-link at the bottom

The code is not called "skript" the code is called a sketch.

No. There might be a possability which would be very dirty ugly programming.
This is the reason why I do not show it to you.

It is done differently.
Your code must be restructured to become non-blocking.
The non-blocking code will run the one and only function loop() in a way that it will work.

This means as long as your DF-player starts standalone there is no possability to sync the code to the sound over time.

You can have it in sync for a few repeatings by carefully tweaking the wait-time. But as longer as you repeat the more deviation between sound and light-effects will occur.

post a picture and the datasheet of the DFPlayer this sounds as it should be very easy to let the arduino send the start-signal

showing code as a code-section

non-blocking timing

best regards Stefan