Advertisement
22lblevins

Coolmath - Duck Life

Nov 2nd, 2021 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Spent like 20 minutes writing this after somebody requested it be done. There are a ton of values stored that I imagine would prove useful in cheating in this game, but I have not had the time to dig into them. Feel free to poke around and try to change other aspects of game play with this!
  2.  
  3. //The max value for any of these is 255!
  4. var MONEY = 255;
  5. var BLUEFOOD = 255;
  6. var FOOD = 255;
  7. //
  8.  
  9. //
  10. var keyPath = "/idbfs/053f673d27a09817656a5a6f48f6e143/PlayerPrefs";
  11. var req = indexedDB.open("/idbfs", 21);
  12. req.onerror = function (event) {
  13.   console.log("[!] Unable to open DB!");
  14. };
  15. req.onsuccess = function (event) {
  16.   console.log("[*] Opened DB!");
  17.   var db = event.target.result;
  18.   var transaction = db.transaction(["FILE_DATA"], "readwrite");
  19.   var kObjStore = transaction.objectStore("FILE_DATA");
  20.  
  21.   kObjStore.openCursor().onsuccess = function (event) {
  22.     var cursor = event.target.result;
  23.     if (cursor) {
  24.       if (cursor.key == keyPath) {
  25.         console.log("[*] Found key!");
  26.  
  27.         var reqData = kObjStore.get(keyPath);
  28.         reqData.onerror = function (event) {
  29.           console.log("[!] Unable to read data from key! (\"" + keyPath + "\")");
  30.         };
  31.         reqData.onsuccess = function (event) {
  32.           console.log("[*] Read data from key!");
  33.  
  34.           var data = event.target.result;
  35.           console.log(data);
  36.          
  37.           var u8arr = new Uint8Array([85,
  38.     110,
  39.     105,
  40.     116,
  41.     121,
  42.     80,
  43.     114,
  44.     102,
  45.     0,
  46.     0,
  47.     1,
  48.     0,
  49.     0,
  50.     0,
  51.     16,
  52.     0,
  53.     8,
  54.     98,
  55.     108,
  56.     117,
  57.     101,
  58.     115,
  59.     101,
  60.     101,
  61.     100,
  62.     254,
  63.     BLUEFOOD,
  64.     0,
  65.     0,
  66.     0,
  67.     5,
  68.     99,
  69.     111,
  70.     105,
  71.     110,
  72.     115,
  73.     254,
  74.     99,
  75.     0,
  76.     0,
  77.     0,
  78.     6,
  79.     99,
  80.     111,
  81.     108,
  82.     111,
  83.     117,
  84.     114,
  85.     254,
  86.     1,
  87.     0,
  88.     0,
  89.     0,
  90.     9,
  91.     MONEY,
  92.     111,
  93.     109,
  94.     112,
  95.     108,
  96.     101,
  97.     116,
  98.     101,
  99.     100,
  100.     15,
  101.     102,
  102.     102,
  103.     102,
  104.     102,
  105.     102,
  106.     102,
  107.     102,
  108.     102,
  109.     102,
  110.     102,
  111.     102,
  112.     102,
  113.     102,
  114.     102,
  115.     102,
  116.     8,
  117.     101,
  118.     110,
  119.     101,
  120.     114,
  121.     103,
  122.     121,
  123.     120,
  124.     112,
  125.     253,
  126.     0,
  127.     0,
  128.     0,
  129.     0,
  130.     5,
  131.     102,
  132.     108,
  133.     121,
  134.     120,
  135.     112,
  136.     253,
  137.     0,
  138.     0,
  139.     0,
  140.     0,
  141.     3,
  142.     104,
  143.     97,
  144.     116,
  145.     254,
  146.     0,
  147.     0,
  148.     0,
  149.     0,
  150.     5,
  151.     109,
  152.     117,
  153.     115,
  154.     105,
  155.     99,
  156.     254,
  157.     0,
  158.     0,
  159.     0,
  160.     0,
  161.     5,
  162.     114,
  163.     117,
  164.     110,
  165.     120,
  166.     112,
  167.     253,
  168.     0,
  169.     0,
  170.     0,
  171.     0,
  172.     4,
  173.     115,
  174.     101,
  175.     101,
  176.     100,
  177.     254,
  178.     FOOD,
  179.     0,
  180.     0,
  181.     0,
  182.     6,
  183.     115,
  184.     119,
  185.     105,
  186.     109,
  187.     120,
  188.     112,
  189.     253,
  190.     0,
  191.     0,
  192.     0,
  193.     0,
  194.     18,
  195.     117,
  196.     110,
  197.     105,
  198.     116,
  199.     121,
  200.     46,
  201.     99,
  202.     108,
  203.     111,
  204.     117,
  205.     100,
  206.     95,
  207.     117,
  208.     115,
  209.     101,
  210.     114,
  211.     105,
  212.     100,
  213.     32,
  214.     100,
  215.     51,
  216.     48,
  217.     54,
  218.     56,
  219.     48,
  220.     54,
  221.     48,
  222.     55,
  223.     53,
  224.     102,
  225.     53,
  226.     99,
  227.     98,
  228.     51,
  229.     55,
  230.     50,
  231.     97,
  232.     50,
  233.     49,
  234.     56,
  235.     97,
  236.     48,
  237.     102,
  238.     57,
  239.     56,
  240.     99,
  241.     49,
  242.     54,
  243.     100,
  244.     99,
  245.     55,
  246.     33,
  247.     117,
  248.     110,
  249.     105,
  250.     116,
  251.     121,
  252.     46,
  253.     112,
  254.     108,
  255.     97,
  256.     121,
  257.     101,
  258.     114,
  259.     95,
  260.     115,
  261.     101,
  262.     115,
  263.     115,
  264.     105,
  265.     111,
  266.     110,
  267.     95,
  268.     101,
  269.     108,
  270.     97,
  271.     112,
  272.     115,
  273.     101,
  274.     100,
  275.     95,
  276.     116,
  277.     105,
  278.     109,
  279.     101,
  280.     1,
  281.     48,
  282.     22,
  283.     117,
  284.     110,
  285.     105,
  286.     116,
  287.     121,
  288.     46,
  289.     112,
  290.     108,
  291.     97,
  292.     121,
  293.     101,
  294.     114,
  295.     95,
  296.     115,
  297.     101,
  298.     115,
  299.     115,
  300.     105,
  301.     111,
  302.     110,
  303.     105,
  304.     100,
  305.     19,
  306.     53,
  307.     56,
  308.     54,
  309.     56,
  310.     56,
  311.     50,
  312.     49,
  313.     57,
  314.     49,
  315.     56,
  316.     51,
  317.     52,
  318.     56,
  319.     52,
  320.     55,
  321.     53,
  322.     53,
  323.     56,
  324.     55]);
  325.  
  326.           data.contents = u8arr;
  327.  
  328.           //change data here
  329.           var reqUpdate = kObjStore.put(data, keyPath);
  330.           reqUpdate.onerror = function (event) {
  331.             console.log("[!] Unable to write to DB!");
  332.           };
  333.           reqUpdate.onsuccess = function (event) {
  334.             console.log("[*] DB write Successful!");
  335.             console.log(data);
  336.           };
  337.         };
  338.       }
  339.       cursor.continue();
  340.     } else {}
  341.   };
  342. };
  343.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement