At the start press : Number Key: 1 to start. Press: Number Key: 2 to stop everything. Controls: Space bar/ Click to shoot. Arrow keys to move. Bullet will always follow your mouse cursor.
I copied the main code from @Samcheong but added extra features. Extra features: Controls to control spawn speed and bullets will follow mouse cursor.