You must use an independent online storage system that cannot be modified by data after a patch is applied,
You can also implement a data integrity checker. You check the values are consistent with an equation you build. For example the coins cannot be > 2000 if lvl < 3.
In addition you can look at using my extension . (it does not work for all luckypatcher instances, however it does catch some). I just updated it the other day.