forked from Coding4Hours/Blooket-Cheats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.js
3971 lines (3951 loc) · 284 KB
/
gui.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 () => {
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/1?" + Date.now();
}
function createElement(node, props = {}, ...children) {
const element = document.createElement(node);
if (typeof props.style == "object") {
let result = "";
for (const style in props.style) result += `${style.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)}: ${props.style[style]}; `;
props.style = result;
}
for (const prop in props) element[prop] = props[prop];
for (const child of children) element.append(child);
return element;
}
let userData = await Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache).find(x => x.exports.a?.me).exports.a.me({}) || {};
let settings, settingsKey = btoa(userData.name || "real"), guiId = btoa(userData.id || "lmfao").replaceAll(/(=|\/|\.)/g, "");
const Settings = {
data: null,
setItem(k, v) {
k.split('.').reduce((obj, k, i, a) => (++i == a.length && (obj[k] = v), obj[k]), this.data);
localStorage.setItem(settingsKey, JSON.stringify(this.data));
return this.data;
},
deleteItem(k) {
k.split('.').reduce((obj, k, i, a) => (++i == a.length && (delete obj[k]), obj[k]), this.data);
localStorage.setItem(settingsKey, JSON.stringify(this.data));
return this.data;
},
setData(v) {
this.data = v;
localStorage.setItem(settingsKey, JSON.stringify(this.data));
}
}
try {
Settings.data = JSON.parse(localStorage.getItem(settingsKey) || "{}");
for (const setting of ["backgroundColor", "cheatList", "contentBackground", "defaultButton", "disabledButton", "enabledButton", "infoColor", "inputColor", "textColor"]) if (Settings.data[setting]) {
Settings.setItem(`theme.${setting}`, Settings.data[setting]);
Settings.deleteItem(setting);
}
} catch {
Settings.setData({});
}
let variables, gui, cheatContainer, controls, controlButtons, dragButton, content, tooltip, cheats, headerText;
const guiWrapper = createElement("div", {
id: guiId, style: {
top: `${(Math.max(10, window.innerHeight - 600) / 2)}px`,
left: `${(Math.max(10, window.innerWidth - 1000) / 2)}px`,
transform: `scale(${Settings.data.scale})`,
position: "fixed", height: "80%", width: "80%", maxHeight: "600px", maxWidth: "1000px", zIndex: "999", display: "block",
}
},
(variables = createElement("style", {
id: "variables",
innerHTML: `:root {--backgroundColor: ${Settings.data?.theme?.backgroundColor || "rgb(11, 194, 207)"};--infoColor: ${Settings.data?.theme?.infoColor || "#9a49aa"};--cheatList: ${Settings.data?.theme?.cheatList || "#9a49aa"};--defaultButton: ${Settings.data?.theme?.defaultButton || "#9a49aa"};--disabledButton: ${Settings.data?.theme?.disabledButton || "#A02626"};--enabledButton: ${Settings.data?.theme?.enabledButton || "#47A547"};--textColor: ${Settings.data?.theme?.textColor || "white"};--inputColor: ${Settings.data?.theme?.inputColor || "#7a039d"};--contentBackground: ${Settings.data?.theme?.contentBackground || "rgb(64, 17, 95)"};}`
})),
createElement("style", {
innerHTML: `.alertList::-webkit-scrollbar{display:none;}.alertList{-ms-overflow-style: none;scrollbar-width: none;}.contentWrapper::-webkit-scrollbar{display:none;}.contentWrapper{-ms-overflow-style: none;scrollbar-width: none;}.cheatButton{position:relative;display:flex;flex-direction:row;align-items:center;min-height:40px;width:190px;margin:4px 0;padding-left:30px;box-sizing:border-box;cursor:pointer;user-select:none;text-decoration:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:transparent;color:var(--textColor);transition:.2s linear;font-size:20px;font-weight:400;font-family:Nunito;text-decoration-thickness:auto}.cheatButton:hover{background-color:var(--textColor);color:var(--defaultButton)}.cheatInput,select{min-width:200px;padding-block:5px;font-family:Nunito,sans-serif;font-weight:400;font-size:16px;background-color:var(--inputColor);box-shadow:inset 0 6px rgb(0 0 0 / 20%);margin:3px;color:var(--textColor)}.bigButton:hover{filter:brightness(110%);transform:translateY(-2px)}.bigButton:active{transform:translateY(2px)}.cheatList::-webkit-scrollbar{width:10px}.cheatList::-webkit-scrollbar-track{background:var(--cheatList)}.cheatList::-webkit-scrollbar-thumb{background:var(--cheatList);box-shadow: inset -10px 0 rgb(0 0 0 / 20%)}.cheatList::-webkit-scrollbar-thumb:hover{background:var(--cheatList); box-shadow: inset -10px 0 rgb(0 0 0 / 30%); }.scriptButton:hover{filter:brightness(120%)}.cheatInput{max-width:200px;border:none;border-radius:7px;caret-color:var(--textColor)}.cheatInput::placeholder{color:var(--textColor)}.cheatInput:focus,select:focus{outline:0}.cheatInput::-webkit-inner-spin-button,.cheatInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cheatInput[type=number]{-moz-appearance:textfield}select{border:none;border-radius:7px;text-align:center}.scriptButton{align-items: center; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; margin: 10px; padding: 5px 5px 11px; position: relative; width: 250px; font-family: Nunito, sans-serif; font-weight: 400; color: var(--textColor); box-shadow: inset 0 -6px rgb(0 0 0 / 20%); border-radius: 7px; cursor: pointer; transition: filter .25s;}.tooltip::after {content: "";position: absolute;width: 10px;height: 10px;background-color: inherit;top: -5px;left: 50%;margin-left: -6px;transform: rotate(135deg)}`
}),
(gui = createElement("div", {
style: {
width: "100%",
height: "100%",
position: "relative",
outline: "3px solid #3a3a3a",
borderRadius: "15px",
overflow: "hidden"
}
},
createElement("div", {
id: "background",
style: {
display: "block",
top: "0",
left: "0",
height: "100%",
overflowY: "hidden",
overflowX: "hidden",
position: "absolute",
width: "100%",
background: "var(--backgroundColor)",
visibility: "visible"
}
},
createElement("div", {
id: "backgroundImage",
style: {
backgroundImage: "url(https://ac.blooket.com/dashboard/65a43218fd1cabe52bdf1cda34613e9e.png)",
display: "block",
height: "200%",
position: "absolute",
width: "200%",
top: "50%",
left: "50%",
backgroundPositionX: "-100px",
backgroundPositionY: "-100px",
backgroundSize: "550px",
visibility: "visible",
transform: "translate(-50%,-50%) rotate(15deg)",
appearance: "none",
opacity: "0.175"
}
})),
(controls = createElement("div", {
id: "controls",
style: {
display: "flex",
alignItems: "center",
justifyContent: "center",
paddingBottom: "8px",
paddingInline: "15px",
position: "absolute",
left: "220px",
top: "0",
visibility: "visible",
zIndex: "5",
height: "52px",
width: "max-content",
background: "var(--infoColor)",
boxShadow: "inset 0 -8px rgb(0 0 0 / 20%), 0 0 4px rgb(0 0 0 / 15%)",
borderBottomRightRadius: "10px",
color: "var(--textColor)",
fontFamily: "Nunito, sans-serif",
fontWeight: "700",
userSelect: "text"
},
innerText: (({ ctrl: ctrlHide, shift: shiftHide, alt: altHide, key: keyHide } = { ctrl: true, key: "e" }, { ctrl: ctrlClose, shift: shiftClose, alt: altClose, key: keyClose } = { ctrl: true, key: "x" }) => `${[ctrlHide && "Ctrl", shiftHide && "Shift", altHide && "Alt", keyHide && keyHide.toUpperCase()].filter(Boolean).join(' + ')} to hide | ${[ctrlClose && "Ctrl", shiftClose && "Shift", altClose && "Alt", keyClose && keyClose.toUpperCase()].filter(Boolean).join(' + ')} for quick disable\nClick and drag here`)(Settings.data.hide || { ctrl: true, key: "e" }, Settings.data.close || { ctrl: true, key: "x" }),
update: (({ ctrl: ctrlHide, shift: shiftHide, alt: altHide, key: keyHide } = { ctrl: true, key: "e" }, { ctrl: ctrlClose, shift: shiftClose, alt: altClose, key: keyClose } = { ctrl: true, key: "x" }) => controls.innerText = `${[ctrlHide && "Ctrl", shiftHide && "Shift", altHide && "Alt", keyHide && keyHide.toUpperCase()].filter(Boolean).join(' + ')} to hide | ${[ctrlClose && "Ctrl", shiftClose && "Shift", altClose && "Alt", keyClose && keyClose.toUpperCase()].filter(Boolean).join(' + ')} for quick disable\nClick and drag here`)
})),
createElement("div", {
id: "credits",
style: {
display: "flex",
alignItems: "center",
justifyContent: "center",
paddingBottom: "8px",
position: "absolute",
right: "0",
top: "0",
visibility: "visible",
zIndex: "5",
height: "47px",
width: "210px",
background: "var(--infoColor)",
boxShadow: "inset 0 -8px rgb(0 0 0 / 20%), 0 0 4px rgb(0 0 0 / 15%)",
borderBottomLeftRadius: "10px",
color: "var(--textColor)",
fontFamily: "Nunito, sans-serif",
fontWeight: "700",
userSelect: "text"
},
innerHTML: "GitHub - 05Konz",
onclick: () => window.open("https://github.com/05Konz/Blooket-Cheats", "_blank").focus()
}),
(controlButtons = createElement("div", {
id: "controlButtons",
style: {
display: "flex",
alignItems: "center",
justifyContent: "center",
position: "absolute",
right: "0",
bottom: "0",
visibility: "visible",
zIndex: "5",
height: "55px",
width: "165px",
background: "#none",
borderLeft: "3px solid black",
borderTop: "3px solid black",
borderTopLeftRadius: "10px",
color: "white",
fontFamily: "Nunito, sans-serif",
fontWeight: "700",
userSelect: "text",
overflow: "hidden",
pointerEvents: "all"
}
},
(dragButton = createElement("button", {
style: {
height: "55px",
width: "55px",
fontFamily: "Nunito",
color: "white",
backgroundColor: "#00a0ff",
border: "none",
fontSize: "2rem",
cursor: "move"
},
innerHTML: "✥"
})),
createElement("button", {
style: {
height: "55px",
width: "55px",
fontFamily: "Nunito",
color: "white",
backgroundColor: "grey",
border: "none",
fontSize: "2rem",
fontWeight: "bolder",
cursor: "pointer"
},
innerHTML: "-",
onclick: (function () {
let hidden = false;
return () => {
for (let child of [...gui.children]) {
if (child == controlButtons) continue;
if (hidden) child.style.display = child.style._display;
else {
child.style._display = child.style.display;
child.style.display = "none";
}
};
gui.style.height = hidden ? "100%" : "55px";
gui.style.width = hidden ? "100%" : "165px";
guiWrapper.style.top = `${parseInt(guiWrapper.style.top) + (guiWrapper.offsetHeight - 55) * (hidden ? -1 : 1)}px`;
guiWrapper.style.left = `${parseInt(guiWrapper.style.left) + (guiWrapper.offsetWidth - 165) * (hidden ? -1 : 1)}px`;
guiWrapper.style.pointerEvents = hidden ? "unset" : "none";
hidden = !hidden;
};
})()
}),
createElement("button", {
style: {
height: "55px",
width: "55px",
fontFamily: "Nunito",
color: "white",
backgroundColor: "red",
border: "none",
fontSize: "2rem",
fontWeight: "bolder",
cursor: "pointer"
},
innerHTML: "X",
onclick: close
}))),
(cheatContainer = createElement("div", {
className: "cheatList",
style: {
overflowY: "scroll",
background: "var(--cheatList)",
boxShadow: "inset -10px 0 rgb(0 0 0 / 20%)",
zIndex: "5",
width: "220px",
position: "absolute",
top: "0",
left: "0",
height: "100%",
fontFamily: "Titan One",
color: "var(--textColor)",
fontSize: "40px",
textAlign: "center",
paddingTop: "20px",
userSelect: "none",
padding: "20px 10px 20px 0",
boxSizing: "border-box",
display: "flex",
flexDirection: "column"
},
innerHTML: "<span style=\"text-shadow: 1px 1px rgb(0 0 0 / 40%)\">Cheats</span>"
},
createElement("a", {
className: "bigButton",
style: {
cursor: "pointer",
display: "block",
fontFamily: "Titan One",
margin: "20px auto 10px",
position: "relative",
transition: ".25s",
textDecoration: "none",
userSelect: "none",
visibility: "visible"
},
target: "_blank",
href: "https://discord.gg/jHjGrrdXP6",
innerHTML: `<div style="background: rgba(0,0,0,.25); border-radius: 5px; display: block; width: 100%; height: 100%; left: 0; top: 0; position: absolute; transform: translateY(2px); width: 100%; transition: transform .6s cubic-bezier(.3,.7,.4,1)"></div>
<div style="background-color: rgb(11, 194, 207); filter: brightness(.7); position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 5px;"></div>
<div style="font-weight: 400; background-color: rgb(11, 194, 207); color: white; display: flex; flex-direction: row; align-items: center; justify-content: center; text-align: center; padding: 5px; border-radius: 5px; transform: translateY(-4px); transition: transform .6s cubic-bezier(.3,.7,.4,1)">
<div style="font-family: Titan One, sans-serif; color: white; font-size: 26px; text-shadow: 2px 2px rgb(0 0 0 / 20%); height: 40px; padding: 0 15px; display: flex; flex-direction: row; align-items: center; justify-content: center">
<svg style="filter: drop-shadow(2px 2px 0 rgb(0 0 0 / 20%))" xmlns="https://www.w3.org/2000/svg" width="35" height="35" fill="currentColor" viewBox="0 -1 21 16">
<path d="M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"/>
</svg>
Discord
</div>
</div>`
}))), createElement("div", {
className: "contentWrapper",
style: {
position: "absolute",
left: "220px",
top: "70px",
overflowY: "scroll",
width: "calc(100% - 220px)",
height: "calc(100% - 70px)",
borderRadius: "7px"
}
},
(content = createElement("div", {
id: "content",
style: {
position: "absolute",
inset: "27px 50px 50px 50px"
}
},
(tooltip = createElement("div", {
className: "tooltip",
style: {
position: "absolute",
top: "0",
left: "0",
backgroundColor: "black",
height: "fit-content",
maxWidth: "300px",
zIndex: "5",
borderRadius: "7.5px",
color: "white",
display: "flex",
justifyContent: "center",
alignItems: "center",
padding: "5px",
paddingInline: "15px",
pointerEvents: "none",
opacity: "0",
textAlign: "center"
},
innerText: "description"
})),
(cheats = createElement("div", {
style: {
alignItems: "center",
boxSizing: "border-box",
display: "flex",
flexDirection: "row",
flexWrap: "wrap",
justifyContent: "space-evenly",
padding: "20px 5px 20px",
position: "relative",
width: "100%",
fontFamily: "Nunito, sans-serif",
fontWeight: "400",
color: "var(--textColor)",
background: "var(--contentBackground)",
boxShadow: "inset 0 -6px rgb(0 0 0 / 20%)",
borderRadius: "7px"
}
},
(headerText = createElement("div", {
className: "headerText",
style: {
boxSizing: "border-box",
display: "block",
height: "45px",
left: "-10px",
padding: "4px 4px 8px",
position: "absolute",
top: "-28px",
backgroundColor: "#ef7426",
boxShadow: "0 4px rgb(0 0 0 / 20%), inset 0 -4px rgb(0 0 0 / 20%)",
borderRadius: "7px"
}
},
createElement("div", {
style: {
alignItems: "center",
boxSizing: "border-box",
display: "flex",
height: "100%",
justifyContent: "center",
padding: "0 15px",
width: "100%",
fontFamily: "Titan One, sans-serif",
fontSize: "26px",
fontWeight: "400",
textShadow: "-1px -1px 0 #646464, 1px -1px 0 #646464, -1px 1px 0 #646464, 2px 2px 0 #646464",
color: "white",
background: "linear-gradient(#fcd843,#fcd843 50%,#feb31a 50.01%,#feb31a)",
borderRadius: "5px"
}
})
))
))
))
)
))
);
for (const oldGui of document.querySelectorAll("#" + guiId)) oldGui.remove();
document.body.appendChild(guiWrapper);
function addMode(mode, img, cheats, nameOnly) {
const button = createElement("div", {
className: "cheatButton",
innerHTML: (typeof img == "string" ? `<img style="height: 30px; margin-right: 5px" src="${img}">` : img ? img : "") + mode,
onclick: () => setCheats(button.innerText, cheats, nameOnly)
});
cheatContainer.appendChild(button);
return button.onclick;
}
async function setCheats(mode, scripts, nameOnly) {
cheats.innerHTML = "";
headerText.firstChild.innerText = `${mode}${nameOnly ? "" : " Cheats"}`;
cheats.append(headerText);
for (let i = 0; i < scripts.length; i++) {
let { name, description, type, inputs, enabled, run, element } = scripts[i];
let toggle = type == "toggle";
if (!element) {
const button = createElement("div", {
className: "scriptButton",
style: { background: toggle ? enabled ? "var(--enabledButton)" : "var(--disabledButton)" : "var(--defaultButton)" }
}, createElement("div", {
className: "cheatName",
innerHTML: name
}));
button.dataset.description = description;
button.onclick = (function ({ target, key }) {
if (target != button && !target.classList.contains("cheatName") && !(key == "Enter" && target.classList.contains("cheatInput"))) return;
let args = [...button.children].slice(1);
run.apply(this, args.map(c => c.type == "number" ? parseInt("0" + c.value) : c.nodeName == "SELECT" ? JSON.parse(c.value) : (c.data || c.value)));
if (toggle) button.style.background = this.enabled ? "var(--enabledButton)" : "var(--disabledButton)";
Cheats.alerts?.[0].addLog(`${toggle ? (this.enabled ? "Enabled" : "Disabled") : "Ran"} <strong>${this.name}</strong>${inputs?.length ? ` with inputs: (${args.map(c => c.nodeName == "SELECT" ? c.selectedOptions[0].innerText : c.value).join(", ")})` : ""}`, type == "toggle" ? (this.enabled ? "var(--enabledButton)" : "var(--disabledButton)") : null);
}).bind(scripts[i]);
if (inputs?.length) for (let i = 0; i < inputs.length; i++) {
const { name, type, options: opts, min, max, value } = inputs[i];
let options;
try { options = await (typeof opts == "function" ? opts?.() : opts) } catch { options = [] };
if (type == "options" && options?.length) {
const select = document.createElement("select");
options.forEach(opt => {
const option = document.createElement("option");
option.value = JSON.stringify(opt?.value != null ? opt.value : opt);
option.innerHTML = opt?.name || opt;
select.appendChild(option);
});
button.appendChild(select);
} else if (type == "function") {
const input = document.createElement("input");
input.classList.add("cheatInput");
input.placeholder = name;
input.style.textAlign = "center";
input.readOnly = true;
let locked = false;
input.onclick = async () => {
if (locked) return;
input.value = "Waiting for input...";
locked = true;
input.data = await inputs[i].function((e) => input.value = e + "...");
locked = false;
input.value = input.value.slice(0, -3);
}
button.appendChild(input);
} else {
const input = document.createElement("input");
input.classList.add("cheatInput");
if (type == "number") {
input.type = "number";
input.min = min;
input.max = max;
input.value = value || (min != null ? min : 0);
};
input.placeholder = name;
input.style.textAlign = "center";
if (toggle) input.style.backgroundColor = "#0003";
input.onkeyup = button.onclick;
button.appendChild(input);
}
};
scripts[i].element = button;
}
cheats.appendChild(scripts[i].element);
};
/* scripts
{
name: "",
description: "",
type: (null | "toggle"),
inputs: type == null && [{
name: "",
type: ("number" | "string" | "options"),
options: type == "options" && [
{
name: "",
value: undefined
};
]
}],
enabled: type == "toggle" && Boolean,
run: function () {};
};
*/
}
const Cheats = {
global: [
{
name: "Auto Answer",
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;
const q = (question || pquestion);
try {
if (q.qType != "typing") if (stage !== "feedback" && !feedback) [...document.querySelectorAll(`[class*="answerContainer"]`)][q.answers.map((x, i) => q.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(q.answers[0])
} catch { }
}, 50);
} else {
this.enabled = false;
clearInterval(this.data);
this.data = null;
}
}
},
{
name: "Highlight Answers",
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",
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)",
inputs: [
{
name: "Target Grade",
type: "number"
}
],
type: "toggle",
enabled: false,
data: null,
run: function (target) {
if (!this.enabled) {
this.enabled = true;
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: "Spam Buy Blooks",
description: "Opens a box an amount of times",
inputs: [
{
name: "Box",
type: "options",
options: () => {
return new Promise(r => {
r(Object.keys(Object.values(webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]).webpack.c).find(x => !isNaN(x?.exports?.a?.Space)).exports.a || {}));
});
}
},
{
name: "Amount",
type: "number"
},
{
name: "Alert Blooks",
type: "options",
options: [
{
name: "Alert Blooks",
value: true
},
{
name: "Don't Alert Blooks",
value: false
}
]
}
],
run: function (box, amountToOpen, alertBlooks) {
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;
box = box.split(' ').map(x => x.charAt(0).toUpperCase() + x.slice(1).toLowerCase()).join(' ');
axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { name, 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 amount = Math.min(Math.floor(tokens / prices[box]), amountToOpen);
if (amount == 0) {
if (amountToOpen > 0) alert("You do not have enough tokens!");
return;
};
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: "Flood Game",
description: "Floods a game with a number of fake accounts",
inputs: [
{
name: "Game ID",
type: "string"
},
{
name: "Name",
type: "string"
},
{
name: "Amount",
type: "number"
},
{
name: "Blook",
type: "options",
options: async () => {
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
return ["Random"].concat(Object.keys(Object.values(webpack.c).find(x => x.exports.a?.Black).exports.a));
}
},
{
name: "Banner",
type: "options",
options: Object.entries({ Starter: "starter", Chalkboard: "chalkboard", Slime: "slime", Bookshelf: "bookshelf", "Toaster Pastry": "toasterPastry", Theater: "theater", Sushi: "sushi", Workbench: "workbench", Spooky: "spooky", Spiders: "spiders", Coffin: "coffin", Pumpkins: "pumpkins", "Falling Blocks": "fallingBlocks", Racetrack: "racetrack", Harvest: "harvest", Leaves: "leaves", "Fall Picnic": "fallPicnic", "Winter Drive": "winterDrive", "Winter Train": "winterTrain", Ice: "ice", Gifts: "gifts", "Christmas Tree": "christmasTree", "Soccer Field": "soccerField", "Winter Landscape": "winterLandscape", "Football Field": "footballField", "Outer Space": "outerSpace", "Hockey Rink": "hockeyRink", "Music Class": "musicClass", "Ice Cream Sandwich": "iceCreamSandwich", "Science Class": "scienceClass", "Fish Tank": "fishTank", "Art Class": "artClass", Clockwork: "clockwork", "Love Letter": "loveLetter", Farm: "farm", Chocolate: "chocolate", "Tech Chip": "techChip", Fire: "fire", "Orange Ice Pop": "orangeIcePop" }).map(([name, value]) => ({ name, value }))
}
],
run: async function (id, name, amount, b, bg) {
let i = document.createElement('iframe');
document.body.append(i);
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);
if (await cache.find(x => x.exports?.a?.me).exports.a.me({}).then(x => x.name)) return alert("You are logged in, and using this script will suspend your account. Please log out if you wish to use this.");
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: b == "Random" ? blooks[Math.floor(Math.random() * blooks.length)] : b, bg });
liveApp.delete();
})();
await new Promise(r => setTimeout(r, 100));
}
}
},
{
name: "Host Any Gamemode",
description: "Change the selected gamemode on the host settings page",
inputs: [
{
name: "Gamemode",
type: "options",
options: ["Racing", "Classic", "Factory", "Cafe", "Defense2", "Defense", "Royale", "Gold", "Candy", "Brawl", "Hack", "Pirate", "Fish", "Dino", "Toy", "Rush"]
}
],
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") return alert("Run this script on the host settings page");
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 } });
}
},
{
name: "Change Blook Ingame",
description: "Changes your blook",
inputs: [
{
name: "Blook",
type: "options",
options: async () => {
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
return Object.keys(Object.values(webpack.c).find(x => x.exports.a?.Chick && x.exports.a?.Elephant).exports.a);
}
}
],
run: function (blook) {
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 = blook;
props.liveGameController.setVal({ path: `c/${props.client.name}/b`, val: 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: "Use Any Blook",
description: "Allows you to play as any blook",
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;
const blooks = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b } }, [['1234']]]).webpack("MDrD").a;
if (location.pathname == "/blooks") stateNode.setState({ blookData: Object.keys(blooks).reduce((a, b) => (a[b] = (stateNode.state.blookData[b] || 1), a), {}), allSets: Object.values(blooks).reduce((a, b) => (a.includes(b.set) ? a : a.concat(b.set)), []) });
else if (Array.isArray(stateNode.state.unlocks)) stateNode.setState({ unlocks: Object.keys(blooks) });
else stateNode.setState({ unlocks: blooks });
}
},
{
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: "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: "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: "Simulate Pack",
description: "Simulate opening a pack",
inputs: [{
name: "Pack",
type: "options",
options: async () => {
return Array.from(document.querySelectorAll('[class*="packShadow"]')).map(x => x.alt);
}
}],
run: (function () {
try {
let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);
let values = Object.values(webpack.c),