when green flag was clicked the project starts.
View this project in Scratch
Scratch
Advanced programming