-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStateFarmClient.js
More file actions
8592 lines (7933 loc) · 512 KB
/
StateFarmClient.js
File metadata and controls
8592 lines (7933 loc) · 512 KB
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
// ==UserScript==
// @name Shell Shockers Aimbot & ESP: StateFarm Client V3 - Bloom, Chat, Botting, Unban & More, shellshock.io
// @description Shell Shockers Aimbot & ESP of the highest level. Best shellshock.io menu in 2025 with NO ADS! Many cheats such as Aimbot, PlayerESP, AmmoESP, Chams, Nametags, Join/Leave alerts, Chat Filter Bypass, AntiAFK, FOV Slider, Zooming, Player Stats, Auto Reload, Auto Unban and many more whilst having unsurpassed customisation options such as binding to any key, easily editable color scheme and themes - all on the fly!
// @author Hydroflame521, enbyte, notfood, 1ust, OakSwingZZZ, Seq and de_Neuublue
// @namespace https://github.com/Hydroflame522/StateFarmClient/
// @supportURL https://github.com/Hydroflame522/StateFarmClient/-/issues/
// @license GPL-3.0
// @run-at document-start
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_info
// @grant GM_setClipboard
// @grant GM_openInTab
// @grant GM.setValue
// @grant GM.getValue
// @grant GM.deleteValue
// @grant GM.listValues
// @grant GM.info
// @grant GM.setClipboard
// @grant GM.openInTab
// @icon https://sfc.best/raw/icons/StateFarmClientLogo384px.png
// @require https://cdn.jsdelivr.net/npm/tweakpane@3.1.10/dist/tweakpane.min.js
// version naming:
//3.#.#-pre[number] for development versions, increment for every commit (not full release) note: please increment it
//3.#.#-release for release (in the unlikely event that happens)
// this ensures that each version of the script is counted as different
// @version 3.5.5
// @match *://*.shellshock.io/*
// @match *://*.algebra.best/*
// @match *://*.algebra.monster/*
// @match *://*.algebra.vip/*
// @match *://*.biologyclass.club/*
// @match *://*.combateggs.com/*
// @match *://*.deadlyegg.com/*
// @match *://*.deathegg.life/*
// @match *://*.deathegg.world/*
// @match *://*.eggbattle.com/*
// @match *://*.eggboy.club/*
// @match *://*.eggboy.me/*
// @match *://*.eggboy.xyz/*
// @match *://*.eggcombat.com/*
// @match *://*.egg.dance/*
// @match *://*.eggfacts.fun/*
// @match *://*.egggames.best/*
// @match *://*.egghead.institute/*
// @match *://*.eggisthenewblack.com/*
// @match *://*.eggsarecool.com/*
// @match *://*.eggshock.com/*
// @match *://*.eggshock.me/*
// @match *://*.eggshock.net/*
// @match *://*.eggshooter.best/*
// @match *://*.eggshooter.com/*
// @match *://*.eggwarfare.com/*
// @match *://*.eggwars.io/*
// @match *://*.geometry.best/*
// @match *://*.geometry.monster/*
// @match *://*.geometry.pw/*
// @match *://*.geometry.report/*
// @match *://*.hardboiled.life/*
// @match *://*.hardshell.life/*
// @match *://*.humanorganising.org/*
// @match *://*.mathactivity.club/*
// @match *://*.mathactivity.xyz/*
// @match *://*.mathdrills.info/*
// @match *://*.mathdrills.life/*
// @match *://*.mathfun.rocks/*
// @match *://*.mathgames.world/*
// @match *://*.math.international/*
// @match *://*.mathlete.fun/*
// @match *://*.mathlete.pro/*
// @match *://*.overeasy.club/*
// @match *://*.risenegg.com/*
// @match *://*.scrambled.tech/*
// @match *://*.scrambled.today/*
// @match *://*.scrambled.us/*
// @match *://*.scrambled.world/*
// @match *://*.shellgame.me/*
// @match *://*.shellplay.live/*
// @match *://*.shellshockers.best/*
// @match *://*.shellshockers.ca/*
// @match *://*.shellshockers.club/*
// @match *://*.shellshockers.life/*
// @match *://*.shellshockers.site/*
// @match *://*.shellshockers.today/*
// @match *://*.shellshockers.us/*
// @match *://*.shellshockers.website/*
// @match *://*.shellshockers.wiki/*
// @match *://*.shellshockers.world/*
// @match *://*.shellshockers.xyz/*
// @match *://*.shellshock.guru/*
// @match *://*.shellsocks.com/*
// @match *://*.softboiled.club/*
// @match *://*.urbanegger.com/*
// @match *://*.violentegg.club/*
// @match *://*.violentegg.fun/*
// @match *://*.yolk.best/*
// @match *://*.yolk.life/*
// @match *://*.yolk.monster/*
// @match *://*.yolk.rocks/*
// @match *://*.yolk.tech/*
// @match *://*.yolk.quest/*
// @match *://*.yolk.today/*
// @match *://*.zygote.cafe/*
// @antifeature membership
// @downloadURL https://sfc.best/js/sf.user.js
// @updateURL https://sfc.best/js/sf.meta.js
// ==/UserScript==
//various debug fun things
const __DEBUG__ = {
avoidReload: false,
doTraceLogging: false,
forceTriggerVarData: false,
preventConsoleBlock: false
}
if (__DEBUG__.preventConsoleBlock) {
const consoleMethods = ["log", "warn", "info", "error", "exception", "table", "trace"];
const _innerConsole = console;
consoleMethods.forEach(method => {
if (unsafeWindow.console[method]) {
Object.defineProperty(unsafeWindow.console, method, {
configurable: false,
get: (...args) => {
return _innerConsole[method].bind(_innerConsole);
},
set: () => {}
});
}
});
};
let attemptedInjection = false;
// log("StateFarm: running (before function)");
(function () {
const storageKey = "StateFarm_" + (unsafeWindow.document.location.host.replaceAll(".", "")) + "_";
const log = function(...args) {
let condition;
try {
condition = extract("consoleLogs");
} catch (error) {
condition = GM_getValue(storageKey + "DisableLogs");
};
if (!condition) {
if (__DEBUG__.doTraceLogging) console.trace(...args);
else console.log(...args);
};
};
let originalReplace = String.prototype.replace;
let originalReplaceAll = String.prototype.replaceAll;
String.prototype.originalReplace = function () {
return originalReplace.apply(this, arguments);
};
String.prototype.originalReplaceAll = function () {
return originalReplaceAll.apply(this, arguments);
};
const createStatefarmElement = function (tagName, options) {
let elem = document.createElement(tagName, options);
elem.classList.add('tp-statefarm');
return elem
}
// const orig = WebAssembly.instantiateStreaming;
WebAssembly.instantiateStreaming = async (resp, importObj) => {
const response = await resp;
const buffer = await response.arrayBuffer();
const bytes = new Uint8Array(buffer);
const replacements = [
{
// pattern: loop + void type + br + depth 0 + end
pattern: [0x03, 0x40, 0x0C, 0x00, 0x0B],
replacement: [0x01, 0x01, 0x01, 0x01, 0x01] // five nops
},
{
pattern: [0x41, 0x20, 0x41, 0x01, 0x10, 0xA7], // 0x01 = i32.const 1
replacement: [0x41, 0x20, 0x41, 0x4B, 0x10, 0xA7]
}
];
const start = performance.now();
const formatBytes = (bytes, base = 10) => ([ ...bytes]).map(b => b.toString(base).padStart(base === 16 ? 2 : 3, '0')).join(' ');
let index = 0;
// loop through all replacements
/* for (const { pattern, replacement } of replacements) {
// search and patch
for (let i = 0; i < bytes.length - pattern.length; i++) {
if (pattern.every((b, j) => bytes[i + j] === b)) {
let before = bytes.slice(i, i + pattern.length);
let before10 = formatBytes(before, 10);
let before16 = formatBytes(before, 16);
for (let j = 0; j < replacement.length; j++) {
bytes[i + j] = replacement[j];
};
let after = bytes.slice(i, i + replacement.length);
let after10 = formatBytes(after, 10);
let after16 = formatBytes(after, 16);
log(
`[sfc] Found loop at offset ${i} (hex: 0x${i.toString(16)}), patching ${index}...\n` +
`Before: ${before10}\n` +
`After: ${after10}\n` +
`Before (hex): ${before16}\n` +
`After (hex): ${after16}\n`
);
};
};
index++;
}; */
const end = performance.now();
log(`[sfc] Loop patching for ${replacements.length} patches took ${end - start}ms`);
const wbg = importObj.wbg;
let blockedCalls = ["sethref", "setInterval"];
let exceptions = ["SELF", "WINDOW", "GLOBAL_THIS", "GLOBAL", "is_undefined", "init_", "document", "createElement", "settextContent", "body", "instanceof_Window", "instanceof_HtmlCanvasElement", "nodeType", "_item_", "_textContent_", "_now_", "_closure_", "_string_", "_number_", "movementX", "movementY", "_new_", "addEventListener", "instanceof_HtmlElement", "_get_", "_set_", "_cast_", "_wbindgenis", "_wbindgennumberget"];
// https://stackoverflow.com/questions/2712136/how-do-i-make-this-loop-all-children-recursively
function wipeNode(node, classNameToRemove) {
const clonedNode = node.cloneNode(true);
function removeElements(currentNode) {
if (!currentNode || !currentNode.children) {
return;
};
const children = Array.from(currentNode.children);
for (let i = 0; i < children.length; i++) {
const child = children[i];
const classList = Array.from(child.classList);
if (classList.includes('tp-statefarm')
|| classList.includes('tp-dvfw')
|| classList.includes("MiniMap")
|| classList.includes("playerDot")
|| classList.some(c => c.startsWith("tp-"))) {
currentNode.removeChild(child);
} else {
removeElements(child);
};
};
};
removeElements(clonedNode);
return clonedNode;
};
function checkForStateFarmChildren(node) {
if (node.querySelectorAll) {
return node.querySelectorAll("[class^=\"tp-\"], .MiniMap, .playerDot").length > 0;
};
return true;
};
class FakeNodeList extends Array {
item(index) {
return this[index];
};
};
let rewrites = { // nice try but you only publicly get to see the prod rewrites
'querySelector': function (item, wasm_str_offset, len) {
if (len == 1) { // '*'
log("Hooked querySelector", item, wasm_str_offset, len);
let items = document.querySelectorAll("*:not(.tp-statefarm):not(.tp-statefarm *):not(.tp-statefarm > *):not(.tp-statefarm > * *)");
log("Hooked length:", items.length);
return items;
};
},
'childNodes': function (item) {
// log("Hooked childNodes, arg:", item);
let nodes = item.childNodes;
let spoofedNodes = new FakeNodeList();
for (let child of nodes) {
if (checkForStateFarmChildren(child)) { // holy speedup
let fakeNode = wipeNode(child.cloneNode(true));
spoofedNodes.push(fakeNode);
} else {
spoofedNodes.push(child.cloneNode(true));
};
};
return spoofedNodes;
},
'_length_': function (item) {
if (item instanceof FakeNodeList) {
return item.length;
} else {
log("Hooked length, arg:", item);
return item.length;
};
},
'appendChild': function (parent, child) {
console.warn("Attempted to append", child, "to", parent);
parent.appendChild(child);
},
// 'addEventListener': function(item, stringStart, stringLen, listener) {
// log("Hooked addEventListener", item, stringStart, stringLen, listener);
// item.addEventListener('pointermove', (...args) => {
// // log("Called pointermove listener with args:", args);
// listener(...args);
// });
// },
'innerText': () => {},
'_has_': () => true,
'isTrusted': () => true,
};
for (const key in wbg) {
if (blockedCalls.some(call => key.includes(call))) {
log(`${key}: Patching blank`);
wbg[key] = function (...args) {
console.warn(`Blocked call to ${key}`, args);
};
};
// log(`wbg.${key}:`, wbg[key].toString());
if (exceptions.some(exception => key.includes(exception))) {
log(`${key}: Skipping patch (raw: ${wbg[key].toString()})`);
continue;
} else if (Object.keys(rewrites).some(rew => key.includes(rew))) {
log(`${key}: Custom patch`);
wbg[key] = rewrites[Object.keys(rewrites).find(rew => key.includes(rew))];
} else {
log(`${key}: Default patch (print args)`)
wbg[key] = function () {
log("Called", key);
log("Args", arguments);
console.warn(`Called unpatched ${key}! Something probably broke. Args:`, arguments, "\nAllowing passthrough!");
return wbg[key].apply(this, arguments);
};
};
};
ss.WASMOBJECT = { response, importObj };
window.WASMOBJECT = { response, importObj };
// debugger;
log(`importObj wbg hooks:`, importObj.wbg);
// instantiate patched WASM
return WebAssembly.instantiate(bytes, importObj);
};
log("[sfc] WASM hook installed.");
log("StateFarm: running (after function)");
//script info
const name = "ЅtateFarm Client";
const version = typeof (GM_info) !== 'undefined' ? GM_info.script.version : "3";
const menuTitle = name + " v" + version;
//INIT WEBSITE LINKS: store them here so they are easy to maintain and update!
const discordURL = "https://dsc.gg/sfnetwork";
const discordName = "Farmer's Workers' Union";
const greasyforkID = "482982";
const youtubeURL = "https://www.youtube.com/@StateFarmClientV3";
const greasyforkURL = `https://greasyfork.org/en/scripts/${greasyforkID}`;
const downloadURL = GM_info ? GM_info.script.updateURL : greasyforkURL;
const updateURL = GM_info ? GM_info.script.updateURL : greasyforkURL;
const scriptInfoURL = `https://greasyfork.org/scripts/${greasyforkID}.json`;
//all of this git stuff assumes youve cloned the repo
const gitID = "Hydroflame522/StateFarmClient";
const gitType = "github"; // or "github"
const baseURL = `https://${gitType}.com/${gitID}`;
const treeMain = gitType === "github"
? "tree/main?tab=readme-ov-file"
: "-/tree/main";
// const rawBase = gitType === "github"
// ? `https://raw.githubusercontent.com/${gitID}/main`
// : `https://gitlab.com/${gitID}/-/raw/main`;
const rawBase = "https://sfc.best/raw/";
const cdnBase = gitType === "github"
? `https://cdn.jsdelivr.net/gh/${gitID}@main`
: rawBase;
const apiTreeBase = gitType === "github"
? `https://api.github.com/repos/${gitID}/contents`
: `https://gitlab.com/api/v4/projects/${encodeURIComponent(gitID)}/repository/tree`;
const commitFeedURL = gitType === "github"
? `https://api.github.com/repos/${gitID}/commits?path=StateFarmClient.js`
: `https://gitlab.com/api/v4/projects/${encodeURIComponent(gitID)}/repository/commits?path=StateFarmClient.js&ref=main`;
// log(commitFeedURL, "commit feed URL");
const featuresGuideURL = `${baseURL}/${treeMain}#-features`;
const bottingGuideURL = `${baseURL}/${treeMain}#-botting`;
const replacementLogoURL = `${cdnBase}/icons/shell-logo-replacement.png`;
const replacementLogoHalloweenURL = `${cdnBase}/icons/shell-logo-replacement-halloween.png`;
const replacementLogoChristmasURL = `${cdnBase}/icons/shell-logo-replacement-christmas.png`;
const replacementLogoNewYearsURL = `${cdnBase}/icons/shell-logo-replacement-new-years.png`;
const replacementFeedURL = `${rawBase}/ingamefeeds/`;
const badgeListURL = `${cdnBase}/ingamebadges/`;
const iconURL = `${cdnBase}/icons/StateFarmClientLogo384px.png`;
const itsOverURL = `${cdnBase}/assets/its%20over/ItsOver4Smaller_.png`;
const eggShowURL = `${cdnBase}/assets/show/EggShowSmaller_.png`;
const sfxURL = gitType === "github"
? `${apiTreeBase}/soundpacks/sfx`
: `${apiTreeBase}?path=soundpacks/sfx&ref=main`;
const skyboxListURL = gitType === "github"
? `${apiTreeBase}/skyboxes`
: `${apiTreeBase}?path=skyboxes&ref=main`;
//misc: statefarm external services
const factoryURL = 'https://factory.getstate.farm/api/account?key=';
const clientKeysURL = `https://raw.githubusercontent.com/StateFarmNetwork/client-keys/refs/heads/main/statefarm_`;
const sfChatURL = `https://raw.githack.com/OakSwingZZZ/StateFarmChatFiles/main/index.html`;
//misc: non sfc external things
const babylonURL = `https://cdn.jsdelivr.net/npm/babylonjs@{0}/babylon.min.js`;
const violentmonkeyURL = `https://violentmonkey.github.io/get-it/`;
//startup sequence
const startUp = function () {
log("StateFarm: detectURLParams()");
detectURLParams();
log("StateFarm: mainLoop()");
mainLoop();
log("StateFarm: injectScript()");
injectScript();
document.addEventListener("DOMContentLoaded", function () {
onContentLoaded();
log("StateFarm: DOMContentLoaded, ran onContentLoaded, fetching sfx");
try {
log("fetching badge list...", badgeListURL + "badges.json");
badgeList = fetchTextContent(badgeListURL + "badges.json");
badgeList = JSON.parse(badgeList);
log(badgeList);
} catch (error) {
log("couldnt fetch badge list :(");
};
try {
log("fetching greasyfork info...", scriptInfoURL);
scriptInfo = fetchTextContent(scriptInfoURL);
scriptInfo = JSON.parse(scriptInfo);
log(scriptInfo);
} catch (error) {
log("couldnt fetch greasyfork info :(");
};
let oldVersion = load("version");
save("version", version);
if (extract("statefarmUpdates")) {
const maxAttempts = 30;
const interval = 500;
let attempts = 0;
const checkForElement = function() {
const existingContainer = document.querySelector('.secondary-aside-wrap');
if (existingContainer) {
log('Element found:', existingContainer);
createAndAppendCommitHistoryBox(existingContainer);
} else if (attempts < maxAttempts) {
attempts++;
// log(`Attempt ${attempts}/${maxAttempts} failed. Retrying...`);
setTimeout(checkForElement, interval); //retry after interval
} else {
log('Element not found after maximum attempts');
}
};
const createAndAppendCommitHistoryBox = function(existingContainer) {
let commitHistoryBox = createStatefarmElement('div');
commitHistoryBox.className = 'tp-statefarm media-tabs-wrapper box_relative border-blue5 roundme_sm bg_blue6 common-box-shadow ss_margintop_sm';
let commitHistoryContent = `
<div class="media-tab-container display-grid align-items-center gap-sm bg_blue3">
<h4 class="common-box-shadow text-shadow-black-40 text_white dynamic-text" style="display: flex; align-items: center;">
<div class="dynamic-text" style="width: 10em; font-size: 1em;">
<div class="dynamic-text" style="font-size: 1em;">StateFarm Updates</div>
</div>
<a href="${discordURL}" target="_blank" style="text-decoration: none; margin-left: auto;">
<button class="ss_button btn_blue bevel_blue box_relative pause-screen-ui btn-account-w-icon text-shadow-none text_blue1" style="font-size: 0.75em; display: flex; align-items: center; padding: 0.5em 1em; width: 12em; margin-left: -3em;">
<i class="fab fa-discord" style="font-size: 1.2em; margin-right: 0.5em;"></i>
<span>Join Discord</span>
</button>
</a>
</h4>
</div>
<div class="media-tabs-content f_col">
<div class="tab-content ss_paddingright ss_paddingleft">
<div class="news-container f_col v_scroll" style="height: 20em; overflow-y: auto;">
`;
let disablePlayButton = vueApp.disablePlayButton;
vueApp.disablePlayButton = (isDisabled) => {
log('called disablePlayButton, so we are handling the statefarm updates box')
if (isDisabled) commitHistoryBox.style.display = 'none';
else commitHistoryBox.style.display = '';
return disablePlayButton(isDisabled);
};
fetch(commitFeedURL).then(response => {
if (response.ok) return response.json();
else log('Failed to fetch commit history contents', response);
}).then(commitHistory => {
log("retrieved: commit history", commitHistory);
if (oldVersion !== version) {
commitHistoryContent += `
<a href="${baseURL}" target="_blank" style="text-decoration: none;">
<div class="updated-notice" style="background-color: #28a745; color: #fff; padding: 0.75em; text-align: center; font-weight: bold; margin-bottom: 0.15em; margin-top: 0.25em; border-radius: 10px; border: 2px solid #155724;">
<p style="margin: 0; font-size: 0.95em;">🎉 StateFarm has been updated (v${version})! Check out the latest updates below.</p>
</div>
</a>
`;
};
if (scriptInfo && scriptInfo.version && scriptInfo.version !== version && typeof (GM_info) !== 'undefined') {
commitHistoryContent += `
<a href="${downloadURL}" target="_blank" style="text-decoration: none;">
<div class="attention-notice" style="background-color: #ffcc00; color: #000; padding: 0.75em; text-align: center; font-weight: bold; margin-bottom: 0.15em; margin-top: 0.25em; border-radius: 5px; border: 2px solid #ffff00;">
<p style="margin: 0; font-size: 0.95em;">🚨 A new update for StateFarm is available (v${scriptInfo.version})! Click to install it.</p>
</div>
</a>
`;
};
commitHistory.forEach(commit => {
const commitDate = new Date(commit?.commit?.author?.date || commit?.committed_date || 0).toLocaleString();
const authorName = commit.author?.login || commit.author?.username || commit.author_name ;
const authorProfileURL = `https://${gitType}/${authorName}`; //replace with actual url if available
const authorAvatarURL = commit.author?.avatar_url || commit.author?.avatar || `${cdnBase}/icons/default-avatar.png`; //replace with actual avatar url if available
const messageParts = (commit.commit?.message || commit?.message || "").split('\n\n', 2); //split by the first occurrence of '\n\n'
const title = messageParts[0]; //title part of the message
const description = messageParts[1] || ''; //description part of the message, defaults to empty string if not present
commitHistoryContent += `
<div class="commit-item" style="padding: 0.2em 0.3em; background-color: #95e2fe; border-bottom: 2px solid #0B93BD;">
<div style="display: flex; align-items: flex-start;">
<a href="${authorProfileURL}" target="_blank" style="margin-right: 0.3em; display: flex; align-items: flex-start;">
<img src="${authorAvatarURL}" alt="${authorName}" style="width: 24px; height: 24px; border-radius: 50%;">
</a>
<div style="display: flex; flex-direction: column; justify-content: flex-start;">
<a href="${commit?.html_url || commit?.web_url}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em; font-weight: bold; line-height: 1.2;">
${title}
</a>
${description ? `<p style="color: #0B93BD; font-size: 0.65em; margin: 0; line-height: 1.2;">${description}</p>` : ''}
<span style="color: white; font-size: 0.75em; font-weight: bold;">
by <a href="${authorProfileURL}" target="_blank" style="color: #0E7697; text-decoration: none; font-size: 0.75em;">${authorName}</a> on ${commitDate}
</span>
</div>
</div>
</div>
`;
});
commitHistoryContent += `
</div>
</div>
</div>
`;
commitHistoryBox.innerHTML = commitHistoryContent;
existingContainer.appendChild(commitHistoryBox);
}).catch(error => {
log('Error:', error);
});
};
checkForElement();
};
(async () => {
try {
var response = await fetch(sfxURL);
if (!response.ok) throw new Error('Failed to fetch folder contents (custom sfx)');
var data = await response.json();
data.forEach((file) => {
retrievedSFX.push({ text: file.name.replace(".zip", ""), value: btoa(file.download_url ? file.download_url : `${rawBase}/${file.path}`) });
});
//1ust i hated your implementation and this is me showing that i reached my breaking point.
var response = await fetch(skyboxListURL); //when the nice guy loses his temper
if (!response.ok) throw new Error('Failed to fetch folder contents (custom skyboxes)');
var data = await response.json();
data.forEach((folder) => {
if (folder.type === "dir" || folder.mode === "040000" || folder.type === "tree") {
let url = folder.url || `${rawBase}/${folder.path}`; //fallback to api tree base if url is not provided
//make it into a download url
url = url.replace("//api.github.com/repos/", "//raw.githubusercontent.com/");
url = url.replace("/contents/", "/master/");
url = `${url.split("?")[0]}/`;
loadedSkyboxes.push({
text: folder.name,
value: btoa(url)
});
};
});
initMenu(false);
tp.mainPanel.hidden = extract("hideAtStartup");
} catch (error) {
console.error('Error:', error);
initMenu(false);
tp.mainPanel.hidden = extract("hideAtStartup");
};
})();
});
};
//INIT VARS
const inbuiltPresets = { //Don't delete onlypuppy7's Config
"onlypuppy7's Config": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<sfChatInvitations>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>false<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<antiSneak>1.8<aimbotAntiSnap>0<aimbotAntiSnapRegime>3<maxAimTime>64<autoRefill>true<smartRefill>true<enableAutomatic>true<enableAutoFire>true<autoFireType>3<autoFireAccuracy>0.05<grenadeMax>true<grenadePower>1<playerESP>true<tracers>true<chams>false<trajectories>true<predictionESP>false<nametags>true<nametagInfo>false<nametagInfoInterval>5<aimbotColor>"#0000ff"<aimbotRainbow>false<tracersType>2<tracersColor1Rainbow>true<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<predictionESPColorRainbow>false<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>true<highlightLeaderboard>true<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<minimap>false<minimapZoom>5<minimapSize>1<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<fakeMessageID>0<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre154 On Top! "<fakeMessageBold>false<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre154 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>14<autoStamp>0<autoHat>0<skybox>1<randomSkyBox>true<randomSkyBoxInterval>5.9<legacyModels>true<filter>0<gunPosition>true<bobModifierEnabled>true<bobModifier>0.25<bobModifierWhenStill>true<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>5<replaceLogo>true<titleAnimation>true<themeType>5<partyLightsEnabled>true<partyLightsIntensity>1.87<worldFlattening>1<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<factoryKey>""<autoUnban>true<adBlock>true<spoofVIP>true<noAnnoyances>true<noTrack>true<antiAFK>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoChickenWinner>true<chickenWinnerNotifs>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<vardataFallback>0<vardataType>0<vardataCustom>"{}"<hideAtStartup>false<consoleLogs>false<popups>true<tooltips>true<enablePanic>true<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
"OP7 + Server Hopper": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>false<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>174<aimbotAntiSnap>0.75<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>false<predictionESP>false<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>true<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<fakeMessageID>12<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre94 On Top! "<fakeMessageBold>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre71 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>true<autoLeave>true<autoLeaveDelay>150<autoGamemode>5<autoRegion>8<eggColor>0<autoStamp>0<autoHat>0<skybox>9<legacyModels>true<filter>2<gunPosition>0<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>1<replaceLogo>true<titleAnimation>true<themeType>5<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<factoryKey>""<adBlock>true<spoofVIP>false<noAnnoyances>true<noTrack>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoUnban>true<autoChickenWinner>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<hideAtStartup>false<consoleLogs>false<popups>true<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
"OP7 + Server Hopper + Stream Stealth": `sfChatNotifications>true<sfChatNotificationSound>true<sfChatAutoStart>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>174<aimbotAntiSnap>0.75<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>false<tracers>false<chams>false<nametags>true<targets>false<predictionESP>false<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<ammoESP>false<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>false<grenadeTracers>false<grenadeESPRegime>2<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>120<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>0.35<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>false<showLOS>false<showMinAngle>false<highlightLeaderboard>true<showCoordinates>false<radar>false<playerStats>false<playerInfo>false<gameInfo>true<showStreams>false<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<unfilterNames>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<fakeMessageID>1<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre95 On Top! "<fakeMessageBold>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre95 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>true<usernameAutoJoin>"[sfc] onlypuppy7"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>true<autoLeave>true<autoLeaveDelay>150<autoGamemode>5<autoRegion>8<eggColor>0<autoStamp>0<autoHat>0<skybox>9<legacyModels>true<filter>true<gunPosition>true<muteGame>false<distanceMult>1.5<customSFX1>3<customSFX2>4<customSFX3>1<replaceLogo>true<titleAnimation>false<themeType>5<loginEmailPass>"ssss"<loginDatabaseSelection>1<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<factoryKey>""<adBlock>true<spoofVIP>false<noAnnoyances>true<noTrack>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>false<adminSpoof>false<autoUnban>true<autoChickenWinner>true<customMacro>"log('cool');"<autoMacro>false<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<hideAtStartup>false<consoleLogs>false<popups>false<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>1<debug>false`,
"Doeshotter's Crackshot Config": `sfChatNotifications>false<sfChatNotificationSound>false<sfChatAutoStart>false<sfChatInvitations>true<aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>2<aimbotRightClick>true<silentAimbot>true<aimbSemiSilent>false<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>true<oneKill>false<aimbotMinAngle>7<antiSneak>0<aimbotAntiSnap>0<autoRefill>true<smartRefill>true<enableAutomatic>true<enableAutoFire>true<autoFireType>3<autoFireAccuracy>0.15000000000000002<grenadeMax>false<grenadePower>1<playerESP>true<tracers>false<chams>false<trajectories>true<predictionESP>false<nametags>true<nametagInfo>false<nametagInfoInterval>14<aimbotColor>"#ff0000"<aimbotRainbow>false<tracersType>2<tracersColor1Rainbow>true<tracersColor1>"#ff0000"<tracersColor2>"#0000ff"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<predictionESPColor>"#ff0000"<predictionESPColorRainbow>false<ammoESP>false<ammoTracers>false<ammoESPRegime>0<ammoESPColor>"#ffff00"<grenadeESP>false<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<lookTracers>false<lookTracersRGI1>false<lookTracersColor>"#00ffff"<fov>72<zoom>15<perspective>0<perspectiveAlpha>false<perspectiveY>0.5<perspectiveZ>2<freecam>false<wireframe>false<particleSpeedMultiplier>1<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>false<radar>false<playerStats>false<playerInfo>false<gameInfo>false<showStreams>false<minimap>false<minimapZoom>5<minimapSize>1<chatExtend>false<chatHighlight>false<maxChat>5<disableChatFilter>false<unfilterNames>false<chatFilterBypass>false<tallChat>false<fakeMessageID>1<fakeMessageText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre147 On Top! "<fakeMessageBold>false<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.1-pre147 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>false<leaveMessages>false<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhenNoneVisible>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<skybox>true<randomSkyBox>false<randomSkyBoxInterval>3<legacyModels>false<filter>true<gunPosition>true<muteGame>false<distanceMult>1<customSFX1>true<customSFX2>true<customSFX3>true<replaceLogo>false<titleAnimation>false<themeType>5<partyLightsEnabled>false<partyLightsIntensity>0.5<loginEmailPass>"ex@gmail.com:passwd"<loginDatabaseSelection>0<autoLogin>0<accountGmail>"example (NO @gmail.com)"<accountPass>"password69"<accountRecordsLogging>false<factoryKey>""<adBlock>false<spoofVIP>false<noAnnoyances>true<noTrack>true<antiAFK>true<quickRespawn>true<statefarmUpdates>true<replaceFeeds>true<customBadges>true<unlockSkins>true<adminSpoof>false<autoUnban>true<autoChickenWinner>false<customMacro>"log('wow ur cool!');"<autoMacro>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<vardataFallback>0<vardataType>0<vardataCustom>"{}"<hideAtStartup>false<consoleLogs>false<popups>true<tooltips>true<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
// ^^ no idea how to fix blue filter being on, its whatever
// "onlypuppy7's Silent Config": `aimbot>true<aimbotTargetMode>1<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>500<spamChatText>"dsc.gg/s𝖿network: ЅtateFarm Client v3.4.0-pre19 On Top! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"ЅtateFarmer"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>300<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>1<customSFX>0<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>2<popups>true<replaceLogo>true<titleAnimation>true<themeType>5<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
"Hydroflame521's Config": `aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>0<aimbotRightClick>true<silentAimbot>false<noWallTrack>true<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>30<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>1<tracersColor1>"#b200ff"<tracersColor2>"#ff0000"<tracersColor3>"#00ff4b"<tracersColor1to2>3<tracersColor2to3>20<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>false<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>false<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>false<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>true<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>false<titleAnimation>false<themeType>7<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
// "Server Hopper + Non-Silent": `aimbot>true<aimbotTargetMode>0<aimbotVisibilityMode>0<aimbotRightClick>true<silentAimbot>false<noWallTrack>true<prediction>true<antiBloom>true<antiSwitch>true<oneKill>true<aimbotMinAngle>30<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>0<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>true<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>0<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>true<titleAnimation>true<themeType>2<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
// "Server Hopper + Silent": `aimbot>true<aimbotTargetMode>1<aimbotVisibilityMode>1<aimbotRightClick>true<silentAimbot>true<noWallTrack>false<prediction>true<antiBloom>true<antiSwitch>false<oneKill>false<aimbotMinAngle>360<aimbotAntiSnap>0.77<antiSneak>1.8<aimbotColor>"#0000ff"<autoRefill>true<smartRefill>true<enableAutoFire>true<autoFireType>3<grenadeMax>true<playerESP>true<tracers>true<chams>false<nametags>true<targets>true<tracersType>0<tracersColor1>"#ff0000"<tracersColor2>"#00ff00"<tracersColor3>"#ffffff"<tracersColor1to2>5<tracersColor2to3>15<ammoESP>true<ammoTracers>false<ammoESPRegime>1<ammoESPColor>"#ffff00"<grenadeESP>true<grenadeTracers>false<grenadeESPRegime>0<grenadeESPColor>"#00ffff"<fov>120<zoom>15<freecam>false<wireframe>false<eggSize>1<setDetail>0<enableTextures>true<renderDelay>0<revealBloom>true<showLOS>true<showMinAngle>false<highlightLeaderboard>false<showCoordinates>true<radar>false<playerStats>true<playerInfo>true<gameInfo>true<showStreams>true<chatExtend>true<chatHighlight>false<maxChat>10<disableChatFilter>true<chatFilterBypass>false<tallChat>false<antiAFK>true<spamChat>false<spamChatDelay>1440<spamChatText>"Live now at twitch.tv/ЅtateFarmNetwork! "<mockMode>false<announcer>false<autoEZ>false<cheatAccuse>false<joinMessages>true<leaveMessages>true<publicBroadcast>false<joinLeaveBranding>false<whitelist>"User-1, User-2"<enableWhitelistAimbot>false<enableWhitelistTracers>false<whitelistESPType>0<whitelistColor>"#e80aac"<blacklist>"User-1, User-2"<enableBlacklistAimbot>false<enableBlacklistTracers>false<blacklistESPType>0<blacklistColor>"#00ff00"<bunnyhop>true<autoWalk>false<autoStrafe>false<autoJump>false<autoJumpDelay>1<autoWeapon>0<autoGrenade>false<autoJoin>false<joinCode>"CODE"<useCustomName>false<usernameAutoJoin>"CaptainShell74"<autoRespawn>false<autoTeam>0<gameBlacklist>false<gameBlacklistCodes>""<leaveEmpty>false<autoLeave>true<autoLeaveDelay>240<autoGamemode>0<autoRegion>0<eggColor>0<autoStamp>0<autoHat>0<muteGame>false<distanceMult>0.59<customSFX>true<adBlock>true<spoofVIP>false<unlockSkins>false<adminSpoof>false<autoUnban>true<silentRoll>false<enableSeizureX>false<amountSeizureX>2<enableSeizureY>false<amountSeizureY>0.04772456526919999<popups>true<replaceLogo>true<titleAnimation>true<themeType>2<enablePanic>false<panicURL>"https://classroom.google.com/"<selectedPreset>0<debug>false`,
};
const presetStorageLocation = "StateFarmUserPresets";
let hudElementPositions = {};
let cachedRealData = {};
let blacklistedGameCodes = [];
let sfChatIframe;
let sfChatContainer;
let sfChatUsername;
let presetIgnore = ['sfChatUsername', 'otherSettingYouMightWantNotToBeExported'];
log("Save key:", storageKey);
let binding = false;
let previousFrame = 0;
let framesPassed = 0;
let previousLogin = 0;
let lastSpamMessage = [0, ""];
let startTime = Date.now();
let lastAutoJump = 0;
let lastAntiAFKMessage = 0;
let miniCamera;
let spamMessageCount = 0;
let currentFrameIndex = 0;
let deciSecondsPassed = 0;
let timeJoinedGame = 0;
let lastSentMessage = "";
let spamDelay = 0;
let URLParams = "";
let playerInfoCache = {};
let retrievedSFX = [{ text: "Default", value: "default" }];
let soundsSFC = {};
let targetingComplete = false;
let firstExecution = false;
let username = "";
let autoStrafeValue = [0, 0, "left"];
let TEAMCOLORS = ["#fed838", "#40e0ff", "#ffc0a0"];
let autoLeaveReminder = 9999;
let lastRandomSkyBoxChangeTime = Date.now(); //in milliseconds
const allModules = [];
const allFolders = [];
const F = [];
const createAudioContext = function () { return new (window.AudioContext || window.webkitAudioContext)() };
const audioContexts = {
"BGM": createAudioContext(),
"KOTC": createAudioContext(),
"OTHER1": createAudioContext(),
"OTHER2": createAudioContext(),
"OTHER3": createAudioContext(),
"OTHER4": createAudioContext(),
"OTHER5": createAudioContext(),
"OTHER6": createAudioContext(),
"OTHER7": createAudioContext(),
"OTHER8": createAudioContext(),
"OTHER9": createAudioContext(),
"SOUNDS": createAudioContext(),
};
const loadedSkyboxes = [
{ text: 'Default', value: 'default' }
];
const divertContexts = {
"KOTC": ["kotc_capture", "kotc_capturing_opponents", "kotc_capturing_player", "kotc_contested", "kotc_pointscore", "kotc_roundend", "kotc_zonespawn"],
};
const L = {};
const functionNames = [];
const isKeyToggled = {};
let ESPArray = [];
var trajectory = null;
var trajectoryNade = null;
let onlinePlayersArray = [];
let bindsArray = {};
let currentAimTime = 0;
let nowOld = 0;
// blank variables
let ss = {};
let H = {}; // obfuscated shit lol
let C = {}; // commcodes
const tp = {}; // <-- tp = tweakpane
let msgElement, allowAccess, tooltipElement, vardataOverlay, vardataPopup, closeVardataPopup, botBlacklist, botWhitelist, hash, onlineClientKeys, initialisedCustomSFX, accuracyPercentage, automatedBorder, clientID, partyLight, didStateFarm, menuInitiated, GAMECODE, noPointerPause, sneakyDespawning, resetModules, amountOnline, errorString, playersInGame, loggedGameMap, startUpComplete, isBanned, attemptedAutoUnban, coordElement, performanceElement, gameInfoElement, playerinfoElement, playerstatsElement, firstUseElement, minangleCircle, redCircle, crosshairsPosition, currentlyTargeting, ammo, ranOneTime, lastWeaponBox, lastChatItemLength, configMain, configBots, playerLogger;
let whitelistPlayers, scrambledMsgEl, accountStatus, updateMenu, badgeList, scriptInfo, annoyancesRemoved, oldGa, newGame, previousDetail, previousLegacyModels, previousTitleAnimation, blacklistPlayers, playerLookingAt, forceControlKeys, forceControlKeysCache, playerNearest, enemyLookingAt, enemyNearest, AUTOMATED, ranEverySecond, enemyAimNearest
let cachedCommand = "", cachedCommandTime = Date.now();
let activePath, findNewPath, activeNodeTarget;
let pathfindingTargetOverride = undefined;
let isFirstFrameAttemptingToPathfind = true;
let despawnIfNoPath = false;
let isLeftButtonDown = false;
let isRightButtonDown = false;
let configNotSet = true;
let nameTextures = {};
let tooltips = {};
let amountVisible = 0;
const weaponArray = { //this could be done differently but i cba
eggk47: 0,
scrambler: 1,
freeranger: 2,
rpegg: 3,
whipper: 4,
crackshot: 5,
trihard: 6,
random: 3, // :trol_fancy:
};
// const antiAFKString = "AntiAFK Message. This message is not visible to others. || ";
const filteredList = [ //a selection of filtered words for antiafk. brimslate reports afk messages, so have fun reporting this and trying to explain this to the "eggforcers"
'date', 'dick', 'fuck', 'fuk', 'suck', 'piss', 'hate', 'nude', 'fux', 'hate', 'pussy',
]; //filteredList[randomInt(0,filteredList.length-1)]
let proxyList = [
'shellshock.io', 'algebra.best', 'algebra.vip', 'biologyclass.club', 'combateggs.com', 'deadlyegg.com', 'deathegg.life', 'deathegg.world', 'eggbattle.com', 'eggboy.club', 'eggboy.me', 'eggboy.xyz', 'eggcombat.com', 'egg.dance',
'eggfacts.fun', 'egghead.institute', 'eggisthenewblack.com', 'eggsarecool.com', 'eggshock.com', 'eggshooter.best', 'eggshooter.com', 'eggwarfare.com', 'geometry.best', 'geometry.monster', 'geometry.pw', 'geometry.report', 'hardboiled.life',
'hardshell.life', 'humanorganising.org', 'mathactivity.club', 'mathactivity.xyz', 'mathdrills.info', 'mathdrills.life', 'mathfun.rocks', 'mathgames.world', 'math.international',
'mathlete.fun', 'mathlete.pro', 'overeasy.club', 'risenegg.com', 'scrambled.tech', 'scrambled.today', 'scrambled.us', 'scrambled.world', 'shellshockers.best', 'shellshockers.club', 'shellshockers.life', 'shellshockers.site',
'shellshockers.today', 'shellshockers.us', 'shellshockers.wiki', 'shellshockers.world', 'shellshockers.xyz', 'shellsocks.com', 'softboiled.club', 'urbanegger.com', 'violentegg.club', 'violentegg.fun', 'yolk.best', 'yolk.life',
'yolk.rocks', 'yolk.tech', 'yolk.quest', 'yolk.today', 'zygote.cafe'
];
proxyList = proxyList.filter(item => item !== unsafeWindow.location.hostname);
proxyList = [...proxyList].sort(() => Math.random() - 0.5);
let proxyListIndex = 0;
const monitorObjects = {};
//title animation
const titleAnimationFrames = [
'︻デ═一',
'︻デ═一',
'デ═一 -',
'═一 -',
'一 -',
'. -',
'. -',
'. -',
'. - 0',
'. -0',
'. \\/',
'. _-_',
'. ___',
'__',
'.',
'STATEFARMCLIEN',
'TATEFARMCLIENT',
'ATEFARMCLIENTV',
'TEFARMCLIENTV3',
'EFARMCLIENTV3 ',
'FARMCLIENTV3 S',
'ARMCLIENTV3 ST',
'RMCLIENTV3 STA',
'MCLIENTV3 STAT',
'CLIENTV3 STATE',
'LIENTV3 STATEF',
'IENTV3 STATEFA',
'ENTV3 STATEFAR',
'NTV3 STATEFARM',
'TV3 STATEFARMC',
'V3 STATEFARMCL',
'3 STATEFARMCLI',
'STATEFARMCLIEN',
'TATEFARMCLIENT',
'STATEFARM',
'CLIENT V3',
'STATEFARM',
'CLIENT V3',
'STATEFARM',
'CLIENT V3',
'STATEFARM',
'CLIENT V3',
':)',
';)',
':)',
'⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
'⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
'⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
'⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
'⠝⠓⠗⠅ ஃ ⠟⠑⠙⠟',
'⠑⠑⠟⠟ ஃ ⠙⠛⠟⠕',
'⠛⠟⠍⠑ ஃ ⠅⠑⠍⠃',
'⠅⠟⠇⠝ ஃ ⠟⠕⠗⠕',
'( ͡° ͜ʖ ͡°)',
'( ͠° ͟ʖ ͡°)',
'( ͡° ͟ʖ ͡°)',
'( ͡° ͟ʖ ͠°)一',
'( ͡° ͟ʖ ͠°)═一',
'( ͡° ͟ʖ ͠°)デ═一',
'( ͡° ͟ʖ ͠°)︻デ═一',
' ͡° ͟ʖ ͠°)︻デ═一',
' ͟ʖ ͠°)︻デ═一',
' ͠°)︻デ═一',
')︻デ═一',
];
const getScrambled = () => Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join('');
let skyboxName = getScrambled();
//verification system
//you can disable this by setting the variable to false, so please dont worry future ppl using this
//in truth its just to get ppl to join the discord server
const verification = {
enabled: true,
verified: true,
currentlyTrial: false,
discordInvite: discordURL,
trialPeriod: 5, //in minutes
trialMessage: "Hello! StateFarm Client requires you to verify in the\nDiscord server to use the full version. You have a trial\nperiod of {0} minutes before you will need to verify.\nIt's all free, so don't worry. No subscriptions!",
trialMessage2: "You have {0} minute(s) left of your SFC trial period.",
trialOverMessage: "The trial period has ended. Please verify to continue to use StateFarm Client.",
mustJoinMessage: "You must verify in the Discord server to continue to use\nthis script.\n\nPlease click the verify button below.",
verificationMessage: "You have been verified! Enjoy the full version of StateFarm Client.",
timeUsedStorageKey: "StateFarmVerification_TimeUsed",
verifiedStorageKey: "StateFarmVerification_Verified",
getTimeUsed: function () {
if (!verification.timeUsed) verification.timeUsed = GM_getValue(verification.timeUsedStorageKey, 0);
return verification.timeUsed;
},
timeUsed: 0,
checkVerification: function () {
const isVerifiedStorage = GM_getValue(verification.verifiedStorageKey, false);
verification.currentlyTrial = (verification.getTimeUsed() < verification.trialPeriod) && !isVerifiedStorage;
verification.verified = (!verification.enabled) || verification.currentlyTrial || isVerifiedStorage;
// console.warn("isVerifiedStorage", isVerifiedStorage, verification.verified);
return verification.verified;
},
started: false,
beginVerificationCheck: function () {
if (verification.started) return;
verification.started = true;
// log("the 'wtf is going on with' logs");
// log(verification.checkVerification());
// log(verification.currentlyTrial);
if (verification.checkVerification()) { //allowed to use
if (verification.currentlyTrial) {
createPrompt(verification.trialMessage2.format(verification.trialPeriod - verification.timeUsed), [], 15e3);
verification.interval = setInterval(function () {
verification.timeUsed++;
GM_setValue(verification.timeUsedStorageKey, verification.timeUsed);
log("Time used:", verification.timeUsed);
if (!verification.checkVerification()) {
change("leaveGame");
clearInterval(verification.interval);
createPrompt(verification.trialOverMessage, [], 15e3);
verification.setDisableClient();
};
}, 60000);
};
} else { //not allowed to use
verification.openVerificationPopup();
};
},
setDisableClient: function () {
initMenu();
verification.openVerificationPopup();
},
popupShown: false,
openVerificationPopup: function () {
if (verification.popupShown) return;
verification.popupShown = true;
createVarDataOverlay();
tp.mainPanel.hidden = true;
unsafeWindow.BAWK.play("ks_double_eggs_end");
//create verificationPopup
let verificationPopup = createStatefarmElement('div');
verificationPopup.style.position = 'fixed';
verificationPopup.style.left = '50%';
verificationPopup.style.top = '50%';
verificationPopup.style.width = '40em';
verificationPopup.style.transform = 'translate(-50%, -50%)';
verificationPopup.style.color = '#fff';
verificationPopup.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
verificationPopup.style.padding = '15px';
verificationPopup.style.borderRadius = '5px';
verificationPopup.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.2)';
verificationPopup.style.border = '2px solid rgba(255, 255, 255, 0.5)';
verificationPopup.style.pointerEvents = 'auto';
verificationPopup.style.opacity = '0';
verificationPopup.style.transition = 'opacity 0.4s ease-in-out';
verificationPopup.style.fontFamily = 'Bahnschrift, sans-serif';
verificationPopup.style.fontSize = '16px';
verificationPopup.style.zIndex = '9999';
verificationPopup.style.whiteSpace = 'pre-wrap';
//set verificationPopup content
const title = "Please verify in the StateFarm Discord server";
const message = `You only need to do this once, and it's free.<br>
<strong>Why am I seeing this?</strong>
Due to some recent issues, we have implemented this system to ensure our users are using the genuine StateFarm script.<br>
<strong>How do I verify?</strong>
Verifying is easy.
You can verify by using the command "sf.verify" in the StateFarm Discord bot channel.
<a href="${discordURL}" target="_blank" style="color: #1944ff; text-decoration: underline; font-size: inherit;">Join the ${discordName} Discord server</a> to get your verification code!`;
const image = `<img src='${eggShowURL}' style='width: 20%; height: 20%; margin-right: 15px; vertical-align: middle;'>`;
verificationPopup.innerHTML = `${image}<strong>${title}</strong><br><br>${message}<br>
<label for="verificationInput">Enter Verification Code:</label>
<div style="display: flex; align-items: center;">
<input type="text" id="verificationInput" style="flex: 1; padding: 5px; width: 250px; border: 1px solid rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 5px; margin-right: 10px;">
<button id="submitVerificationCode" style="padding: 5px 15px; background-color: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 5px; cursor: pointer; transition: background-color 0.2s;">GO</button>
</div>`;
document.body.appendChild(verificationPopup);
//add inputs stuff
const input = document.getElementById('verificationInput');
const submitButton = document.getElementById('submitVerificationCode');
submitButton.addEventListener('click', () => {
const inputValue = input.value;
const error = function () {
createPopup("Inputted verification code isn't valid.", "error");
};
try {
if (verification.checkCodeValidity(inputValue)) {
verification.setVerified();
//add success message, timeouts give the storage time to process
createPopup(verification.verificationMessage, "success");
unsafeWindow.BAWK.play("shellstreak_start");
setTimeout(reloadPage, 1500);
// setTimeout(() => alert(verification.verificationMessage), 500);
} else {
error();
};
} catch (e) {
error();
};
});
input.addEventListener('keypress', (event) => {
if (event.key === 'Enter') {
submitButton.click();
};
});
// log(verificationPopup);
//fade anims
setTimeout(() => {
verificationPopup.style.opacity = '1';
}, 10);
},
codeExpirationTime: 30 * 60, //in seconds
checkCodeValidity: function (code) {
//if you found this function, well done.
//you can now use the full version of the script without verifying.
//now just let us know in the discord server that you found this and we'll give you a special role.
function fromBase62(str) {
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
let num = 0;
for (let i = 0; i < str.length; i++) {
num = num * 62 + chars.indexOf(str[i]);