Adding a dive to flyers

Hey there, I’d like to make a mod where some flyers could dive, can someone litteraly teach me how should I do that ? I’m really bad when it comes to graph.