Game_Logic

2048 Hack

Apr 26th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. document.getElementsByClassName('title')[0].outerHTML = "<h1 class='title'>2</h1><h1 onclick='changeT()' class='title'>0</h1><h1 class='title'>48</h1>"; function changeT() { var lol = confirm('This will erase your data if you change the middle number! Do you want to continue?'); if (lol == true) { localStorage.gameState = '{"grid":{"size":4,"cells":[[null,null,null,{"position":{"x":0,"y":3},"value":2}],[null,{"position":{"x":1,"y":1},"value":'+prompt('Enter value (If the value is letters, put " around it to work, thx!)',2048)+'},null,null],[null,null,null,null],[null,null,null,null]]},"score":0,"over":false,"won":false,"keepPlaying":false}'; confirm('Success! Refresh the page!') } else { confirm('Click me again to change your mind.') } }; confirm('To hack the numbers, just click the 0 in the big 2048 title. Enjoy!');
Add Comment
Please, Sign In to add comment