Last active
November 14, 2024 08:55
-
-
Save acquitelol/a573c86be34a5d9035c904a21f770ef3 to your computer and use it in GitHub Desktop.
Unlocks every single possible known blook in Blooket. Either run this through a userscript or simply execute in the console while in a game lobby or in your blook dashboard..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
ok
…On Mon, Oct 7, 2024 at 7:51 PM Tylanmit ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
It won't stay on there though once you leave and come back/ Refresh
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/acquitelol/a573c86be34a5d9035c904a21f770ef3#gistcomment-5224400>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BL5DRHSFE3ERVFTCRYWWJJ3Z2MM63BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGMBWGM4TOMJSU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it didn't work just said undefied