How do I make a flappy bird-ish thing

How do I make a flappy bird thing but you fall slower ( I don’t really need the obstacles because I can code it myself) and the controls are ,basically like Duck Life 4 swamp map swimming 1 but you are completely in the water and without the coins and alligator crocodile thingies

Click this to see what Duck Life 4 swamp map swimming 1 looks like

I am also very bad at explaining.

this.y -= isKeyDown('space') || isMouseDown() ? 10 : -10;