#The problem with the script now is that when a player takes damage multiple times, multiple while loops affect the player. #Things can get pretty scary, and the player can be launched like a missile. OnDamageEvent: type: world debug: false events: on player damaged: #DamageFlagPart - flag GetDamagedin5s expire:5s - inject ElytraDamagedSlowDown if: StartGlidingCheck: type: world debug: false events: after player starts gliding: - inject ElytraDamagedSlowDown ElytraDamagedSlowDown: type: task debug: false script: - define reduction 0.5 - while && : - define total_velocity ].add[]> - define reduction <[reduction].add[0.005]> - if <[total_velocity]> >= <[reduction]>: - adjust velocity:]> - wait 1t