Originally Posted by
FlutterM4rk
if the player stopped sending move packets since the last tick (you might want to add a grace period) => motion stopped (take away buff)
if the player sends move packets constantly => in motion
if the player didn't send a move packet last tick, but he sent one just now => motion starting (apply buff)
this is very inefficient btw, i just told you the core of it, there are many optimizations that could be done (like making the whole thing not tick based, or at least stopping the loop while the player isn't in motion)