-
-
Save acquitelol/a573c86be34a5d9035c904a21f770ef3 to your computer and use it in GitHub Desktop.
async function lazyDefine(callback, condition, maxAttempts = 100, time = 100) { | |
let attempt = 0; | |
while (attempt < maxAttempts) { | |
const result = callback(); | |
if (condition ? condition(result) : result) return result; | |
await new Promise(res => setTimeout(res, time)); | |
attempt++; | |
} | |
return null; | |
} | |
function instead(object, name, callback) { | |
const orig = object[name]; | |
object[name] = function (...args) { | |
return callback(this, args, orig); | |
} | |
return () => (object[name] = orig); | |
} | |
window.reactHandler = async () => { | |
const getFiber = (node) => Object.values(node)?.[1]?.children[1]?._owner; | |
const handler = await lazyDefine( | |
() => document.querySelector('#app > div > div'), | |
// This is necessary because null's type is "object" | |
target => { | |
if (!target) return false; | |
const node = getFiber(target).stateNode; | |
return node && typeof node === 'object'; | |
}, | |
undefined, | |
Infinity | |
); | |
return getFiber(handler); | |
}; | |
let blooks; | |
function callback(self, args, orig) { | |
if (!('Chick' in args[0])) return orig.apply(self, args); | |
blooks = args[0]; | |
return orig.apply(self, args); | |
} | |
const unpatchKeys = instead(Object, 'keys', callback); | |
const unpatchEntries = instead(Object, 'entries', callback); | |
window.getBlooks = () => Object.keys(blooks).filter(blook => blook !== 'Dull Blue'); | |
window.main = async function () { | |
await lazyDefine(() => document.querySelector('[class*="_blooksHolder_"]')); | |
await lazyDefine(() => blooks); | |
const handler = await window.reactHandler(); | |
unpatchKeys(); | |
unpatchEntries(); | |
if (handler?.stateNode?.state?.blookData) { | |
console.info('Applying blooks to dashboard...'); | |
handler.stateNode.setState({ | |
allSets: [ | |
...new Set([ | |
...handler.stateNode.state.allSets, | |
'Blizzard', | |
'Spooky', | |
'Hidden', | |
'Color' | |
]) | |
], | |
blookData: ( | |
[...new Set([ | |
...Object.keys(handler.stateNode.state.blookData), | |
...window.getBlooks(), | |
])] | |
).reduce((acc, blook) => ({ ...acc, [blook]: 39 }), {}), | |
blook: 'Spooky Ghost' | |
}); | |
handler.stateNode.forceUpdate(); | |
} | |
if (handler?.stateNode?.state?.unlocks) { | |
console.info('Applying blooks to lobby...'); | |
handler.stateNode.setState({ | |
// Ensure that there are no duplicate blooks | |
unlocks: [...new Set([ | |
...handler.stateNode.state.unlocks, | |
...window.getBlooks(), | |
])], | |
takenBlooks: [] | |
}); | |
handler.stateNode.forceUpdate(); | |
// This needs no timeout, it just needs to be pushed on the event stack | |
// and therefore not executed eagerly. | |
setTimeout(() => handler.stateNode.setBlook('Spooky Ghost')); | |
} | |
} | |
// Detect when the user navigates to "/play/lobby" as that's | |
// the path we need to be in to yield any handlers. | |
const paths = ['/play/lobby', '/blooks']; | |
instead(history, 'pushState', (self, args, orig) => { | |
if (paths.some(path => args.includes(path))) { | |
window.main(); | |
} | |
return orig.apply(self, args); | |
}) | |
if (paths.includes(window.location.pathname)) { | |
window.main(); | |
} |
it didn't work just said undefied
Mine worked I just had to push enter and then spam click one of the blooks I already had and they just popped up.
It won't stay on there though once you leave and come back/ Refresh
How do you actually get it up? Cause I can't
he you just have to copy that and then when you go to the blooket you go to blooks and then you hold ctrl and shift at the same time and then you just press i. And then you paste it and hit enter after you just press on the random blook that you have, and it will show that you have every blook on blooket.
can you explain what were pasting and were I'm confused
how do it do it mine send undifdy
what
i do not understand
how do you past it in
You Have To Hit Ctrl + Shift + P To Submit The Code.
How can i make them stay
It Works When You Don't Refresh / Close The Tab But Then It Disappears, So There Is No Possible Way Of Leaving It Like That
¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)/¯¯_(ツ)_/¯
¯_(ツ)_/¯
\\\
You can, you need to use the Tampermonkey chrome extension. You can just add this as a Userscript that runs whenever you visit any Blooket website/subpath, I have logic in it to prevent it from initializing unless it needs to.
i dont know what to do
it didn't work just said undefied