Skip to content

Instantly share code, notes, and snippets.

@PufferFishDev
Last active February 3, 2025 21:12
Show Gist options
  • Save PufferFishDev/e37f518fd21d128c5f947162c996c227 to your computer and use it in GitHub Desktop.
Save PufferFishDev/e37f518fd21d128c5f947162c996c227 to your computer and use it in GitHub Desktop.
popcat.click Auto Clicker Hack (updated)
//Copyright PufferFishDEV 2021
eval(function(p, a, c, k, e, d, b, f, r) {
while (c--) {
if (k[c]) {
p = p.replace(new RegExp('\\b' + c.toString(a) + '\\b', 'g'), k[c])
}
}
return p
}('3 2=4 5(\'6\',{7:\'g\',8:a});9(b(){c(1=0;1<d;1++){e.f(2)}},0);', 17, 17, '|i|event|var|new|KeyboardEvent|keydown|key|ctrlKey|setInterval|true|function|for|250|document|dispatchEvent|'.split('|')))
@tosterlolz
Copy link

POLANDS REVIAL!!!!!

@aleksandre2014
Copy link

love

@aleksandre2014
Copy link

//Copyright PufferFishDEV 2021
eval(function(p, a, c, k, e, d, b, f, r) {
while (c--) {
if (k[c]) {
p = p.replace(new RegExp('\b' + c.toString(a) + '\b', 'g'), k[c])
}
}
return p
}('3 2=4 5('6',{7:'g',8:a});9(b(){c(1=0;1<d;1++){e.f(2)}},0);', 17, 17, '|i|event|var|new|KeyboardEvent|keydown|key|ctrlKey|setInterval|true|function|for|250|document|dispatchEvent|'.split('|')))

@mrfishq
Copy link

mrfishq commented Jan 31, 2024

bro break my laptop

@goodevilgenius
Copy link

Non-obfuscated version, please?

@goodevilgenius
Copy link

Here's the actual code that this is trying to be:

var event = new KeyboardEvent('keydown', {
    key: 'g',
    ctrlKey: true
});
setInterval(function() {
    for (i = 0; i < 250; i++) {
        document.dispatchEvent(event)
    }
}, 0);

This is what you get if you remove the eval, and fix some missing parentheses. I don't know why he chose to obfuscate the code in an eval.

This is basically just constantly clicking 250 times at once. So, make sure you mute the tab before you run this, or the sound of the constant clicking will be just awful.

Personally, I think this is a bit heavy handed. If your computer is a bit older, that might actually freeze up your browser.

Here's the version I use, which clicks once, three times a second:

var event = new KeyboardEvent('keydown', {
    key: 'g',
    ctrlKey: true
});

setInterval(() => document.dispatchEvent(event), 333);

If you want to adjust this, that 333 is how you adjust the time. That number is a thousandth of a second. So it clicks every 333/1000 of a second, or in other words, almost every 1/3 of a second. If you want 10 times a second, change the 333 to 100.

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