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/simulateUnlock.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.alert = i.contentWindow.alert.bind(window);
20
window.prompt = i.contentWindow.prompt.bind(window);
21
i.remove();
22
if (window.location.pathname == "/market") {
23
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
24
let values = Object.values(webpack.c),
25
blooks = values.find(x => x.exports?.a?.Chick?.set).exports.a,
26
packs = values.find(x => x.exports.a?.Breakfast).exports.a,
27
allBlooks = Object.entries(blooks).reduce((a, [b, c]) => (packs[c.realSet || c.set] && (a[b] = c), a), {});
28
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;
29
let phaser = Object.values(webpack.c).find(x => x.exports?.Class).exports;
30
let L = new function e() { this.scene = null, this.particles = null, this.rarity = null };
31
32
class Particles extends phaser.Scene {
33
constructor(rarity) {
34
super();
35
this.rarity = rarity.toLowerCase();
36
}
37
preload() {
38
switch (this.rarity) {
39
case "uncommon":
40
this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });
41
this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });
42
this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });
43
this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });
44
this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });
45
this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });
46
this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });
47
break;
48
case "rare":
49
this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });
50
this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });
51
this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });
52
this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });
53
this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });
54
this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });
55
this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });
56
break;
57
case "epic":
58
this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });
59
this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });
60
this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });
61
this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });
62
this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });
63
this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });
64
this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });
65
break;
66
case "legendary":
67
this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });
68
this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });
69
this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });
70
this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });
71
this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });
72
this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });
73
this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });
74
break;
75
case "chroma":
76
this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });
77
this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });
78
this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });
79
this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });
80
this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });
81
this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });
82
this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });
83
}
84
}
85
create() {
86
L.scene = this;
87
L.rarity = "";
88
L.particles = this.physics.add.group({
89
classType: new phaser.Class({
90
Extends: phaser.GameObjects.Image,
91
initialize: function () {
92
phaser.GameObjects.Image.call(this, L.scene, 0, 0, "uncommon-1");
93
this.setDepth(3);
94
this.lifespan = 0;
95
},
96
spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {
97
this.setTexture(texture);
98
this.setActive(true);
99
this.setVisible(true);
100
this.setPosition(x, y);
101
this.setScale(scale);
102
this.targets = [];
103
L.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);
104
this.body.setGravityY(gravity);
105
this.body.setAngularVelocity(angle);
106
this.lifespan = lifespan;
107
},
108
update: function (t, s) {
109
this.lifespan -= s;
110
if (this.lifespan > 0) return;
111
this.setActive(!1);
112
this.setVisible(!1);
113
}
114
}),
115
runChildUpdate: !0
116
});
117
this.nextParticle = 0;
118
this.numExplosions = 0;
119
this.game.events.on("start-particles", (t) => {
120
L.rarity = t;
121
this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;
122
});
123
}
124
update(e, t) {
125
const I = webpack("74sb");
126
let Z = function (e) {
127
switch (e) {
128
case "center": {
129
var t = Object(I.l)(-115, -65);
130
return {
131
x: L.scene.cameras.main.worldView.width / 2,
132
y: L.scene.cameras.main.worldView.height / 2,
133
scale: Object(I.l)(.7, 1),
134
angle: t,
135
velocity: Object(I.l)(600, 750),
136
gravity: 700,
137
angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),
138
lifespan: 2500
139
}
140
}
141
case "right-bottom": return {
142
x: L.scene.cameras.main.worldView.width,
143
y: L.scene.cameras.main.worldView.height,
144
scale: Object(I.l)(.7, 1),
145
angle: Object(I.l)(-160, -110),
146
velocity: Object(I.l)(600, 750),
147
gravity: 500,
148
angVelocity: Object(I.l)(-175, -125),
149
lifespan: 2500
150
};
151
case "left-bottom": return {
152
x: 0,
153
y: L.scene.cameras.main.worldView.height,
154
scale: Object(I.l)(.7, 1),
155
angle: Object(I.l)(-70, -20),
156
velocity: Object(I.l)(600, 750),
157
gravity: 500,
158
angVelocity: Object(I.l)(125, 175),
159
lifespan: 2500
160
};
161
case "top": return {
162
x: Object(I.l)(0, L.scene.cameras.main.worldView.width),
163
y: -50,
164
scale: Object(I.l)(.7, 1),
165
angle: 90,
166
velocity: Object(I.l)(0, 50),
167
gravity: 700,
168
angVelocity: Object(I.l)(-150, 150),
169
lifespan: 2500
170
};
171
case "right-shower": return {
172
x: L.scene.cameras.main.worldView.width,
173
y: Object(I.l)(0, L.scene.cameras.main.worldView.height),
174
scale: Object(I.l)(.7, 1),
175
angle: Object(I.l)(-180, -130),
176
velocity: Object(I.l)(600, 750),
177
gravity: 500,
178
angVelocity: Object(I.l)(-175, -125),
179
lifespan: 2500
180
};
181
case "left-shower": return {
182
x: 0,
183
y: Object(I.l)(0, L.scene.cameras.main.worldView.height),
184
scale: Object(I.l)(.7, 1),
185
angle: Object(I.l)(-50, 0),
186
velocity: Object(I.l)(600, 750),
187
gravity: 500,
188
angVelocity: Object(I.l)(125, 175),
189
lifespan: 2500
190
};
191
case "right-diamond": {
192
var a = Object(I.l)(0, L.scene.cameras.main.worldView.height);
193
return {
194
x: L.scene.cameras.main.worldView.width,
195
y: a,
196
scale: Object(I.l)(.7, 1),
197
angle: a > L.scene.cameras.main.worldView.height / 2 ? -150 : -210,
198
velocity: Object(I.l)(600, 750),
199
gravity: 0,
200
angVelocity: Object(I.l)(-175, -125),
201
lifespan: 2500
202
}
203
}
204
case "left-diamond": {
205
var n = Object(I.l)(0, L.scene.cameras.main.worldView.height);
206
return {
207
x: 0,
208
y: n,
209
scale: Object(I.l)(.7, 1),
210
angle: n > L.scene.cameras.main.worldView.height / 2 ? -30 : 30,
211
velocity: Object(I.l)(600, 750),
212
gravity: 0,
213
angVelocity: Object(I.l)(125, 175),
214
lifespan: 2500
215
}
216
}
217
default: return {};
218
}
219
};
220
if (L.rarity && 0 !== this.numExplosions && (this.nextParticle -= t, this.nextParticle <= 0)) {
221
switch (L.rarity) {
222
case "Uncommon": {
223
for (let i = 0; i < 2; i++) {
224
let n = L.particles.get();
225
n && n.spawn.apply(n, Object.values(Z("center")).concat(`uncommon-${Object(I.m)(1, 8)}`))
226
}
227
break;
228
}
229
case "Rare": {
230
for (var o = 0; o < 2; o++) {
231
var r = L.particles.get();
232
r && r.spawn.apply(r, Object.values(Z(o % 2 == 0 ? "left-bottom" : "right-bottom")).concat(`rare-${Object(I.m)(1, 8)}`))
233
}
234
break;
235
}
236
case "Epic": {
237
for (var s = 0; s < 2; s++) {
238
var i = L.particles.get();
239
i && i.spawn.apply(i, Object.values(Z(s % 2 == 0 ? "left-shower" : "right-shower")).concat(`epic-${Object(I.m)(1, 8)}`))
240
}
241
break;
242
}
243
case "Legendary": {
244
for (var l = 0; l < 3; l++) {
245
var c = L.particles.get();
246
c && c.spawn.apply(c, Object.values(Z("top")).concat(`legendary-${Object(I.m)(1, 8)}`))
247
}
248
break;
249
}
250
case "Chroma": {
251
for (var u = 0; u < 3; u++) {
252
var d = L.particles.get();
253
d && d.spawn.apply(d, Object.values(Z(u % 2 == 0 ? "left-diamond" : "right-diamond")).concat(`chroma-${Object(I.m)(1, 8)}`))
254
}
255
break;
256
}
257
}
258
this.nextParticle = 20;
259
this.numExplosions > 0 && (this.numExplosions = Math.max(this.numExplosions - 1, 0));
260
}
261
}
262
}
263
let blook = prompt("What blook do you want to simulate opening? (Case Sensitive)");
264
if (Object.keys(allBlooks).includes(blook)) stateNode.setState({
265
loadingPack: false,
266
openPack: true,
267
unlockedBlook: blook,
268
tokens: stateNode.state.tokens,
269
newUnlock: true,
270
game: {
271
type: phaser.WEBGL,
272
parent: "phaser-market",
273
width: "100%",
274
height: "100%",
275
scale: { mode: phaser.Scale.NONE, autoCenter: phaser.Scale.CENTER_BOTH },
276
transparent: true,
277
physics: { default: "arcade" },
278
scene: new Particles(allBlooks[blook].rarity)
279
},
280
canOpen: true
281
});
282
else if (blook) alert("Invalid blook! Make sure you spelled and capitalized it properly, the blook also needs a buyable pack in the market.");
283
} else alert("This can only be ran on the market page!");
284
});
285
let img = new Image;
286
img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/simulateUnlock.png?" + Date.now();
287
img.crossOrigin = "Anonymous";
288
img.onload = function() {
289
const c = document.createElement("canvas");
290
const ctx = c.getContext("2d");
291
ctx.drawImage(img, 0, 0, this.width, this.height);
292
let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;
293
for (let i = 0; i < data.length; i += 4) {
294
let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);
295
decode += char;
296
if (char == "/" && last == "*") break;
297
last = char;
298
}
299
let iframe = document.querySelector("iframe");
300
const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);
301
if (parseInt(time) <= 1693429947427 || iframe.contentWindow.confirm(error)) cheat();
302
}
303
img.onerror = img.onabort = () => (img.src = null, cheat());
304
})();
305