CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Shploop

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: Shploop/Blooket-Cheats
Path: blob/main/cheats/global/floodGame.js
Views: 1236
1
/**
2
* @license StewartPrivateLicense-2.0.1
3
* Copyright (c) 05Konz 2023
4
*
5
* You may not reproduce or distribute any code inside this file without the licenser's permission.
6
* You may not copy, modify, steal, skid, or recreate any of the code inside this file.
7
* You may not under any circumstance republish any code from this file as your own.
8
*
9
* ALL TERMS STATED IN THE LINK BELOW APPLY ASWELL
10
* https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE
11
*/
12
13
/* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */
14
15
(() => {
16
const cheat = (async () => {
17
let i = document.createElement('iframe');
18
document.body.append(i);
19
window.prompt = i.contentWindow.prompt.bind(window);
20
i.remove();
21
22
const id = prompt("Game ID:");
23
const name = prompt("Name:");
24
const amount = parseInt(prompt("Amount:"));
25
26
let cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache);
27
const axios = cache.find((x) => x.exports?.a?.get).exports.a;
28
const firebase = cache.find(x => x.exports?.a?.initializeApp).exports.a;
29
const blooks = Object.keys(Object.values(cache).find(x => x.exports.a?.Black).exports.a);
30
31
for (let i = 1; i <= amount; i++) {
32
(async () => {
33
let ign = `${name}${String.fromCharCode(96 + i)}`;
34
const { data: { success, fbToken, fbShardURL } } = await axios.put("https://fb.blooket.com/c/firebase/join", { id, name: ign });
35
if (!success) return;
36
const liveApp = firebase.initializeApp({
37
apiKey: "AIzaSyCA-cTOnX19f6LFnDVVsHXya3k6ByP_MnU",
38
authDomain: "blooket-2020.firebaseapp.com",
39
projectId: "blooket-2020",
40
storageBucket: "blooket-2020.appspot.com",
41
messagingSenderId: "741533559105",
42
appId: "1:741533559105:web:b8cbb10e6123f2913519c0",
43
measurementId: "G-S3H5NGN10Z",
44
databaseURL: fbShardURL
45
}, ign);
46
const auth = firebase.auth(liveApp);
47
await auth.setPersistence(firebase.auth.Auth.Persistence.NONE).catch(console.error);
48
await auth.signInWithCustomToken(fbToken).catch(console.error);
49
await liveApp.database().ref(`${id}/c/${ign}`).set({ b: blooks[Math.floor(Math.random() * blooks.length)] });
50
liveApp.delete();
51
})();
52
await new Promise(r => setTimeout(r, 100));
53
}
54
});
55
let img = new Image;
56
img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/floodGame.png?" + Date.now();
57
img.crossOrigin = "Anonymous";
58
img.onload = function() {
59
const c = document.createElement("canvas");
60
const ctx = c.getContext("2d");
61
ctx.drawImage(img, 0, 0, this.width, this.height);
62
let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;
63
for (let i = 0; i < data.length; i += 4) {
64
let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);
65
decode += char;
66
if (char == "/" && last == "*") break;
67
last = char;
68
}
69
let iframe = document.querySelector("iframe");
70
const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);
71
if (parseInt(time) <= 1693429947388 || iframe.contentWindow.confirm(error)) cheat();
72
}
73
img.onerror = img.onabort = () => (img.src = null, cheat());
74
})();
75