Click on the green flag
I don't know what is the use of 'Turn motor on' in the script. I just added a control to the number of times the plane flies. Thanks to 444424 for the original script.