> For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daikirai.gitbook.io/scripting/combat/antiknockback.md).

# AntiKnockback

It works at the packet level, so you can handle different sources separately. Unlike [Velocity](/scripting/combat/velocity.md), it can cancel specific types of knockback on their own.

## Knockback amount

`Horizontal` and `Vertical` control how much knockback you take on each axis. Lower values keep less of the incoming movement. `0%` cancels that axis.

`Damage boost` changes your own movement after you take damage. The boost is disabled at `0.8x`. `Boost with LMB` applies it only while you hold the left mouse button.

## Delaying a hit

`Delay` holds knockback for the selected number of milliseconds after you are hit. `0` disables the delay. Use `Delay only midair` or `Delay only targeting` when the delay should apply only in those situations.

`Delay simultaneously` applies the delay and the cancellation at the same time. With `Delay until ground`, knockback waits until you touch the ground. This can be useful with [Jump Reset](/scripting/combat/jump-reset.md).

`Disable attack while delay` prevents attacks during the delay window. If your latency is low, leave it enabled so you do not attack while the knockback is waiting.

{% hint style="info" %}
`Delay until ground` holds the knockback long enough for [Jump Reset](/scripting/combat/jump-reset.md) to act before you land.
{% endhint %}

## Cancellation conditions

The cancellation toggles decide when AntiKnockback removes knockback:

* `Cancel ground` applies it while you are on the ground.
* `Cancel off ground` applies it while you are airborne.
* `Cancel burning` handles knockback while you are on fire.
* `Cancel explosion` handles explosions and TNT.
* `Cancel while falling` handles knockback while you are falling.

`Only while moving` limits cancellation to the time when you are moving. `Cancel interval` controls how often cancellation runs. `1` runs it every tick, while the minimum value disables cancellation.

`Disable in lobby` turns AntiKnockback off automatically in lobbies.

## Related modules

Use [Velocity](/scripting/combat/velocity.md) when you want to scale knockback with a smaller set of conditions. Use [Jump Reset](/scripting/combat/jump-reset.md) when you want to change knockback with a jump.
