Cool game, however i dont think the Flying mechanic is intended, you could fix this by checking if the player is touching the ground, if so, make the player able to jump, if the player presses space but isnt on the ground, you could check if the player is on the ground, if not, do not run the jumping code