If you're trying to use console cheats, enter def IsTest(): return True
in the console first, then modify the variables to your heart's content.
This is a single player game for people to enjoy themselves dev, not a multiplayer game where cheating would impact other people's enjoyment. Why would you care if they decide to skip the money grinding, which is honestly damn annoying? Perhaps you should have spent more time finishing your Christmas event rather than trying to implement an anti-cheat to screw people over.