Press the green flag and when the pirate disappear then press the space button.
I just thought if it. And a thanks to @Fatguy61king on helping me learn to code.