-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmana10.js
2193 lines (1839 loc) · 67.3 KB
/
mana10.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
//search for "TODO" to get a list of shit u need to do
const { UI, Cheat, Entity, Globals, Local, AntiAim, Exploit } = require("./onetap");
//TODO:
//antibruteforce(bullet_impact event)
//TODO: check for slowwalk keybind name
//TODO: ui updates
//verify auth intergity with password
//POTENTIAL FIX FOR ARRAYS: make function that populates AA[index] with THE ARRAY, not the template array variable
//same goes with aa preset manager(use for loop)
//POTENTIAL FL+RAGE SOLUTION
//Hiding the ui elements of said items but tewaking their values might work...?
//UI Subtabs
//Config Password
UI.AddSubTab([ "Config", "SUBTAB_MGR" ], "Secrets");
//js subtab
UI.AddSubTab([ "Config", "SUBTAB_MGR" ], "mana.js 1.0")
//aa subtab
UI.AddSubTab([ "Rage", "SUBTAB_MGR" ], "Custom Anti-Aim")
UI.AddSubTab([ "Rage", "SUBTAB_MGR" ], "AA Preset Manager")
UI.AddSubTab(["Visuals","SUBTAB_MGR"], "Indicators")
UI.AddSubTab(["Visuals","SUBTAB_MGR"], "Crosshair Indicators")
//Config
//AUTH SYSTEM
const main_path=["Config", "SUBTAB_MGR", "mana.js 1.0", "SHEET_MGR", "mana.js 1.0"];
const aa_path=["Rage", "SUBTAB_MGR", "Custom Anti-Aim", "Custom Anti-Aim"];
const aa_control_path=["Rage", "SUBTAB_MGR", "AA Preset Manager", "AA Preset Manager"];
const rage_keybinds=["Rage", "SUBTAB_MGR", "General", "SHEET_MGR", "General", "Key assignment"];
const aa_keybinds=["Rage", "SUBTAB_MGR", "Anti Aim", "SHEET_MGR", "General", "Key assignment"];
const aa_default_path=["Rage", "SUBTAB_MGR", "Anti Aim", "SHEET_MGR", "Directions"];
const exploits_keybinds=["Rage", "SUBTAB_MGR", "Exploits", "SHEET_MGR", "Keys", "Key assignment"];
const exploits_path=["Rage", "SUBTAB_MGR", "Exploits", "SHEET_MGR", "General"];
//const secrets_path=["Config", "SUBTAB_MGR", "Secrets", "SHEET_MGR", "Secrets"];
//preset template
const presetTemplate = {
//general settings(pitch, at targets, etc)
general :
{
modes :
{
real : 0,
fake : 0,
LBY : 0,
},
//active modes
AASettings :
{
pitchMode : 0
},
misc :
{
presetName : "Mana Default AA"
}
},
static :
{
real :
{
offset : 0,
},
fake :
{
offset : 0,
},
LBY :
{
offset : 0,
}
},
jitter :
{
real :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
},
fake :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
},
LBY :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
}
},
switch :
{
real :
{
offset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
delay : [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
delayOffset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
activePhases : 1
},
fake :
{
offset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
delay : [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
delayOffset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
activePhases : 1
},
LBY :
{
offset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
delay : [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
delayOffset : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
activePhases : 1
},
},
sway :
{
real :
{
offset : 0,
delta : 0,
delay : 0,
},
fake :
{
offset : 0,
delta : 0,
delay : 0,
},
LBY :
{
offset : 0,
delta : 0,
delay : 0,
},
},
random :
{
real :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
},
fake :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
},
LBY :
{
offset : 0,
delta : 0,
delay : 0,
delayOffset : 0,
},
},
}
var AA=
[
JSON.parse(JSON.stringify(presetTemplate))
];
const AA_MODE_TEMPLATE =
{
switchMode : 0,
dodgeBruteforce : 0,
activePresets : 0,
switchDelay : 0,
switchDelta : 0,
}
//aa manager shit
var AA_MANAGER=
{
"Dormant" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Running" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Crouching" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"On Peek" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"In Air" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"DT Active" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"HS Active" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Zeusing" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Knifing" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Fake-Ducking" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Slow-Walking" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"On Use" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Override Key 1" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Override Key 2" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Override Key 3" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
"Override Key 4" : JSON.parse(JSON.stringify(AA_MODE_TEMPLATE)),
}
var RAGEBOT={};
var VISUALS=
{
//GENERAL SETTINGS
//REMEMBER THE 255 CHAR LIMIT PLEASE
general :
{
indicators : 0,
crosshairIndicators : 0,
customCrosshair: 0,
rechargeBar : 0,
rainbowMenuFrame : 0,
watermark : 0,
},
//MULTIDROPDOWN SETTINGS(WHICH INDICTS TO TOGGLE, ETC)
activeItems :
{
rainbowBars : 0,
activeIndicators : 0,
activeCrosshairIndicators : 0,
},
customCrosshair :
{
color1 : [0,0,0,255],
color2 : [0,0,0,255],
length : 100,
thickness : 2,
distance : 10,
},
indicators :
{
},
crosshairIndicators :
{
},
rainbow :
{
changeRate = 1,
colorOffset = 10,
},
customColors :
{
"Custom 1" : [0,0,0,255],
"Custom 2" : [0,0,0,255],
"Custom 3" : [0,0,0,255],
"Custom 4" : [0,0,0,255],
"Custom 5" : [0,0,0,255],
"Custom 6" : [0,0,0,255],
"Custom 7" : [0,0,0,255],
"Custom 8" : [0,0,0,255],
"Custom 9" : [0,0,0,255],
"Custom 10" : [0,0,0,255],
"Custom 11" : [0,0,0,255],
"Custom 12" : [0,0,0,255],
"Custom 13" : [0,0,0,255],
"Custom 14" : [0,0,0,255],
"Custom 15" : [0,0,0,255],
"Custom 16" : [0,0,0,255],
}
};
//exploit stuff(dt,hs,fl)
var EXPLOIT =
{
doubletap :
{
}
}
//misc
var MISC =
{
backtrackPeek :
{
//indexes of all the targets
hitscan : [0,2,3],
ticks : 10,
},
}
//config related
var CONFIG_INFO =
{
configName : "Mana",
owner : "manaball123",
password : "ilikecocks",
//length of aa preset array
presetsLength : 1,
}
//USE JSON.PARSE AND STRINGTIFY
function saveConfig(configName)
{
//aa
for(i=0;i<AA.length;i++)
{
string1 = i.toString()+"_"
Object.keys(AA[i]).forEach(function(key1)
{
string2 = key1+"_"
Object.keys(AA[i][key1]).forEach(function(key2)
{
string3 = key2+"_"
Object.keys(AA[i][key1][key2]).forEach(function(key3)
{
DataFile.SetKey(configName,"AA_" + string1 + string2 + string3 + key3, JSON.stringify(AA[i][key1][key2][key3]));
})
})
})
}
//aa manager
Object.keys(AA_MANAGER).forEach(function(key)
{
DataFile.SetKey(configName, "AA_MANAGER_" + key, JSON.stringify(AA_MANAGER[key]));
})
CONFIG_INFO.owner = Cheat.GetUsername();
CONFIG_INFO.presetsLength = AA.length
Object.keys(CONFIG_INFO).forEach(function(key)
{
DataFile.SetKey(configName, "CONFIG_INFO_" + key, JSON.stringify(CONFIG_INFO))
})
DataFile.Save(configName);
}
function loadConfig(configName)
{
DataFile.Load(configName);
//load config info first
Object.keys(CONFIG_INFO).forEach(function(key)
{
CONFIG_INFO[key] = JSON.parse(DataFile.GetKey(configName, "CONFIG_INFO_" + key))
})
//populates aa array with stuff first
for(i = 0;i < CONFIG_INFO.presetsLength;i++)
{
AA[i] = JSON.parse(JSON.stringify(presetTemplate))
}
for(i=0;i<AA.length;i++)
{
string1 = i.toString() + "_";
Object.keys(AA[i]).forEach(function(key1)
{
string2 = key1 + "_";
Object.keys(AA[i][key1]).forEach(function(key2)
{
string3 = key2 + "_";
Object.keys(AA[i][key1][key2]).forEach(function(key3)
{
AA[i][key1][key2][key3] = JSON.parse(DataFile.GetKey(configName, "AA_" + string1 + string2 + string3 + key3));
})
})
})
}
Object.keys(AA_MANAGER).forEach(function(key)
{
AA_MANAGER[key]=JSON.parse(DataFile.GetKey(configName, "AA_MANAGER_" + key));
})
}
//print function from ot discord
/*
Cheat.LongPrint = function (string)
{
for (x = 0; x < string.length; x += 255)
{
Cheat.Print(string.substring(x, x + 255))
}
}
*/
//prints a line, any value can be used
Cheat.PrintDebug() = function (value)
{
string = value.toString();
for (x = 0; x < string.length; x += 255)
{
Cheat.Print(string.substring(x, x + 255))
}
Cheat.Print("\n");
}
//3d circle func from fourms, credits goes to this guy i think
// https://www.onetap.com/members/epiccsgohaker1337.74887/
Render.Filled3DCircle = function(position, radius, degrees, start_at, color, fill_color)
{
//position, radius, color, fill_color: self explanatory
//degrees: circle span(can be used to make half circles too, but use 360 for full circle)
//start_at: start span at x degrees
var old_x, old_y;
//clamp degrees between 360 and 0
degrees = degrees < 361 && degrees || 360;
degrees = degrees > -1 && degrees || 0;
start_at += 1;
for (rot = start_at; rot < degrees + start_at + 1; rot += start_at * 8) {
rot_r = rot * (Math.PI / 180);
line_x = radius * Math.cos(rot_r) + position[0], line_y = radius * Math.sin(rot_r) + position[1];
var curr = Render.WorldToScreen([line_x, line_y, position[2]]);
var cur = Render.WorldToScreen([position[0], position[1], position[2]]);
if (cur[0] != null && curr[0] != null && old_x != null) {
Render.Polygon([[curr[0], curr[1]], [old_x, old_y], [cur[0], cur[1]]], fill_color)
Render.Line(curr[0], curr[1], old_x, old_y, color)
}
old_x = curr[0], old_y = curr[1];
}
}
Render.Circle3D = function(position, radius, degrees, start_at, color) {
//position, radius, color: self explanatory
//degrees: circle span(can be used to make half circles too, but use 360 for full circle)
//start_at: start span at x degrees
var old_x, old_y;
//clamp degrees between 360 and 0
degrees = degrees < 361 && degrees || 360;
degrees = degrees > -1 && degrees || 0;
start_at += 1;
for (rot = start_at; rot < degrees + start_at + 1; rot += start_at * 8) {
rot_r = rot * (Math.PI / 180);
line_x = radius * Math.cos(rot_r) + position[0], line_y = radius * Math.sin(rot_r) + position[1];
var curr = Render.WorldToScreen([line_x, line_y, position[2]]);
var cur = Render.WorldToScreen([position[0], position[1], position[2]]);
if (cur[0] != null && curr[0] != null && old_x != null) {
Render.Line(curr[0], curr[1], old_x, old_y, color)
}
old_x = curr[0], old_y = curr[1];
}
}
function NOT(variable)
{
return variable == 1 ? 0 : 1;
}
function zeroToNegOne(variable)
{
return variable == 0 ? -1 : 1;
}
function clampTo(variable,to,mode)
{
if(mode==0)
{
return variable<to ? to : variable;
}
else
{
return variable>to ? to : variable;
}
}
//deg2rad function
function DEG2RAD(degree)
{
return degree * Math.PI / 180.0;
}
function ANGLE2VEC(angle) {
pitch = angle[0];
yaw = angle[1];
return [Math.cos(DEG2RAD(pitch)) * Math.cos(DEG2RAD(yaw)), Math.cos(DEG2RAD(pitch)) * Math.sin(DEG2RAD(yaw)), -Math.sin(DEG2RAD(pitch))];
}
function getWallDistance(entity, angle) {
vector = ANGLE2VEC(angle);
origin = Entity.GetRenderOrigin(entity);
origin[2] += Entity.GetProp(entity, "CBasePlayer", "m_vecViewOffset[2]")[0];
end = [origin[0] + vector[0] * 8192, origin[1] + vector[1] * 8192, origin[2] + vector[2] * 8192];
result = Trace.Line(entity, origin, end);
if (result[1] != 1) {
wall = [origin[0] + vector[0] * result[1] * 8192, origin[1] + vector[1] * result[1] * 8192, origin[2] + vector[2] * result[1] * 8192];
distance = Math.sqrt(Math.pow(origin[0] - wall[0], 2) + Math.pow(origin[1] - wall[1], 2) + Math.pow(origin[2] - wall[2], 2));
return distance;
} else {
return 0;
}
}
function ExtendVector(vector, angle, extension)
{
//get angle in radians
var radianAngle = radian(angle);
return [extension * Math.cos(radianAngle) + vector[0], extension * Math.sin(radianAngle) + vector[1], vector[2]];
}
//vector calc functions
function VectorAdd(a, b)
{
return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
}
function VectorSubtract(a, b)
{
return [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
}
function VectorMultiply(a, b)
{
return [a[0] * b[0], a[1] * b[1], a[2] * b[2]];
}
//get abseloute vector magnitude
function VectorLength(a)
{
return Math.sqrt(a[1]**2+a[2]**2+a[3]**2);
}
function VectorNormalize(vec)
{
var length = VectorLength(vec[0], vec[1], vec[2]);
return [vec[0] / length, vec[1] / length, vec[2] / length];
}
function VectorDot(a, b)
{
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}
function VectorDistance(a, b)
{
return VectorLength(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
}
//REAL SHIT
//recoding this, confusing af
function pointRayDistance(point, rayStart, rayEnd)
{
//delta of the vectors(range that bullet travels)
var startToPoint = VectorSubtract(point, rayStart);
var startToEnd = VectorSubtract(rayEnd, rayStart);
//length of bullet beam
var rayLength = VectorLength(startToEnd);
var pointLength = VectorLength(startToPoint)
//proving my theory that this is some sort of "abseloute direction"
//dot product of the enemy bullet beam to enemy--> player
var dotProduct = VectorDot(startToPoint, startToEnd);
var sideLength = dotProduct/rayLength
//these check for if angle between 2 rays >90 or point too far
if (dotProduct < 0.0)
{
return rayStart;
}
if (sideLength > rayLength)
{
return rayEnd;
}
return Math.sqrt(pointLength**2-sideLength**2)
}
//Paths
//vars
const weaponNames = ["General", "USP", "Glock", "Five Seven", "Tec-9", "Deagle", "Revolver", "Dualies", "P250", "CZ-75", "Mac10", "P90", "MP5", "MP7", "MP9", "UMP45", "PP-Bizon", "M4A1-S", "M4A4", "AK47", "AUG", "SG553", "FAMAS", "GALIL", "AWP", "SSG08", "SCAR20", "G3SG1", "M249", "XM1014", "MAG7", "Negev", "Sawed off","Nova"];
const angleTypes = ["real", "fake", "LBY"];
const angleTypesCAPS = ["Real", "Fake", "LBY"]
const fonts =
{
Arial = "Arial.ttf",
Calibri = "Calibri.ttf",
}
var fakeLagCache = [0,0,0,0]
var screenResolution = Render.GetScreenSize();
var rainbowColor = [0,0,0,255]
var uiUpdate=false;
var presetUpdate=false;
var currentAAMode=0;
var cachedAAMode=0;
var modeCounter=0;
var modeTimer=0.0;
var modeOffset=0.0;
var initAA=true;
var initializePresets=true;
var enableFakelag = true;
var minimumDamage = 1;
var hitchance = 1;
//keeps track of time related stuff
var TIMERS =
{
currentTime : Globals.Tickcount(),
jitter : {
real : Globals.Tickcount(),
fake : Globals.Tickcount(),
LBY : Globals.Tickcount()
},
jitterOffset =
{
real : 0,
fake : 0,
LBY : 0
},
switch :
{
real : Globals.Tickcount(),
fake : Globals.Tickcount(),
LBY : Globals.Tickcount()
},
sway :
{
real : Globals.Tickcount(),
fake : Globals.Tickcount(),
LBY : Globals.Tickcount()
},
random :
{
real : Globals.Tickcount(),
fake : Globals.Tickcount(),
LBY : Globals.Tickcount()
},
swayCycle :
{
real : 0,
fake : 0,
LBY : 0
}
}
//keeps track of other stuff(other than time)
var COUNTERS =
{
doAntiBruteSwitch = false,
jitter :
{
real : 0,
fake : 0,
LBY : 0
},
switch :
{
real : 0,
fake : 0,
LBY : 0
},
random :
{
real : 0,
fake : 0,
LBY : 0
},
randomAngleOffset =
{
real : 0,
fake : 0,
LBY : 0
},
}
const PLAYER_TEMPLATE=
{
health : 100,
money : 0,
id : 0,
name : "",
//list of weapons
weapons : [],
//render origin
renderOrigin : [0.0,0.0,0.0],
//position
position : [0.0,0.0,0.0],
};
var enemies = Entity.GetEnemies();
var players = Entity.GetPlayers();
var presetNames = [""];
//UI STUFF BELOW
const TYPE_SUBTAB=0;
const TYPE_TEXTBOX=1;
const TYPE_COLORPICKER=2;
const TYPE_MULTIDROPDOWN=3;
const TYPE_DROPDOWN=4;
const TYPE_HOTKEY=5;
const TYPE_SLIDERFLOAT=6;
const TYPE_SLIDERINT=7;
const TYPE_CHECKBOX=8;
const TYPE_SEPERATOR=9;
const AA_MODES_ELEMENTS = ["Static", "Jitter", "Switch", "Sway", "Random"];
const AA_SWITCH_ELEMENTS = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"];
const UI_CONTROL_ELEMETS =
{
JS_SETTINGS : []
}
//UI Elements
/*
{
name : "",
type : ,
properties :
{
enabled : true,
},
value : ,
},
*/
class UI_ELEMENT
{
constructor(name,type,properties)
{
self.name = name;
self.type = type;
//default values
if(type == TYPE_TEXTBOX)
{
self.value = "";
}
else if(type == TYPE_MULTIDROPDOWN || type == TYPE_DROPDOWN || type == TYPE_SLIDERFLOAT || type == TYPE_SLIDERINT || type == TYPE_CHECKBOX || type == TYPE_SEPERATOR )
{
self.value = 0;
}
else if(type == TYPE_COLORPICKER)
{
self.value == [255,255,255,255]
}
if(properties != null)
{
self.properties = properties
//if didn't explicitly disable the element
if(properties.enabled == null)
{
self.properties.enabled = 1
}
//if caching is needed
if(properties.saveCache == true)
{
self.cache = 0
self.properties.saveCache = null
}
}
else
{
self.properties = {enabled : 1}
}
}
}
const PATHS =
{
JS_SETTINGS : main_path,
AA_SETTINGS : aa_path,
AA_MANAGER_SETTINGS : aa_control_path,
//TODO: FIX
VISUALS_SETTINGS : visuals_path
};
var UI_SETTINGS=
{
//========================================================================================== GENERAL SETTINGS =================================================================================================================
JS_SETTINGS :
{
updateConfig : new UI_ELEMENT("UPDATE CONFIG", TYPE_CHECKBOX),
newPresetName : new UI_ELEMENT("New Preset Name:", TYPE_TEXTBOX),
createPreset : new UI_ELEMENT("Create New Preset", TYPE_TEXTBOX),
saveConfig : new UI_ELEMENT("SAVE CONFIG", TYPE_CHECKBOX),
saveConfig : new UI_ELEMENT("LOAD CONFIG", TYPE_CHECKBOX),
configName : new UI_ELEMENT("SAVE CONFIG", TYPE_TEXTBOX),
},
//========================================================================================== AA =================================================================================================================
AA_SETTINGS :
{
//presets
presetSelection : new UI_ELEMENT("Presets", TYPE_DROPDOWN, {elements : presetNames, searchable : 0, saveCache : true}),
renamePreset : new UI_ELEMENT("Rename Selected Preset:", TYPE_TEXTBOX),
confirmRename : new UI_ELEMENT("Confirm", TYPE_CHECKBOX),
//actual aa settings
//------------------------------------------------------------------------ real -----------------------------------------------------
realMode : new UI_ELEMENT("Real Mode", TYPE_DROPDOWN, {elements : AA_MODES_ELEMENTS, searchable : 0}),
realSwitchPhase : new UI_ELEMENT("Real Switch Phase", TYPE_DROPDOWN, {elements : AA_SWITCH_ELEMENTS, searchable : 1, enabled : 0}),
activeRealSwitchPhases : new UI_ELEMENT("Active Real Switch Phases", TYPE_SLIDERINT,{min : 1, max : 16, enabled : 0}),
realOffset : new UI_ELEMENT("Real Offset", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
realDelta : new UI_ELEMENT("Real Delta", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
realDelay : new UI_ELEMENT("Real Delay", TYPE_SLIDERINT, {min : 1, max : 256, enabled : 0}),
realDelayOffset : new UI_ELEMENT("Real Delay Offset", TYPE_SLIDERINT, {min : 0, max : 128, enabled : 0}),
//----------------------------------------------------- fake ----------------------------------------
fakeMode : new UI_ELEMENT("Fake Mode", TYPE_DROPDOWN, {elements : AA_MODES_ELEMENTS, searchable : 0}),
fakeSwitchPhase : new UI_ELEMENT("Fake Switch Phase", TYPE_DROPDOWN, {elements : AA_SWITCH_ELEMENTS, searchable : 1, enabled : 0}),
activeFakeSwitchPhases : new UI_ELEMENT("Active Fake Switch Phases", TYPE_SLIDERINT,{min : 1, max : 16, enabled : 0}),
fakeOffset : new UI_ELEMENT("Fake Offset", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
fakeDelta : new UI_ELEMENT("Fake Delta", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
fakeDelay : new UI_ELEMENT("Fake Delay", TYPE_SLIDERINT, {min : 1, max : 256, enabled : 0}),
fakeDelayOffset : new UI_ELEMENT("Fake Delay Offset", TYPE_SLIDERINT, {min : 0, max : 128, enabled : 0}),
//------------------------------------------------------------- LBY -----------------------------------------
LBYMode : new UI_ELEMENT("LBY Mode", TYPE_DROPDOWN, {elements : AA_MODES_ELEMENTS, searchable : 0}),
LBYSwitchPhase : new UI_ELEMENT("LBY Switch Phase", TYPE_DROPDOWN, {elements : AA_SWITCH_ELEMENTS, searchable : 1, enabled : 0}),
activeLBYSwitchPhases : new UI_ELEMENT("Active LBY Switch Phases", TYPE_SLIDERINT,{min : 1, max : 16, enabled : 0}),
LBYOffset : new UI_ELEMENT("LBY Offset", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
LBYDelta : new UI_ELEMENT("LBY Delta", TYPE_SLIDERINT, {min : -180, max : 180, enabled : 0}),
LBYDelay : new UI_ELEMENT("LBY Delay", TYPE_SLIDERINT, {min : 1, max : 256, enabled : 0}),
LBYDelayOffset : new UI_ELEMENT("LBY Delay Offset", TYPE_SLIDERINT, {min : 0, max : 128, enabled : 0})
},
//========================================================================================== PRESET MANAGER =================================================================================================================
AA_MANAGER_SETTINGS :
{
AAConditions : new UI_ELEMENT("Conditions", TYPE_DROPDOWN, {elements : ["Dormant", "Running", "Slow-Walking", "Crouching", "In Air", "On Peek", "Fake-Ducking", "HS Active", "DT Active", "On Use", "Knifing", "Zeusing", "Override Key 1", "Override Key 2", "Override Key 3", "Override Key 4"], searchable : 1, saveCache : true}),
presetSwitchConditions : new UI_ELEMENT("Switch", TYPE_DROPDOWN, {elements : ["Dodge Bruteforce", "On Interval"]}),
switchDelay : new UI_ELEMENT("Switch Delay", TYPE_SLIDERINT, {min : 1, max : 256, enabled : 0}),
switchDelta : new UI_ELEMENT("Switch Delta", TYPE_SLIDERINT, {min : 1, max : 256, enabled : 0})
},
//========================================================================================== EXPLOIT SETTINGS ===================================================================================================================
EXPLOITS_SETTINGS :
{
},
//========================================================================================== FAKELAG SETTINGS ===================================================================================================================
FAKELAG_SETTINGS :
{
},
INDICATOR_SETTINGS :
{
},
CROSSHAIR_INDICATOR_SETTINGS :
{
}
};
//password
/*
UI.AddCheckbox(secrets_path,"Protect Config With Password")
UI.AddTextbox(secrets_path,"Config Password:");
UI.AddCheckbox(secrets_path,"Save Password")
*/
//update config settings
UI.AddCheckbox(main_path,"UPDATE CONFIG");
//["Static","Jitter","Switch","Sway","Random"]
//["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"]
//
//keybinds
UI.AddHotkey(rage_keybinds,"AA Override Key 1" , "AA 1");
UI.AddHotkey(rage_keybinds,"AA Override Key 2" , "AA 2");
UI.AddHotkey(rage_keybinds,"AA Override Key 3" , "AA 3");
UI.AddHotkey(rage_keybinds,"AA Override Key 4" , "AA 4");
UI.AddHotkey(rage_keybinds,"Mindmg Override Key 1", "Mindmg 1");
UI.AddHotkey(rage_keybinds,"Mindmg Override Key 2", "Mindmg 2");
UI.AddHotkey(rage_keybinds,"Mindmg Override Key 3", "Mindmg 3");
UI.AddHotkey(rage_keybinds,"Mindmg Override Key 4", "Mindmg 4");
//exploits
UI.AddSliderInt("Doubletap Tick Shift",1,64);
UI.AddSliderInt("Doubletap Tolerance",0,16);
//indicators
UI.AddMultiDropdown(indicators_path,"Active Indicators", indicatorItems)
UI.AddMultiDropdown(crosshair_indicators_path,"Active Crosshair Indicators",crosshairIndicatorItems)
function updatePlayerslist()
{
enemies = Entity.GetEnemies();
teammates = Entity.GetTeammates();
players = Entity.GetPlayers();
rageTargets = Ragebot.GetTargets();
}
function hitscan(origin, target, hitboxes)
{
if(Entity.IsValid(target) == true && Entity.IsAlive(target) && Entity.IsDormant(target) == false)
{
localPlayer = Entity.GetLocalPlayer()
maxDmg = -1;
currentDmg = -1;
for(var i in hitboxes)
{
currentDmg = Trace.Bullet(localPlayer, target, origin, Entity.GetHitboxPosition(target, hitboxes[i]))
//overrides the maxdmg thing if damage is increased relative to previous results
maxdmg = currentDmg > maxDmg ? currentDmg : maxDmg
//did i do this right? i hope i did....
}
//Cheat.Print(Entity.GetName(target).toString()+"'s maxdmg is"+ maxDmg.toString()+"\n")
return maxDmg;
}
else
{
//Cheat.Print("Entity "+Entity.GetName(target).toString()+" is invalid or dormant \n")
return -1;
}
}
function setDropdownValue(value, index, enable)
{ // credits ed
var mask = 1 << index;
return enable ? ( value | mask ) : ( value & ~mask );
}
function getDropdownValue(value, index)
{