Skip to content

Instantly share code, notes, and snippets.

@yokrysty
Last active March 23, 2024 01:18
Show Gist options
  • Save yokrysty/8644e74a3ced26afbb1be68451bfa15d to your computer and use it in GitHub Desktop.
Save yokrysty/8644e74a3ced26afbb1be68451bfa15d to your computer and use it in GitHub Desktop.
cheat in a dumb game: FAP Titans
// bootstrap script
(function (window) {
function findModuleKeyByExports(modules, predicateFunc) {
return Object.keys(modules).find(k => predicateFunc(modules[k].exports));
}
const id = window['_t'] = (new Date()).getTime();
window.webpackJsonp(
[id],
{
0: function(module, exports, require) {
var modulesKey = Object.keys(require).find(k => require[k]['0'] && require[k]['0'].exports);
var modules = window['_' + id] = require[modulesKey];
var moduleKey = findModuleKeyByExports(modules, exports => typeof exports.getUser == 'function');
window._G = require(moduleKey);
window._U = window._G.getUser();
moduleKey = findModuleKeyByExports(modules, exports => exports.prototype && exports.prototype.add && exports.prototype.gte);
window._N = require(moduleKey);
}
}
);
})(window);
// increase DPS
window._G.getUser().get("multipliers").add("DPS", {value: new window._N('2.2e+22')});
// increase gold drop - not working anymore, will trigger an error from the server and the game will reload
// Error: Batch error at 0, Kill monster fail, Gold amount is too high. Received gold - 1.62E+78, calculated - 1.32E+64
window._G.getUser().get("multipliers").add("gold", {value: new window._N('2.2e+22')});
@wavy-tree
Copy link

How to use

@Joeybias
Copy link

How do I use

@rk5w4hh2
Copy link

how do i use friend

@mklump
Copy link

mklump commented Oct 25, 2023

#BUG !!!
BUG_CHECK_PLEASE !!!
Um, excuse me but this code DOES NOT execute as of 10/24/2023 !!!
LINE 15 in my web inspector console executor for the line of code: --> window._U = window._G.getUser(); <--
IS NOT DEFINED FOR THE CALL window._G.getUser() RETURNS AN ERROR NOT DEFINED !!!
!!!!!!!!!!!
CONSOLE OUTPUT RESULT WHILE THE GAME (faptitans) IS RUNNING EITHER CHROME OR EDGE GIVES THE RESULT:
VM1831:15 Uncaught TypeError: window._G.getUser is not a function
at 0 (:15:39)
at t (boot.js:1:107)
at window.webpackJsonp (boot.js:1:431)
at :7:12
at :21:3
Will kindly, please help track this down and fix this!
Thank you!

@yokrysty
Copy link
Author

you are free to update it yourself, maybe i will take a look when i have the time

@yokrysty
Copy link
Author

updated, easy fix :)

@mklump
Copy link

mklump commented Oct 26, 2023

Your basic revision is confirmed working.
Allowing the Module to be from an export.app appears required at this time.

@AndrewAcosta
Copy link

AndrewAcosta commented Nov 15, 2023

I would like to know how to get this to work... but probably won't get an answer XD

@tyroneS72
Copy link

Your basic revision is confirmed working. Allowing the Module to be from an export.app appears required at this time.

do you need an export app for it to work?

@COLOCO0
Copy link

COLOCO0 commented Feb 14, 2024

How do I use???????????????????????

@yokrysty
Copy link
Author

to @zkr6rc2iny and all the others asking how to use:
"friend" if you ask this, then you are not the targeted user of this script
peace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment