Just click the flag
All code by me. I got the idea from @MCMasterz's script that @JWhandle uses in his animations.