Skip to content

Instantly share code, notes, and snippets.

@dexhunter
Last active March 12, 2025 12:25
Show Gist options
  • Save dexhunter/b4a6cdf49aac9a40a0de91c8a5589588 to your computer and use it in GitHub Desktop.
Save dexhunter/b4a6cdf49aac9a40a0de91c8a5589588 to your computer and use it in GitHub Desktop.
idleon hack
Math.originalRandom = Math.random;
Math.lowRandom = function() {
return Math.originalRandom() / 100000000000;}
Math.highRandom = function() {
return 1 - Math.lowRandom();}
let breakCycle = false;function luckyCycle() {
return setTimeout(function() {
if (breakCycle) return;
// console.log('rng on');
Math.random = Math.lowRandom;
return setTimeout(function() {
//console.log('rng off');
Math.random = Math.highRandom;
return setTimeout(luckyCycle, 30000);
}, 30000);
});}
// Math.random = Math.lowRandom;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment