Another quick project to demonstrate the execution order of scripts within and across sprites (and Stage). The list shows the order of execution, Click on a sprite to bring it to front, then hit GF again to see new run order. See inside for all the Green Flag scripts of each sprite.
Scripts are executed for the topmost layered sprite/clone first, going down the layering, until finally it starts up the scripts on the Stage. Within a sprite, the scripts are executed from the lowest to the highest, in terms of layering within the editor pane. (NOTE: above was true for Scratch 2, but it's different in Scratch 3... instead, S3 executes scripts in the order that their hat-blocks were created. So scripts with earlier hat-blocks will execute first in order. That means changing the layer order of scripts in this project will no longer change the execution order in the way that this project claims. However, you *can* still change execution order by swapping their hat-blocks.) This works both for Green Flag and for broadcasts. Note: there's no guarantee Scratch will continue to work this way!