I was curious about the desync issues mentioned in the other thread, so I took a look at your code. I think I might have found a possible cause. Between the lines 72 and 83, you initialize a bunch of variables that later get changed during events. AFAICT these are not saved to the global table and therefore are not synchronized between players.
See also this part of the wiki. The wiki only talks about local variables, but the same should apply to global variables that are not part of the 'global' table. (only this table is saved/synchronized between players). If, for example, a player joins the game at a later point, isFirstTick is set to true on their machine when loading the game, while it may be false for other players.
Don't know if changing this fixes the issue, but it might be worth a try.