step 1
get elytra
put the first command in the chat wich is /scoreboard objectives add Flying stat.aviateOneCm
for the next command put a command block down and set it to ALWAYS ACTIVE and REPEAT, then type in this command
execute @e[score_Flying_min=1] ~ ~ ~ /summon Silverfish ~ ~ ~ {CustomName:"Fly",Size:0,Silent:1,ActiveEffects:[{Id:14,Amplifier:10,Duration:200000,ShowParticles:0b}]}
This command you set the command block to ALWAYS ACTIVE and CHAIN and put in the command
/scoreboard players set @a Flying 0 make sure it is in a command block
command block is ALWAYS ACTIVE and CHAIN, command is tp @e[type=Silverfish,name=Fly] ~ ~-1000 ~