So, I have a project, its a "cookie clicker" by definition, and I wish to work out how I can protect the game from users being able to edit
<button id="cooker" onclick="cookieClick(1)"></button> and setting
(1) to like
I tried a few things first:
I tried using an old on() function with a dom searching function, and then to run an alert saying "Dumb Hacker! Im corrupting your save data" and then of course it would run Function
clearDat() then function
corrupt() which clears the localstorage data and sets it to an invalid value (usually wounds up as NaN) which prevents them from Playing.
Unfortunately the cookieclicker was editing the program so hastily, that it was "changing" the button above, and I wound up getting a million alerts (And because I was using a windows based HTML editor, I was getting WINDOW alerts, which i had to spam esc and try to delete the alert function and rerun the whole game, it was a pain)
I also tried a similar method using an old JS function, but it wound up not working.
I think you may see where im getting at, I'm really stuck in a pickle.
Heres the current code: https://hatebin.com/tgsdqzhzlc