My hat prediction system for Moomoo.io becoming more accurate the longer you see a player and their state transistions
How it works.
Each tick the script collects data on all visibile player this data includes the current hat tail speed and other stuff which you can see in the code. (If you want to put this into your own code maake sure you take in the data somewhere)
Using the data it is able to make accurate predictions. Note this was my original rough code that although works well can be improved a lot.