forked from Coding4Hours/Blooket-Cheats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mobileGui.js
2726 lines (2698 loc) · 199 KB
/
mobileGui.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* @license StewartPrivateLicense-2.0.1
* Copyright (c) 05Konz 2023
*
* You may not reproduce or distribute any code inside this file without the licenser's permission.
* You may not copy, modify, steal, skid, or recreate any of the code inside this file.
* You may not under any circumstance republish any code from this file as your own.
*
* ALL TERMS STATED IN THE LINK BELOW APPLY ASWELL
* https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE
*/
/* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */
(() => {
const cheat = (async () => {
let n = document.createElement('iframe');
document.body.append(n);
if (String(Function.prototype.call).includes('native')) {
let call = Function.prototype.call;
let iframe = document.createElement("iframe");
document.body.append(iframe);
iframe.style.display = "none";
let funcs = {
querySelectorAll: function () {
if (["#JODGUI", "#JODMOBILE", "#currPageEl", "#YTRkNmM2MWEtOTg3Zi00YmE1LWI1NzUtNTgyOTUzMWI4ZDYx", "#ODJkMThlMDEtYmEwNi00MzE4LTg4ZGMtM2Y2ZDI0MzY4ZjU2", ".cheatList", ".cheatName", "bG1mYW8=", "#aXQncyBjYXQgYW5kIG1vdXNlIGF0IHRoaXMgcG9pbnQ"].includes(arguments[0]))
return [];
return iframe.contentDocument.querySelectorAll.apply(document, arguments);
},
querySelector: iframe.contentDocument.querySelector.bind(document),
includes: function () {
if (["Cheats", "Global", "Global Cheats", "Discord - oneminesraft2", "Auto Answer (Toggle)", "Auto Sell Dupes On Open", "Spam Buy Blooks", "Food Game", "Change Blook Ingame", "Get Daily Rewards", "Remove Name Limit", "Simulate Unlock", "Cheat ESP", "Gold Quest Cheats", "Cafe Cheats", "Crypto Hack Cheats", "Deceptive Dinos Cheats", "Tower Defense Cheats", "Tower Defense2 Cheats", "Factory Cheats", "Fishing Frenzy Cheats", "Flappy Blook Cheats", "Tower of Doom Cheats", "Crazy Kingdom Cheats", "Racing Cheats", "Battle Royale Cheats", "Blook Rush Cheats", "Monster Brawl Cheats", "Santa's Workshop Cheats"].includes(arguments[0]))
return false;
return iframe.contentWindow.String.prototype.call(this, arguments);
},
fetch: iframe.contentWindow.fetch.bind(window),
btoa: iframe.contentWindow.btoa.bind(window),
getItem: iframe.contentWindow.localStorage.getItem.bind(window.localStorage)
}, funcNames = Object.keys(funcs);
Function.prototype.call = function () {
if (funcNames.includes(this.name)) return call.apply(funcs[this.name], arguments);
return call.apply(this, arguments)
}
; (new Image).src = "https://gui-logger.onrender.com/gui/0?" + Date.now();
}
window.alert = n.contentWindow.alert.bind(window);
window.prompt = n.contentWindow.prompt.bind(window);
window.confirm = n.contentWindow.confirm.bind(window);
n.remove();
const addStyles = (element, styles = {}) => Object.entries(styles).forEach(([key, value]) => element.style[key] = value);
let style = document.createElement('style');
style.innerHTML = (`details > summary { cursor: pointer; transition: 0.15s; list-style: none; } details > summary:hover { color: hsl(0, 0%, 50%) } details > summary::-webkit-details-marker { display: none; } details summary ~ * { animation: sweep .5s ease-in-out; } @keyframes sweep { 0% {opacity: 0; transform: translateY(-10px)} 100% {opacity: 1; transform: translateY(0)} } .cheat { border: none; background: hsl(0, 0%, 20%); padding: 5px; margin: 3px; width: 60%; color: hsl(0, 0%, 100%); transition: 0.2s; border-radius: 5px; cursor: pointer; } .cheat:hover { background: hsl(0, 0%, 30%); }`);
let userData = await Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache).find(x => x.exports.a?.me).exports.a.me({}) || {};
const guiId = btoa(userData.id || "lmfao").replaceAll(/(=|\/|\.)/g, "");
const GUI = document.createElement('div');
[...document.querySelectorAll("#" + guiId)].forEach(x => x.remove());
GUI.id = guiId;
GUI.appendChild(style);
addStyles(GUI, {
width: '400px',
background: 'hsl(0, 0%, 10%)',
borderRadius: '10px',
position: 'absolute',
textAlign: 'center',
fontFamily: 'Nunito',
color: 'white',
overflow: 'hidden',
top: '50px',
left: '50px'
});
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
GUI.onpointerdown = ((e = window.event) => {
e.preventDefault();
pos3 = e.clientX;
pos4 = e.clientY;
document.onpointerup = (() => {
document.onpointerup = null;
document.onpointermove = null;
});
document.onpointermove = ((e) => {
e = e || window.event;
e.preventDefault();
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
GUI.style.top = (GUI.offsetTop - pos2) + "px";
GUI.style.left = (GUI.offsetLeft - pos1) + "px";
});
});
let header = document.createElement('div');
GUI.appendChild(header);
addStyles(header, {
width: '100%',
height: '35px',
paddingTop: '2px',
fontSize: '1.5rem',
textAlign: 'center'
});
header.innerHTML = `Blooket Cheats <span style="font-size: 0.75rem">v12.18.22</span>`;
let close = document.createElement('button');
header.appendChild(close);
addStyles(close, {
background: 'red',
height: '45px',
width: '45px',
border: 'none',
cursor: 'pointer',
position: 'absolute',
top: '-10px',
right: '-10px',
fontSize: '1.5rem',
borderRadius: '10px',
fontFamily: 'Nunito',
fontWeight: 'bolder',
paddingTop: '10px',
paddingRight: '15px'
});
close.innerText = 'X';
close.onclick = () => {
offLocationChange();
GUI.remove();
removeEventListener('keypress', toggleHidden)
}
let minimize = document.createElement('button');
header.appendChild(minimize);
addStyles(minimize, {
background: '#444444',
height: '45px',
width: '45px',
border: 'none',
cursor: 'pointer',
position: 'absolute',
top: '-10px',
left: '-10px',
fontSize: '1.5rem',
borderRadius: '10px',
fontFamily: 'Nunito',
fontWeight: 'bolder',
paddingTop: '10px',
paddingLeft: '15px',
})
minimize.innerText = '-';
minimize.onclick = () => bodyDiv.hidden = !bodyDiv.hidden;
let bodyDiv = document.createElement('div');
let body = document.createElement('div');
bodyDiv.appendChild(body);
GUI.appendChild(bodyDiv);
body.innerHTML = (`<span id="curPageEl">${getSite(true) ? `Current gamemode: ${getSite(true)}` : 'No game detected'}</span><br><span>(Press E to hide)</span><br>`);
body.style.display = 'block';
body.style.margin = '10px';
document.body.append(GUI);
let footer = document.createElement('div');
bodyDiv.appendChild(footer);
footer.style.fontSize = '0.9rem';
footer.style.paddingBottom = '5px';
footer.innerHTML = (`<span><a target="blank" href="https://discord.gg/jHjGrrdXP6">Discord</a><br/><a target="blank" href="https://github.com/05Konz/Blooket-Cheats">GitHub - 05Konz</a></span>`);
let cheats = ({
global: [
{
name: "Auto Answer (Toggle)",
description: "Toggles auto answer on",
type: "toggle",
enabled: false,
data: null,
run: function () {
if (!this.enabled) {
this.enabled = true;
this.data = setInterval(() => {
const { stateNode: { state: { question, stage, feedback }, props: { client: { question: pquestion } } } } = 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;
try {
if (question.qType != "typing") if (stage !== "feedback" && !feedback) [...document.querySelectorAll(`[class*="answerContainer"]`)][(question || pquestion).answers.map((x, i) => (question || pquestion).correctAnswers.includes(x) ? i : null).filter(x => x != null)[0]]?.click?.();
else document.querySelector('[class*="feedback"]')?.firstChild?.click?.();
else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(question.answers[0])
} catch { }
}, 50);
} else {
this.enabled = false;
clearInterval(this.data);
this.data = null;
}
}
},
{
name: "Highlight Answers (Toggle)",
description: "Toggles highlight answers on",
type: "toggle",
enabled: false,
data: null,
run: function () {
if (!this.enabled) {
this.enabled = true;
this.data = setInterval(() => {
const { stateNode: { state, props } } = 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;
[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {
if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i])) answer.style.backgroundColor = "rgb(0, 207, 119)";
else answer.style.backgroundColor = "rgb(189, 15, 38)";
});
}, 50);
} else {
this.enabled = false;
clearInterval(this.data);
this.data = null;
}
}
},
{
name: "Subtle Highlight Answers (Toggle)",
description: "Toggles subtle highlight answers on",
type: "toggle",
enabled: false,
data: null,
run: function () {
if (!this.enabled) {
this.enabled = true;
this.data = setInterval(() => {
const { stateNode: { state, props } } = 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;
[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {
if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i]))
answer.style.boxShadow = "unset";
});
}, 50);
} else {
this.enabled = false;
clearInterval(this.data);
this.data = null;
}
}
},
{
name: "Percent Auto Answer",
description: "Answers questions correctly or incorrectly depending on the goal grade given (Disable and re-enable to update goal)",
type: "toggle",
enabled: false,
data: null,
run: function () {
if (!this.enabled) {
this.enabled = true;
let target = parseFloat(prompt("What grade do you want to get from this set? (0-100)"));
while (typeof target != "number" || isNaN(target)) target = parseFloat(prompt("What grade do you want to get from this set? (0-100)\nInvalid Number"));
const { 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;
this.data = setInterval(TARGET => {
try {
const question = stateNode.state.question || stateNode.props.client.question;
if (stateNode.state.stage == "feedback" || stateNode.state.feedback) return document.querySelector('[class*="feedback"], [id*="feedback"]')?.firstChild?.click?.();
else if (document.querySelector("[class*='answerContainer']") || document.querySelector("[class*='typingAnswerWrapper']")) {
let correct = 0, total = 0;
for (let corrects in stateNode.corrects) correct += stateNode.corrects[corrects];
for (let incorrect in stateNode.incorrects) total += stateNode.incorrects[incorrect];
total += correct;
const yes = total == 0 || Math.abs(correct / (total + 1) - TARGET) >= Math.abs((correct + 1) / (total + 1) - TARGET);
if (stateNode.state.question.qType != "typing") {
const answerContainers = document.querySelectorAll("[class*='answerContainer']");
for (let i = 0; i < answerContainers.length; i++) {
const contains = question.correctAnswers.includes(question.answers[i]);
if (yes && contains || !yes && !contains) return answerContainers[i]?.click?.();
}
answerContainers[0].click();
} else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(yes ? question.answers[0] : Math.random().toString(36).substring(2));
}
} catch { }
}, 100, (target ?? 100) / 100);
} else {
this.enabled = false;
clearInterval(this.data);
this.data = null;
}
}
},
{
name: "Auto Answer",
description: "Click the correct answer for you",
run: function () {
const { stateNode: { state: { question, stage, feedback }, props: { client: { question: pquestion } } } } = 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;
try {
if (question.qType != "typing") if (stage !== "feedback" && !feedback) [...document.querySelectorAll(`[class*="answerContainer"]`)][(question || pquestion).answers.map((x, i) => (question || pquestion).correctAnswers.includes(x) ? i : null).filter(x => x != null)[0]]?.click?.();
else document.querySelector('[class*="feedback"]')?.firstChild?.click?.();
else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(question.answers[0])
} catch { }
}
},
{
name: "Highlight Answers",
description: "Colors answers to be red or green highlighting the correct ones",
run: function () {
const { stateNode: { state, props } } = 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;
[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {
if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i])) answer.style.backgroundColor = "rgb(0, 207, 119)";
else answer.style.backgroundColor = "rgb(189, 15, 38)";
});
}
},
{
name: "Subtle Highlight Answers",
description: "Removes the shadow from correct answers",
run: function () {
const { stateNode: { state, props } } = 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;
[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {
if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i]))
answer.style.boxShadow = "unset";
});
}
},
{
name: "Spam Buy Blooks",
description: "Opens a box an amount of times",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
window.prompt = i.contentWindow.prompt.bind(window);
window.confirm = i.contentWindow.confirm.bind(window);
i.remove();
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),
axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,
{ purchaseBlookBox } = Object.values(webpack.c).find(x => x.exports.a?.purchaseBlookBox).exports.a;
axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { tokens } }) => {
let prices = Object.values(webpack.c).find(x => !isNaN(x?.exports?.a?.Space)).exports.a || { Medieval: 20, Breakfast: 20, Wonderland: 20, Blizzard: 25, Space: 20, Bot: 20, Aquatic: 20, Safari: 20, Dino: 25, "Ice Monster": 25, Outback: 25 }
let box = prompt("Which box do you want to open? (ex: \"Ice Monster\")").split(' ').map(str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()).join(' ');
if (!Object.keys(prices).map(x => x.toLowerCase()).includes(box.toLowerCase())) return alert("I couldn't find that box!");
let amount = Math.min(Math.floor(tokens / Object.entries(prices).find(x => x[0].toLowerCase() == box.toLowerCase())[1]), parseInt(`0${prompt("How many boxes do you want to open?")}`));
if (amount == 0) return alert("You do not have enough tokens!");
let alertBlooks = confirm("Would you like to alert blooks upon unlocking?");
let blooks = {};
let now = Date.now();
let error = false;
for (let i = 0; i < amount; i++) {
await purchaseBlookBox({ boxName: box }).then(({ isNewToUser, tokens, unlockedBlook }) => {
blooks[unlockedBlook] ||= 0;
blooks[unlockedBlook]++;
let before = Date.now();
if (alertBlooks) alert(`${unlockedBlook} (${i + 1}/${amount}) ${isNewToUser ? "NEW! " : ''}${tokens} tokens left`);
now += Date.now() - before;
}).catch(e => error = true);
if (error) break;
}
alert(`(${Date.now() - now}ms) Results:\n${Object.entries(blooks).map(([blook, amount]) => ` ${blook} ${amount}`).join(`\n`)}`);
}).catch(() => alert('There was an error user data!'));
}
},
{
name: "Remove Name Limit",
description: "Sets the name limit to 120, which is the actual max name length limit",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
i.remove();
document.querySelector('input[class*="nameInput"]').maxLength = 120; /* 120 is the actual limit */
alert("Removed name length limit");
}
},
{
name: "Remove Random Name",
description: "Allows you to put a custom name",
run: function () {
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.stateNode.setState({ isRandom: false, client: { name: "" } });
document.querySelector('[class*="nameInput"]')?.focus?.();
}
},
{
name: "Sell Cheap Duplicates",
description: "Sells all of your uncommon to epic dupes (not legendaries+)",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
window.confirm = i.contentWindow.confirm.bind(window);
i.remove();
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),
axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,
{ sellBlook } = Object.values(webpack.c).find(x => x.exports.a?.sellBlook).exports.a;
axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { unlocks } }) => {
let blooks = Object.entries(unlocks).filter(([blook, amount]) => amount > 1 && !["Legendary", "Chroma", "Mystical"].includes(webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b } }, [['1234']]]).webpack("MDrD").a[blook].rarity));
if (confirm(`Are you sure you want to sell your uncommon to epic dupes?`)) {
let now = Date.now();
for (const [blook, amount] of blooks) await sellBlook({ blook, numToSell: amount - 1 });
alert(`(${Date.now() - now}ms) Results:\n${blooks.map(([blook, amount]) => ` ${blook} ${amount - 1}`).join(`\n`)}`);
}
}).catch(() => alert('There was an error user data!'));
}
},
{
name: "Sell Duplicate Blooks",
description: "Sell all duplicate blooks leaving you with 1 each",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
window.confirm = i.contentWindow.confirm.bind(window);
i.remove();
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),
axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,
{ sellBlook } = Object.values(webpack.c).find(x => x.exports.a?.sellBlook).exports.a;
axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { unlocks } }) => {
let blooks = Object.entries(unlocks).filter(x => x[1] > 1);
if (confirm(`Are you sure you want to sell your dupes?`)) {
let now = Date.now();
for (const [blook, amount] of blooks) await sellBlook({ blook, numToSell: amount - 1 });
alert(`(${Date.now() - now}ms) Results:\n${blooks.map(([blook, amount]) => ` ${blook} ${amount - 1}`).join(`\n`)}`);
}
}).catch((e) => (alert('There was an error user data!'), console.info(e)));
}
},
{
name: "Every Answer Correct",
description: "Sets every answer to be correct",
run: function () {
const { 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;
stateNode.freeQuestions = stateNode.freeQuestions?.map?.(q => ({ ...q, correctAnswers: q.answers }));
stateNode.questions = stateNode.questions?.map?.(q => ({ ...q, correctAnswers: q.answers }));
stateNode.props.client.questions = stateNode.props.client.questions.map(q => ({ ...q, correctAnswers: q.answers }));
}
},
{
name: "Flood Game",
description: "Floods a game with a number of fake accounts",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.prompt = i.contentWindow.prompt.bind(window);
window.alert = i.contentWindow.alert.bind(window);
i.remove();
let cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache);
const axios = cache.find((x) => x.exports?.a?.get).exports.a;
const firebase = cache.find(x => x.exports?.a?.initializeApp).exports.a;
const blooks = Object.keys(cache.find(x => x.exports.a?.Black).exports.a);
cache.find(x => x.exports?.a?.me).exports.a.me({}).then(async data => {
if (data.name) return alert("You are logged in, and using this script will suspend your account. Please log out if you wish to use this.");
const id = prompt("Game ID:"), name = prompt("Name:"), amount = parseInt(prompt("Amount:"));
for (let i = 1; i <= amount; i++) {
(async () => {
let ign = `${name}${Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2)}`;
const { data: { success, fbToken, fbShardURL } } = await axios.put("https://fb.blooket.com/c/firebase/join", { id, name: ign });
if (!success) return;
const liveApp = firebase.initializeApp({
apiKey: "AIzaSyCA-cTOnX19f6LFnDVVsHXya3k6ByP_MnU",
authDomain: "blooket-2020.firebaseapp.com",
projectId: "blooket-2020",
storageBucket: "blooket-2020.appspot.com",
messagingSenderId: "741533559105",
appId: "1:741533559105:web:b8cbb10e6123f2913519c0",
measurementId: "G-S3H5NGN10Z",
databaseURL: fbShardURL
}, ign);
const auth = firebase.auth(liveApp);
await auth.setPersistence(firebase.auth.Auth.Persistence.NONE).catch(console.error);
await auth.signInWithCustomToken(fbToken).catch(console.error);
await liveApp.database().ref(`${id}/c/${ign}`).set({ b: blooks[Math.floor(Math.random() * blooks.length)] });
liveApp.delete();
})();
await new Promise(r => setTimeout(r, 100));
}
});
}
},
{
name: "Host Any Gamemode",
description: "Change the selected gamemode on the host settings page",
run: function (type) {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
window.prompt = i.contentWindow.prompt.bind(window);
i.remove();
if (location.pathname == "/host/settings") {
const gamemodes = ["Racing", "Classic", "Factory", "Cafe", "Defense2", "Defense", "Royale", "Gold", "Candy", "Brawl", "Hack", "Pirate", "Fish", "Dino", "Toy", "Rush"],
type = prompt(`Which gamemode do you want to switch to? (Case sensitive)\n${gamemodes.slice(0, gamemodes.length - 1).join(", ")} or ${gamemodes[gamemodes.length - 1]}`);
if (gamemodes.includes(type)) {
const { 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;
stateNode.setState({ settings: { type } });
} else alert("Gamemode not found, make sure you spelled and capitalized it right.");
} else alert("Run this script on the host settings page");
}
},
{
name: "Change Blook Ingame",
description: "Changes your blook",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.prompt = i.contentWindow.prompt.bind(window);
i.remove();
let { props } = 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.stateNode;
props.client.blook = prompt("Blook Name: (Case Sensitive)");;
props.liveGameController.setVal({ path: `c/${props.client.name}/b`, val: props.client.blook });
}
},
{
name: "Get Daily Rewards",
description: "Gets max daily tokens and xp",
run: async function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
i.remove();
if (!location.href.includes("play.blooket.com")) (alert("This cheat only works on play.blooket.com, opening a new tab."), window.open("https://play.blooket.com/"));
else {
const cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']],]).cache),
axios = cache.find((x) => x.exports?.a?.get).exports.a,
{ data: { t } } = await axios.post("https://play.blooket.com/api/playersessions/solo", {
gameMode: "Factory",
questionSetId: ["60101da869e8c70013913b59", "625db660c6842334835cb4c6", "60268f8861bd520016eae038", "611e6c804abdf900668699e3", "60ba5ff6077eb600221b7145", "642467af9b704783215c1f1b", "605bd360e35779001bf57c5e", "6234cc7add097ff1c9cff3bd", "600b1491d42a140004d5215a", "5db75fa3f1fa190017b61c0c", "5fac96fe2ca0da00042b018f", "600b14d8d42a140004d52165", "5f88953cdb209e00046522c7", "600b153ad42a140004d52172", "5fe260e72a505b00040e2a11", "5fe3d085a529560004cd3076", "5f5fc017aee59500041a1456", "608b0a5863c4f2001eed43f4", "5fad491512c8620004918ace", "5fc91a9b4ea2e200046bd49a", "5c5d06a7deebc70017245da7", "5ff767051b68750004a6fd21", "5fdcacc85d465a0004b021b9", "5fb7eea20bd44300045ba495"][Math.floor(Math.random() * 24)]
});
await axios.post("https://play.blooket.com/api/playersessions/landings", { t });
await axios.get("https://play.blooket.com/api/playersessions/questions", { params: { t } });
const { name, blook: { name: blookUsed } } = await cache.find(x => x.exports.a?.me).exports.a.me({}).catch(() => alert('There was an error getting user data.'));
await axios.put("https://play.blooket.com/api/users/factorystats", {
blookUsed, t, name,
cash: Math.floor(Math.random() * 90000000) + 10000000,
correctAnswers: Math.floor(Math.random() * 500) + 500,
upgrades: Math.floor(Math.random() * 300) + 300,
mode: "Time-Solo",
nameUsed: "You",
place: 1,
playersDefeated: 0,
});
axios.put("https://play.blooket.com/api/users/add-rewards", { t, name, addedTokens: 500, addedXp: 300 })
.then(({ data: { dailyReward } }) => alert(`Added max tokens and xp, and got ${dailyReward} daily wheel tokens!`))
.catch(() => alert('There was an error when adding rewards.'));
}
}
},
{
name: "Simulate Pack",
description: "Simulate opening a pack",
run: function () {
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
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;
let packs = webpack('fGzD');
packs = Object.keys(packs.a).reduce((obj, pack) => (obj.packs.includes(pack) && (obj.data[pack] = Object.fromEntries(packs.b(pack))), obj), { packs: Array.from(document.querySelectorAll('[class*="packShadow"]')).map(x => x.alt), data: {} }).data;
let box = prompt("Which box do you want to simulate? (ex: \"Ice Monster\")").split(' ').map(str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()).join(' ');
if (packs[box]) {
function weighted(pack) {
let weights = [];
const items = Object.keys(packs[pack]);
for (const key of items) weights.push(packs[pack][key] + (weights[items.indexOf(key) - 1] || 0));
const choice = weights[weights.length - 1] * Math.random();
return items[weights.findIndex(w => w >= choice)];
}
const blook = weighted(box);
let phaser = Object.values(webpack.c).find(x => x.exports?.Class).exports;
let scene = {};
class Particles extends phaser.Scene {
constructor(rarity) {
super();
this.rarity = rarity.toLowerCase();
}
preload() {
switch (this.rarity) {
case "uncommon":
this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });
break;
case "rare":
this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });
this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });
this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });
break;
case "epic":
this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });
this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });
this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });
this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });
this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });
this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });
this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });
break;
case "legendary":
this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });
this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });
this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });
break;
case "chroma":
this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });
this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });
this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });
}
}
create() {
scene.scene = this;
scene.rarity = "";
scene.particles = this.physics.add.group({
classType: new phaser.Class({
Extends: phaser.GameObjects.Image,
initialize: function () {
phaser.GameObjects.Image.call(this, scene.scene, 0, 0, "uncommon-1");
this.setDepth(3);
this.lifespan = 0;
},
spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {
this.setTexture(texture);
this.setActive(true);
this.setVisible(true);
this.setPosition(x, y);
this.setScale(scale);
this.targets = [];
scene.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);
this.body.setGravityY(gravity);
this.body.setAngularVelocity(angle);
this.lifespan = lifespan;
},
update: function (t, s) {
this.lifespan -= s;
if (this.lifespan > 0) return;
this.setActive(!1);
this.setVisible(!1);
}
}),
runChildUpdate: !0
});
this.nextParticle = 0;
this.numExplosions = 0;
this.game.events.on("start-particles", (t) => {
scene.rarity = t;
this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;
});
}
update(e, t) {
const I = webpack("74sb");
let Z = function (e) {
switch (e) {
case "center": {
var t = Object(I.l)(-115, -65);
return {
x: scene.scene.cameras.main.worldView.width / 2,
y: scene.scene.cameras.main.worldView.height / 2,
scale: Object(I.l)(.7, 1),
angle: t,
velocity: Object(I.l)(600, 750),
gravity: 700,
angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),
lifespan: 2500
}
}
case "right-bottom": return {
x: scene.scene.cameras.main.worldView.width,
y: scene.scene.cameras.main.worldView.height,
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-160, -110),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(-175, -125),
lifespan: 2500
};
case "left-bottom": return {
x: 0,
y: scene.scene.cameras.main.worldView.height,
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-70, -20),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(125, 175),
lifespan: 2500
};
case "top": return {
x: Object(I.l)(0, scene.scene.cameras.main.worldView.width),
y: -50,
scale: Object(I.l)(.7, 1),
angle: 90,
velocity: Object(I.l)(0, 50),
gravity: 700,
angVelocity: Object(I.l)(-150, 150),
lifespan: 2500
};
case "right-shower": return {
x: scene.scene.cameras.main.worldView.width,
y: Object(I.l)(0, scene.scene.cameras.main.worldView.height),
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-180, -130),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(-175, -125),
lifespan: 2500
};
case "left-shower": return {
x: 0,
y: Object(I.l)(0, scene.scene.cameras.main.worldView.height),
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-50, 0),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(125, 175),
lifespan: 2500
};
case "right-diamond": {
var a = Object(I.l)(0, scene.scene.cameras.main.worldView.height);
return {
x: scene.scene.cameras.main.worldView.width,
y: a,
scale: Object(I.l)(.7, 1),
angle: a > scene.scene.cameras.main.worldView.height / 2 ? -150 : -210,
velocity: Object(I.l)(600, 750),
gravity: 0,
angVelocity: Object(I.l)(-175, -125),
lifespan: 2500
}
}
case "left-diamond": {
var n = Object(I.l)(0, scene.scene.cameras.main.worldView.height);
return {
x: 0,
y: n,
scale: Object(I.l)(.7, 1),
angle: n > scene.scene.cameras.main.worldView.height / 2 ? -30 : 30,
velocity: Object(I.l)(600, 750),
gravity: 0,
angVelocity: Object(I.l)(125, 175),
lifespan: 2500
}
}
default: return {};
}
};
if (scene.rarity && 0 !== this.numExplosions && (this.nextParticle -= t, this.nextParticle <= 0)) {
switch (scene.rarity) {
case "Uncommon": {
for (let i = 0; i < 2; i++) {
let n = scene.particles.get();
n && n.spawn.apply(n, Object.values(Z("center")).concat(`uncommon-${Object(I.m)(1, 8)}`))
}
break;
}
case "Rare": {
for (var o = 0; o < 2; o++) {
var r = scene.particles.get();
r && r.spawn.apply(r, Object.values(Z(o % 2 == 0 ? "left-bottom" : "right-bottom")).concat(`rare-${Object(I.m)(1, 8)}`))
}
break;
}
case "Epic": {
for (var s = 0; s < 2; s++) {
var i = scene.particles.get();
i && i.spawn.apply(i, Object.values(Z(s % 2 == 0 ? "left-shower" : "right-shower")).concat(`epic-${Object(I.m)(1, 8)}`))
}
break;
}
case "Legendary": {
for (var l = 0; l < 3; l++) {
var c = scene.particles.get();
c && c.spawn.apply(c, Object.values(Z("top")).concat(`legendary-${Object(I.m)(1, 8)}`))
}
break;
}
case "Chroma": {
for (var u = 0; u < 3; u++) {
var d = scene.particles.get();
d && d.spawn.apply(d, Object.values(Z(u % 2 == 0 ? "left-diamond" : "right-diamond")).concat(`chroma-${Object(I.m)(1, 8)}`))
}
break;
}
}
this.nextParticle = 20;
this.numExplosions > 0 && (this.numExplosions = Math.max(this.numExplosions - 1, 0));
}
}
}
const allBlooks = Object.values(webpack.c).find(x => x.exports?.a?.Elephant).exports.a;
stateNode.setState({
loadingPack: false,
openPack: true,
unlockedBlook: blook,
tokens: stateNode.state.tokens,
newUnlock: true,
game: {
type: phaser.WEBGL,
parent: "phaser-market",
width: "100%",
height: "100%",
scale: { mode: phaser.Scale.NONE, autoCenter: phaser.Scale.CENTER_BOTH },
transparent: true,
physics: { default: "arcade" },
scene: new Particles(allBlooks[blook].rarity)
},
canOpen: true
});
} else alert("I couldn't find that box!");
}
},
{
name: "Simulate Unlock",
description: "Simulate unlocking most of the blooks",
run: function () {
let i = document.createElement('iframe');
document.body.append(i);
window.alert = i.contentWindow.alert.bind(window);
window.prompt = i.contentWindow.prompt.bind(window);
i.remove();
if (window.location.pathname == "/market") {
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
let values = Object.values(webpack.c),
blooks = values.find(x => x.exports?.a?.Black).exports.a,
packs = values.find(x => typeof x.exports.a?.Breakfast == "number").exports.a,
allBlooks = Object.entries(blooks).reduce((a, [b, c]) => (packs[c.realSet || c.set] && (a[b] = c), a), {});
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;
let phaser = values.find(x => x.exports?.Class).exports;
let L = new function e() { this.scene = null, this.particles = null, this.rarity = null };
class Particles extends phaser.Scene {
constructor(rarity) {
super();
this.rarity = rarity.toLowerCase();
}
preload() {
switch (this.rarity) {
case "uncommon":
this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });
this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });
this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });
break;
case "rare":
this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });
this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });
this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });
this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });
break;
case "epic":
this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });
this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });
this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });
this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });
this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });
this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });
this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });
break;
case "legendary":
this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });
this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });
this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });
this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });
break;
case "chroma":
this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });
this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });
this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });
this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });
}
}
create() {
L.scene = this;
L.rarity = "";
L.particles = this.physics.add.group({
classType: new phaser.Class({
Extends: phaser.GameObjects.Image,
initialize: function () {
phaser.GameObjects.Image.call(this, L.scene, 0, 0, "uncommon-1");
this.setDepth(3);
this.lifespan = 0;
},
spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {
this.setTexture(texture);
this.setActive(true);
this.setVisible(true);
this.setPosition(x, y);
this.setScale(scale);
this.targets = [];
L.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);
this.body.setGravityY(gravity);
this.body.setAngularVelocity(angle);
this.lifespan = lifespan;
},
update: function (t, s) {
this.lifespan -= s;
if (this.lifespan > 0) return;
this.setActive(!1);
this.setVisible(!1);
}
}),
runChildUpdate: !0
});
this.nextParticle = 0;
this.numExplosions = 0;
this.game.events.on("start-particles", (t) => {
L.rarity = t;
this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;
});
}
update(e, t) {
const I = webpack("74sb");
let Z = function (e) {
switch (e) {
case "center": {
var t = Object(I.l)(-115, -65);
return {
x: L.scene.cameras.main.worldView.width / 2,
y: L.scene.cameras.main.worldView.height / 2,
scale: Object(I.l)(.7, 1),
angle: t,
velocity: Object(I.l)(600, 750),
gravity: 700,
angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),
lifespan: 2500
}
}
case "right-bottom": return {
x: L.scene.cameras.main.worldView.width,
y: L.scene.cameras.main.worldView.height,
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-160, -110),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(-175, -125),
lifespan: 2500
};
case "left-bottom": return {
x: 0,
y: L.scene.cameras.main.worldView.height,
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-70, -20),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(125, 175),
lifespan: 2500
};
case "top": return {
x: Object(I.l)(0, L.scene.cameras.main.worldView.width),
y: -50,
scale: Object(I.l)(.7, 1),
angle: 90,
velocity: Object(I.l)(0, 50),
gravity: 700,
angVelocity: Object(I.l)(-150, 150),
lifespan: 2500
};
case "right-shower": return {
x: L.scene.cameras.main.worldView.width,
y: Object(I.l)(0, L.scene.cameras.main.worldView.height),
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-180, -130),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(-175, -125),
lifespan: 2500
};
case "left-shower": return {
x: 0,
y: Object(I.l)(0, L.scene.cameras.main.worldView.height),
scale: Object(I.l)(.7, 1),
angle: Object(I.l)(-50, 0),
velocity: Object(I.l)(600, 750),
gravity: 500,
angVelocity: Object(I.l)(125, 175),
lifespan: 2500
};
case "right-diamond": {
var a = Object(I.l)(0, L.scene.cameras.main.worldView.height);
return {
x: L.scene.cameras.main.worldView.width,
y: a,
scale: Object(I.l)(.7, 1),
angle: a > L.scene.cameras.main.worldView.height / 2 ? -150 : -210,