Basically, the Haxball kick action is performed by any of the following keys(X, RShift. LShift. Space, Num0 when NumLock is On). Once you press any of these keys while ingame, a kick is performed. In order to kick again you have to perform the same action again. When the kick key is held pressed it results in slower movement, thus holding it down is avoided. Because Haxball runs at 60 FPS, the fastest kick time(or time between kicks) it can detect is 0.016666667s( so people don’t have to use scripts faster than that). People who want to cheat use macro scripts for two of the following reasons. Firstly, because they want to win the kick key-spamming contests that may occur when two players are in possesion of the ball at the same time. That requires a script that can consistently fire at the maximum detectable speed, that of one pressing per frame. The second, and most commonly used is the “double kick” or “wall lift” script. This is used by players who want to perform trick shots that are moderately difficult even for an experienced player to perform consistently. In both cases, what they do is make scripts that replace the use of a key such as Z, for example, with two specifically timed pressings of a kick key, X for example. (These scripts of course can be switched on and off with the press of a button, so we can’t detect if they are using it when they are communicating via the chatbox Haxball provides.) I don’t know if MOSS can detect the pressing of Z and then the two X pressings, or if the pressing of Z cannot be detected in the first place. I also don’t know whether MOSS can be easily tricked in Haxball, due to the fact that players only use the macro in specific cases and not all the time. What I mean by that is, a player can perform kicks fast without the need of a script, and this may confuse the data that MOSS receives, since the pattern will not always be the same .
Lastly, my idea of an anticheat method is, because slow scripts in Haxball don’t really affect performance, monitoring key pressing and trying to keep an account of how many times the same fast patterns happened at the same period of time. For example, when a quick double X pressing or a X and Space pressing is made, keep an account of the time between the two pressings and try to find if it happens again. In the end show how many times the same pattern was performed.
P.S: If we can indeed find if, for example, Z was pressed before two X pressings, the above idea is irrelevant, since we can easily see the pattern of Z,X,X and other similar patterns, but I don’t think the pressing of a key that has been remapped can be detected.