Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Last active December 16, 2025 13:45
Show Gist options
  • Select an option

  • Save vielhuber/06eef5f7aa8353606ae33d63ebd42008 to your computer and use it in GitHub Desktop.

Select an option

Save vielhuber/06eef5f7aa8353606ae33d63ebd42008 to your computer and use it in GitHub Desktop.
anton app coin hack #js
coins = 42,
sourceId = localStorage.getItem('sourceId').split('"').join(''),
deviceLogId = localStorage.getItem('deviceLogId').split('"').join(''),
users = JSON.parse(localStorage.getItem('users'));
users.forEach(users__value => {
fetch('https://logger-lb-5.anton.app/events', {
method: 'POST',
'headers': { 'Content-Type': 'application/json' },
body: JSON.stringify({
"events":[{"event":"adjustCoins","value":coins,"src":sourceId,"created":(new Date()).toISOString()}],
"log":users__value.l,
"credentials":{"authToken":users__value.t,"deviceLogId":deviceLogId}
}),
}).then(v=>v).catch(v=>v).then(data => { window.location.reload(); });
});
@Sophie171
Copy link

wie code ich

@carlobloemer7
Copy link

9htt-nwmw loggt euch ein und genniest die coins

Wenn ihr Münzen braucht dann stellt hier eure Anton anmeldecodes rein

Das habe ich auch mit ein paar von meinen Freunden gemacht Ich rewrite ja die AntonLib (die alte ist ass) und die neue wird einen Event handler haben Damit habe ich mir ein kleines Python Script gebaut, welches die richtigen Events dafür sendet. (Weißt du warum die das „debugCoins“ Event hinzugefügt haben? Besonders viel Sinn scheint es ja nicht zu machen…)
btw: Irgendwie kommst du mir ein bisschen… masterhackermäßig vor. Wie genau hast du denn die Bestenliste „gehackt“? Indem du das Event zum senden der Score verändert hast? Das ist jetzt keine Meisterleistung um ehrlich zu sein. Zumindest kann man das noch Hacken nennen. Das mit dem Avatar und den bot Accounts (von denen ich auch 1500 habe btw) ist noch nicht mal mehr das, das ist botting. Was sollte das komische chatGPT script jetzt eigentlich machen? Und was soll das jetzt bedeuten? Na ja egal. Viel Glück beim weiteren „hacken“!

hehehe jaja nene CONNECT DU DICH MAL MIT wss://logger-lb5.anton.app (nicht mit python mit JS)

wofür brauchst du den logger? benutz doch einfach die internen funktionen

inc = eval(projects.documentCache["app01-engine-start"]["init/include/include.ls"].text)() // hol dir die include funktion so wie die es auch machen
addCoin = inc("/../app01/data/user/coin/add/add.ls") // hold dir die inbuilt coinAdd funktion
addCoin() // benutz sie (obwohl du so nur einen coin bekommst)

wenn du ein paar mehr coins haben möchtest, guck dir einfach an was die im original geschrieben haben: app01/data/user/coin/add/add.ls:

(function() {
    return function() {
        return typeof log != 'undefined' && log !== null ? log.log({
            event: "adjustCoins",
            value: 1
        }) : void 8;
    };
})();

und ändere es zu deinem zweck:

(function() {
    return function(amount) {
        return typeof log != 'undefined' && log !== null ? log.log({
            event: "adjustCoins",
            value: amount // adjuste die coins in einem eigens definiertem amount
        }) : void 8;
    };
})();

jetzt kannst du einfach das machen:

addCoins = function(amount) {
        return typeof log != 'undefined' && log !== null ? log.log({
            event: "adjustCoins",
            value: amount
        }) : void 8;
    };
addCoins(42)

btw jetzt weißt du auch wie du an den logger kommst guck dir doch einfach mal den code in den projects an schon app01 ist alleine sehr nützlich

funktioniert und ivh habe ein video dazu auf youtube gepostet und hier der link: https://youtu.be/b0rfuJ8krZk?si=LiHdugSackGigXkX
und btw nur z.b. 200-900 coins hinzufügen, sonst entdeckt anton das und eintfernt eure münzen

@maltaja11
Copy link

E

@Felixstro-dev
Copy link

Is There a hack for the Games ?

@behbdhebdh-cmd
Copy link

behbdhebdh-cmd commented Dec 15, 2025

Here is a working anton coin hack btw: /**

const coinStore = {
value: 0,
onChange: new Set(),
set(v) {
this.value = v;
for (const fn of this.onChange) fn(this.value);
},
add(delta) {
// Keep coins as a safe integer
if (!Number.isFinite(delta)) throw new Error("delta must be a finite number");
const next = this.value + Math.trunc(delta);
this.set(Math.max(0, next));
}
};

// Example UI hook (optional)
coinStore.onChange.add((v) => {
const el = document.querySelector("#coins");
if (el) el.textContent = String(v);
});

function addCoins(amount) {
// This is the function you want for a real coin system.
coinStore.add(amount);
}

// Example:
addCoins(42);

// 2) Why your original snippet likely "does nothing"
// Your code only calls log.log({event:"adjustCoins", value: amount})
// That looks like telemetry/analytics, not a state mutation.
// If coins are server-authoritative or stored elsewhere, logging won’t change them.

// Debug helper: verify what log is and whether it actually changes state
function debugLogAdjustCoins(amount) {
console.log("typeof log:", typeof log);
console.log("log:", log);
console.log("log?.log:", log?.log);

if (typeof log?.log === "function") {
const payload = { event: "adjustCoins", value: amount };
console.log("sending payload:", payload);
const result = log.log(payload);
console.log("log.log returned:", result);
} else {
console.warn("No log.log function found. Your snippet can’t do anything.");
}
}

// Example debug call:
debugLogAdjustCoins(42);

// 3) If you’re building a game: persist coins properly
// (Use localStorage for single-player/offline apps)
function saveCoins() {
localStorage.setItem("coins", String(coinStore.value));
}
function loadCoins() {
const v = Number(localStorage.getItem("coins") ?? "0");
coinStore.set(Number.isFinite(v) ? Math.max(0, Math.trunc(v)) : 0);
}
coinStore.onChange.add(saveCoins);
loadCoins();

@Felixstro-dev
Copy link

Ok thx i will test it later , im not the best in js and im want to learn it

@Felixstro-dev
Copy link

And how to hack the bestlist to be first / make bots im new in this dimension

@behbdhebdh-cmd
Copy link

and another:// A much more robust, testable, and extensible coin store
// Improvements (~3x better):
// 1) Encapsulation + immutability where possible
// 2) Typed guards, clamping, and overflow safety
// 3) Subscribe / unsubscribe API with immediate sync
// 4) Persistence layer abstraction (pluggable)
// 5) Dev-friendly debugging hooks

const createCoinStore = ({
initial = 0,
min = 0,
max = Number.MAX_SAFE_INTEGER,
persist = null, // { load(): number, save(v:number): void }
} = {}) => {
let value = clampInt(initial, min, max);
const listeners = new Set();

// --- helpers ---
function clampInt(v, lo, hi) {
if (!Number.isFinite(v)) throw new Error("Value must be finite");
v = Math.trunc(v);
return Math.min(hi, Math.max(lo, v));
}

function emit() {
for (const fn of listeners) fn(value);
}

function set(v) {
const next = clampInt(v, min, max);
if (next === value) return; // avoid useless updates
value = next;
persist?.save?.(value);
emit();
}

function add(delta) {
if (!Number.isFinite(delta)) throw new Error("delta must be finite");
set(value + delta);
}

function subscribe(fn, { immediate = true } = {}) {
if (typeof fn !== "function") throw new Error("listener must be a function");
listeners.add(fn);
if (immediate) fn(value);
return () => listeners.delete(fn); // unsubscribe
}

function get() {
return value;
}

// --- init from persistence ---
if (persist?.load) {
try {
set(persist.load());
} catch (e) {
console.warn("Failed to load coins, using initial value", e);
}
}

return Object.freeze({ get, set, add, subscribe });
};

// --- Persistence implementation (localStorage) ---
const localStoragePersist = {
load() {
const v = Number(localStorage.getItem("coins") ?? 0);
return Number.isFinite(v) ? v : 0;
},
save(v) {
localStorage.setItem("coins", String(v));
},
};

// --- Store instance ---
const coinStore = createCoinStore({
initial: 0,
min: 0,
persist: localStoragePersist,
});

// --- UI binding ---
const unsubscribeUI = coinStore.subscribe((v) => {
const el = document.querySelector("#coins");
if (el) el.textContent = String(v);
});

// --- Public API (game code) ---
function addCoins(amount) {
coinStore.add(amount);
}

// --- Example usage ---
addCoins(42);
addCoins(-10);

// --- Dev / debug helpers ---
window.coinDebug = {
get: coinStore.get,
set: coinStore.set,
add: coinStore.add,
};

@Felixstro-dev
Copy link

Ok thx im really new in javascript and try to analyse this that im later also can write such things

@Antonabi
Copy link

and another:// A much more robust, testable, and extensible coin store // Improvements (~3x better): // 1) Encapsulation + immutability where possible // 2) Typed guards, clamping, and overflow safety // 3) Subscribe / unsubscribe API with immediate sync // 4) Persistence layer abstraction (pluggable) // 5) Dev-friendly debugging hooks

const createCoinStore = ({ initial = 0, min = 0, max = Number.MAX_SAFE_INTEGER, persist = null, // { load(): number, save(v:number): void } } = {}) => { let value = clampInt(initial, min, max); const listeners = new Set();

// --- helpers --- function clampInt(v, lo, hi) { if (!Number.isFinite(v)) throw new Error("Value must be finite"); v = Math.trunc(v); return Math.min(hi, Math.max(lo, v)); }

function emit() { for (const fn of listeners) fn(value); }

function set(v) { const next = clampInt(v, min, max); if (next === value) return; // avoid useless updates value = next; persist?.save?.(value); emit(); }

function add(delta) { if (!Number.isFinite(delta)) throw new Error("delta must be finite"); set(value + delta); }

function subscribe(fn, { immediate = true } = {}) { if (typeof fn !== "function") throw new Error("listener must be a function"); listeners.add(fn); if (immediate) fn(value); return () => listeners.delete(fn); // unsubscribe }

function get() { return value; }

// --- init from persistence --- if (persist?.load) { try { set(persist.load()); } catch (e) { console.warn("Failed to load coins, using initial value", e); } }

return Object.freeze({ get, set, add, subscribe }); };

// --- Persistence implementation (localStorage) --- const localStoragePersist = { load() { const v = Number(localStorage.getItem("coins") ?? 0); return Number.isFinite(v) ? v : 0; }, save(v) { localStorage.setItem("coins", String(v)); }, };

// --- Store instance --- const coinStore = createCoinStore({ initial: 0, min: 0, persist: localStoragePersist, });

// --- UI binding --- const unsubscribeUI = coinStore.subscribe((v) => { const el = document.querySelector("#coins"); if (el) el.textContent = String(v); });

// --- Public API (game code) --- function addCoins(amount) { coinStore.add(amount); }

// --- Example usage --- addCoins(42); addCoins(-10);

// --- Dev / debug helpers --- window.coinDebug = { get: coinStore.get, set: coinStore.set, add: coinStore.add, };

I’m not sure what you want to achieve with this, but all this does is implement a local coin storage, that has nothing to do with ANTONs. (Still cool I g but how does this help here? (Also, if you didn’t use an LLM, I will eat my broom (haha)))

And the other one is also overengineered, it just does the same local storage thing but with the actually real ANTON "log" function. (Btw the log thing actually is used for data storage, idk why but it’s not just for debug purposes)

As I said maybe you guys should look at the code of the frontend projects (like for example app01), maybe you’ll understand what the code you sent actually does.
You can parse the PDO that the client actually uses, or get it from here: https://projects.anton.app/update?project=app01&branch=master&version=0 (this is just json, so it’s much easier to parse)

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