Green flag to jump/flap press space every pipe you pass is one dollar, you can spend money in the shop at the home screen. if you press the green flag when you die your money will reset, it automatically takes you back to the home screen.
I got some code from Pipsqueaks's https://scratch.mit.edu/projects/21696259/ please check their project out.