Code:
on break of bed:
spawn a pig at event-block
add last spawned pig to {_pig::%player%}
equip last spawned entity with saddle
add "{NoAI:1b}" to nbt of last spawned pig
add "{Silent:1}" to nbt of last spawned pig
push {_pig::%player%} upwards at speed 1
wait 20 ticks
kill {_pig::%player%}
wait 1 tick
kill last spawned entity
wait 1 tick
kill last spawned entity
wait 1 tick
kill last spawned entity
delete {_pig::%player%}
I want to make the pig fly but it doesn't pls help me