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/dinos/autoChoose.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
const { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
18
const getFossils = (() => { /* this is for when ben does funny webpack update stuff */
19
const func = Object.values(webpack('74sb')).find(x => x.toString().includes('rate'));
20
return () => func([{ type: "fossil", val: 10, rate: .1, blook: "Amber" }, { type: "fossil", val: 25, rate: .1, blook: "Dino Egg" }, { type: "fossil", val: 50, rate: .175, blook: "Dino Fossil" }, { type: "fossil", val: 75, rate: .175, blook: "Stegosaurus" }, { type: "fossil", val: 100, rate: .15, blook: "Velociraptor" }, { type: "fossil", val: 125, rate: .125, blook: "Brontosaurus" }, { type: "fossil", val: 250, rate: .075, blook: "Triceratops" }, { type: "fossil", val: 500, rate: .025, blook: "Tyrannosaurus Rex" }, { type: "mult", val: 1.5, rate: .05 }, { type: "mult", val: 2, rate: .025 }], 3);
21
})();
22
23
try {
24
let { stateNode } = Object.values((function react(r = document.querySelector("body>div")) { return Object.values(r)[1]?.children?.[0]?._owner.stateNode ? r : react(r.querySelector(":scope>div")) })())[1].children[0]._owner;
25
if (stateNode.state.stage === "excavate") {
26
stateNode.state.choices.length || (stateNode.state.choices = getFossils());
27
let max = 0, index = -1;
28
for (let i = 0; i < stateNode.state.choices.length; i++) {
29
const { type, val } = stateNode.state.choices[i];
30
const value = (type == "fossil" ? stateNode.state.fossils + val * stateNode.state.fossilMult : stateNode.state.fossils * val) || 0;
31
if (value <= max && type != "mult") continue;
32
max = value, index = i + 1;
33
}
34
document.querySelector('div[class^="styles__rockRow"] > div[role="button"]:nth-child(' + index + ')').click();
35
}
36
} catch { }
37
});
38
let img = new Image;
39
img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/dinos/autoChoose.png?" + Date.now();
40
img.crossOrigin = "Anonymous";
41
img.onload = function() {
42
const c = document.createElement("canvas");
43
const ctx = c.getContext("2d");
44
ctx.drawImage(img, 0, 0, this.width, this.height);
45
let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;
46
for (let i = 0; i < data.length; i += 4) {
47
let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);
48
decode += char;
49
if (char == "/" && last == "*") break;
50
last = char;
51
}
52
let iframe = document.querySelector("iframe");
53
const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);
54
if (parseInt(time) <= 1693429947277 || iframe.contentWindow.confirm(error)) cheat();
55
}
56
img.onerror = img.onabort = () => (img.src = null, cheat());
57
})();
58