Click the Scripts tab.
Click the Sound category.
Drag out a play sound until done block:

Click the block to play the sound.
Now, make the sound repeat.
Click the Control category. Drag out a repeat block, and wrap it around:

You can change the number of times it repeats.
Click the Events category.
Drag out a when
clicked block and snap it on top.

Play your music! Your script will start whenever you click the green flag:

Click the stop sign if you want it to stop.
Next, code the dance