So the girl is a Fuse model converted to GG with a bunch of different idle and dancing animations.
The script simply chooses a random animation and loops it, an idle animation when the trigger is false (the g_music_playing flag) or a dancing animation when it is true. For testing I simply added a crate with a script that sets the flag when the player is close but in game any script could set the flag (for example the script that plays the music).
Edit the frame numbers to suit your own models and bobs your uncle, disco/nightclub scenes made easy.
I've attached the script plus my animation viewer script which can be attached to any animated entity to help find the animation frames.
Been there, done that, got all the T-Shirts!