On leftclick with any tool: @set {_ench.%player%} to "18" @wait 1 tick @loop 10000 times: @@add "1" to {_ench.%player%} @@if player's tool is enchanted with knockback {_ench.%player%}: @@@clear player's inventory @if {_ench.%player%} is bigger than "10000": @@set {_ench.%player%} to "18"