forked from ticzz/Aimware-v5-luas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAntiAim - DesyncPlus.lua
1730 lines (1475 loc) · 79 KB
/
AntiAim - DesyncPlus.lua
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
-- Desync Plus by stacky
--Some Vars
local screenCenterX, screenCenterY = draw.GetScreenSize();
screenCenterX = screenCenterX * 0.5;
screenCenterY = screenCenterY * 0.5;
DESYNCPLUS_CURRENT_VERSION = "2.0.3"
DESYNCPLUS_LATEST_VERSION = "Not Checked"
local SCREEN_W, SCREEN_H = draw.GetScreenSize()
local function guiModify(guiObject, x, y, width)
if not guiObject then return end
if x then guiObject:SetPosX(x) end
if y then guiObject:SetPosY(y) end
if width then guiObject:SetWidth(width) end
end
local activeMenu = 0
local activeState = 0
local bTabClicked = true
local FONT = draw.CreateFont("Verdana", 30, 2000)
local AW_WINDOW = gui.Reference( "Menu" )
local WINDOW = gui.Window( "desyncplus", "Desync Plus", 200, 200, 850, 550 )
local TABS_GBOX = gui.Groupbox( WINDOW, "", 10, 10, 830, 0 )
local ANTIAIM_BTN = gui.Button( TABS_GBOX, "Anti-Aim", function()
activeMenu = 0
bTabClicked = true
WINDOW:SetHeight(550)
end )
guiModify(ANTIAIM_BTN, 0, -30, 180)
local BUILDER_BTN = gui.Button( TABS_GBOX, "Builder", function()
activeMenu = 1
bTabClicked = true
WINDOW:SetHeight(290)
end )
guiModify(BUILDER_BTN, 205, -30, 180)
local MISC_BTN = gui.Button( TABS_GBOX, "Misc", function()
activeMenu = 2
bTabClicked = true
WINDOW:SetHeight(495)
end )
guiModify(MISC_BTN, 415, -30, 180)
local SETTINGS_BTN = gui.Button( TABS_GBOX, "Settings", function()
activeMenu = 3
bTabClicked = true
WINDOW:SetHeight(475)
end )
guiModify(SETTINGS_BTN, 620, -30, 180)
local menus = {
antiaim = 0,
builder = 1,
misc = 2,
settings = 3
}
local ANTIAIM_STATE_GBOX = gui.Groupbox( WINDOW, "", 10, 85, 830, 0 )
local ANTIAIM_STATE_STANDING_BTN = gui.Button( ANTIAIM_STATE_GBOX, "Standing", function()
activeState = 0
end )
guiModify(ANTIAIM_STATE_STANDING_BTN, 0, -30, 180)
local ANTIAIM_STATE_MOVING_BTN = gui.Button( ANTIAIM_STATE_GBOX, "Moving", function()
activeState = 1
end )
guiModify(ANTIAIM_STATE_MOVING_BTN, 300, -30, 180)
local ANTIAIM_STATE_AIR_BTN = gui.Button( ANTIAIM_STATE_GBOX, "Air", function()
activeState = 2
end )
guiModify(ANTIAIM_STATE_AIR_BTN, 615, -30, 180)
local states = {
standing = 0,
moving = 1,
air = 2
}
function pickle(t)
return Pickle:clone():pickle_(t)
end
Pickle = {
clone = function(t)
local nt = {}
for i, v in pairs(t) do
nt[i] = v
end
return nt
end
}
function Pickle:pickle_(root)
if type(root) ~= "table" then
error("can only pickle tables, not " .. type(root) .. "s")
end
self._tableToRef = {}
self._refToTable = {}
local savecount = 0
self:ref_(root)
local s = ""
while table.getn(self._refToTable) > savecount do
savecount = savecount + 1
local t = self._refToTable[savecount]
s = s .. "{\n"
for i, v in pairs(t) do
s = string.format("%s[%s]=%s,\n", s, self:value_(i), self:value_(v))
end
s = s .. "},\n"
end
return string.format("{%s}", s)
end
function Pickle:value_(v)
local vtype = type(v)
if vtype == "string" then
return string.format("%q", v)
elseif vtype == "number" then
return v
elseif vtype == "boolean" then
return tostring(v)
elseif vtype == "table" then
return "{" .. self:ref_(v) .. "}"
else --error("pickle a "..type(v).." is not supported")
end
end
function Pickle:ref_(t)
local ref = self._tableToRef[t]
if not ref then
if t == self then
error("can't pickle the pickle class")
end
table.insert(self._refToTable, t)
ref = table.getn(self._refToTable)
self._tableToRef[t] = ref
end
return ref
end
function unpickle(s)
if type(s) ~= "string" then
error("can't unpickle a " .. type(s) .. ", only strings")
end
local gentables = loadstring("return " .. s)
local tables = gentables()
for tnum = 1, table.getn(tables) do
local t = tables[tnum]
local tcopy = {}
for i, v in pairs(t) do
tcopy[i] = v
end
for i, v in pairs(tcopy) do
local ni, nv
if type(i) == "table" then
ni = tables[i[1]]
else
ni = i
end
if type(v) == "table" then
nv = tables[v[1]]
else
nv = v
end
t[i] = nil
t[ni] = nv
end
end
return tables[1]
end
local base64 = {}
local extract = _G.bit32 and _G.bit32.extract
if not extract then
if _G.bit then
local shl, shr, band = _G.bit.lshift, _G.bit.rshift, _G.bit.band
extract = function( v, from, width )
return band( shr( v, from ), shl( 1, width ) - 1 )
end
elseif _G._VERSION >= "Lua 5.3" then
extract = load[[return function( v, from, width )
return ( v >> from ) & ((1 << width) - 1)
end]]()
else
extract = function( v, from, width )
local w = 0
local flag = 2^from
for i = 0, width-1 do
local flag2 = flag + flag
if v % flag2 >= flag then
w = w + 2^i
end
flag = flag2
end
return w
end
end
end
function base64.makeencoder( s62, s63, spad )
local encoder = {}
for b64code, char in pairs{[0]='A','B','C','D','E','F','G','H','I','J',
'K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y',
'Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v','w','x','y','z','0','1','2',
'3','4','5','6','7','8','9',s62 or '+',s63 or'/',spad or'='} do
encoder[b64code] = char:byte()
end
return encoder
end
function base64.makedecoder( s62, s63, spad )
local decoder = {}
for b64code, charcode in pairs( base64.makeencoder( s62, s63, spad )) do
decoder[charcode] = b64code
end
return decoder
end
local DEFAULT_ENCODER = base64.makeencoder()
local DEFAULT_DECODER = base64.makedecoder()
local char, concat = string.char, table.concat
function base64.encode( str, encoder, usecaching )
encoder = encoder or DEFAULT_ENCODER
local t, k, n = {}, 1, #str
local lastn = n % 3
local cache = {}
for i = 1, n-lastn, 3 do
local a, b, c = str:byte( i, i+2 )
local v = a*0x10000 + b*0x100 + c
local s
if usecaching then
s = cache[v]
if not s then
s = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[extract(v,0,6)])
cache[v] = s
end
else
s = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[extract(v,0,6)])
end
t[k] = s
k = k + 1
end
if lastn == 2 then
local a, b = str:byte( n-1, n )
local v = a*0x10000 + b*0x100
t[k] = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[extract(v,6,6)], encoder[64])
elseif lastn == 1 then
local v = str:byte( n )*0x10000
t[k] = char(encoder[extract(v,18,6)], encoder[extract(v,12,6)], encoder[64], encoder[64])
end
return concat( t )
end
function base64.decode( b64, decoder, usecaching )
decoder = decoder or DEFAULT_DECODER
local pattern = '[^%w%+%/%=]'
if decoder then
local s62, s63
for charcode, b64code in pairs( decoder ) do
if b64code == 62 then s62 = charcode
elseif b64code == 63 then s63 = charcode
end
end
pattern = ('[^%%w%%%s%%%s%%=]'):format( char(s62), char(s63) )
end
b64 = b64:gsub( pattern, '' )
local cache = usecaching and {}
local t, k = {}, 1
local n = #b64
local padding = b64:sub(-2) == '==' and 2 or b64:sub(-1) == '=' and 1 or 0
for i = 1, padding > 0 and n-4 or n, 4 do
local a, b, c, d = b64:byte( i, i+3 )
local s
if usecaching then
local v0 = a*0x1000000 + b*0x10000 + c*0x100 + d
s = cache[v0]
if not s then
local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d]
s = char( extract(v,16,8), extract(v,8,8), extract(v,0,8))
cache[v0] = s
end
else
local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40 + decoder[d]
s = char( extract(v,16,8), extract(v,8,8), extract(v,0,8))
end
t[k] = s
k = k + 1
end
if padding == 1 then
local a, b, c = b64:byte( n-3, n-1 )
local v = decoder[a]*0x40000 + decoder[b]*0x1000 + decoder[c]*0x40
t[k] = char( extract(v,16,8), extract(v,8,8))
elseif padding == 2 then
local a, b = b64:byte( n-3, n-2 )
local v = decoder[a]*0x40000 + decoder[b]*0x1000
t[k] = char( extract(v,16,8))
end
return concat( t )
end
function split(inputstr, sep)
if sep == nil then sep = "%s" end
local t = {}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do table.insert(t, str) end
return t
end
-- Base Direction
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX = gui.Groupbox( WINDOW, "Base Direction", 10, 165, 200, 500 )
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, "antiaim.basedir.standing.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_BASEVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, "antiaim.basedir.standing.basevalue", "Base Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, "antiaim.basedir.standing.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, "antiaim.basedir.standing.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, "antiaim.basedir.standing.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX = gui.Groupbox( WINDOW, "Base Direction", 10, 165, 200, 500 )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, "antiaim.basedir.moving.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_BASEVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, "antiaim.basedir.moving.basevalue", "Base Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, "antiaim.basedir.moving.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, "antiaim.basedir.moving.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, "antiaim.basedir.moving.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX = gui.Groupbox( WINDOW, "Base Direction", 10, 165, 200, 500 )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, "antiaim.basedir.air.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_BASEVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, "antiaim.basedir.air.basevalue", "Base Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, "antiaim.basedir.air.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, "antiaim.basedir.air.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, "antiaim.basedir.air.speed", "Speed", 0, 0, 100 )
-- Rotation
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX = gui.Groupbox( WINDOW, "Rotation", 220, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.minvalue", "Minimal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.maxvalue", "Maximal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MIN = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.deadzone.min", "Min Dead Zone", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MAX = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, "antiaim.rotation.standing.deadzone.max", "Max Dead Zone", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX = gui.Groupbox( WINDOW, "Rotation", 220, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.minvalue", "Minimal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.maxvalue", "Maximal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MIN = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.deadzone.min", "Min Dead Zone", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MAX = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, "antiaim.rotation.moving.deadzone.max", "Max Dead Zone", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX = gui.Groupbox( WINDOW, "Rotation", 220, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.minvalue", "Minimal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.maxvalue", "Maximal Value", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.deadzone.min", "Min Dead Zone", 0, -58, 58 )
DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MAX = gui.Slider( DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, "antiaim.rotation.air.deadzone.max", "Max Dead Zone", 0, -58, 58 )
-- LBY
DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX = gui.Groupbox( WINDOW, "LBY", 430, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_LBY_STANDING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, "antiaim.lby.standing.type", "Type", "Off", "Static", "Match", "Opposite", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_LBY_STANDING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, "antiaim.lby.standing.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_STANDING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, "antiaim.lby.standing.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_STANDING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, "antiaim.lby.standing.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_LBY_STANDING_VALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, "antiaim.lby.standing.value", "Value", 0, 0, 180 )
DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX = gui.Groupbox( WINDOW, "LBY", 430, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_LBY_MOVING_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, "antiaim.lby.moving.type", "Type", "Off", "Static", "Match", "Opposite", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_LBY_MOVING_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, "antiaim.lby.moving.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_MOVING_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, "antiaim.lby.moving.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_MOVING_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, "antiaim.lby.moving.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_LBY_MOVING_VALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, "antiaim.lby.moving.value", "Value", 0, 0, 180 )
DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX = gui.Groupbox( WINDOW, "LBY", 430, 165, 200, 200 )
DESYNCPLUS_ANTIAIM_LBY_AIR_TYPE = gui.Combobox( DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, "antiaim.lby.air.type", "Type", "Off", "Static", "Match", "Opposite", "Switch", "Cycle", "Jitter" )
DESYNCPLUS_ANTIAIM_LBY_AIR_MINVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, "antiaim.lby.air.minvalue", "Minimal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_AIR_MAXVALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, "antiaim.lby.air.maxvalue", "Maximal Value", 0, -180, 180 )
DESYNCPLUS_ANTIAIM_LBY_AIR_SPEED = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, "antiaim.lby.air.speed", "Speed", 0, 0, 100 )
DESYNCPLUS_ANTIAIM_LBY_AIR_VALUE = gui.Slider( DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, "antiaim.lby.air.value", "Value", 0, 0, 180 )
-- Pitch
local ANTIAIM_PITCH_STANDING_GBOX = gui.Groupbox( WINDOW, "Pitch", 640, 165, 200, 200 )
local ANTIAIM_PITCH_STANDING_TYPE = gui.Combobox( ANTIAIM_PITCH_STANDING_GBOX, "antiaim.pitch.standing.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
local ANTIAIM_PITCH_STANDING_MINVALUE = gui.Slider( ANTIAIM_PITCH_STANDING_GBOX, "antiaim.pitch.standing.minvalue", "Minimal Value", 0, -180, 180 )
local ANTIAIM_PITCH_STANDING_MAXVALUE = gui.Slider( ANTIAIM_PITCH_STANDING_GBOX, "antiaim.pitch.standing.maxvalue", "Maximal Value", 0, -180, 180 )
local ANTIAIM_PITCH_STANDING_SPEED = gui.Slider( ANTIAIM_PITCH_STANDING_GBOX, "antiaim.pitch.standing.speed", "Speed", 0, 0, 100 )
local ANTIAIM_PITCH_MOVING_GBOX = gui.Groupbox( WINDOW, "Pitch", 640, 165, 200, 200 )
local ANTIAIM_PITCH_MOVING_TYPE = gui.Combobox( ANTIAIM_PITCH_MOVING_GBOX, "antiaim.pitch.moving.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
local ANTIAIM_PITCH_MOVING_MINVALUE = gui.Slider( ANTIAIM_PITCH_MOVING_GBOX, "antiaim.pitch.moving.minvalue", "Minimal Value", 0, -180, 180 )
local ANTIAIM_PITCH_MOVING_MAXVALUE = gui.Slider( ANTIAIM_PITCH_MOVING_GBOX, "antiaim.pitch.moving.maxvalue", "Maximal Value", 0, -180, 180 )
local ANTIAIM_PITCH_MOVING_SPEED = gui.Slider( ANTIAIM_PITCH_MOVING_GBOX, "antiaim.pitch.moving.speed", "Speed", 0, 0, 100 )
local ANTIAIM_PITCH_AIR_GBOX = gui.Groupbox( WINDOW, "Pitch", 640, 165, 200, 200 )
local ANTIAIM_PITCH_AIR_TYPE = gui.Combobox( ANTIAIM_PITCH_AIR_GBOX, "antiaim.pitch.air.type", "Type", "Off", "Static", "Switch", "Cycle", "Jitter" )
local ANTIAIM_PITCH_AIR_MINVALUE = gui.Slider( ANTIAIM_PITCH_AIR_GBOX, "antiaim.pitch.air.minvalue", "Minimal Value", 0, -180, 180 )
local ANTIAIM_PITCH_AIR_MAXVALUE = gui.Slider( ANTIAIM_PITCH_AIR_GBOX, "antiaim.pitch.air.maxvalue", "Maximal Value", 0, -180, 180 )
local ANTIAIM_PITCH_AIR_SPEED = gui.Slider( ANTIAIM_PITCH_AIR_GBOX, "antiaim.pitch.air.speed", "Speed", 0, 0, 100 )
local tblANTIAIM = {
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_GBOX, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_GBOX, DESYNCPLUS_ANTIAIM_LBY_STANDING_GBOX, ANTIAIM_PITCH_STANDING_GBOX,
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_GBOX, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_GBOX, DESYNCPLUS_ANTIAIM_LBY_MOVING_GBOX, ANTIAIM_PITCH_MOVING_GBOX,
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_GBOX, DESYNCPLUS_ANTIAIM_ROTATION_AIR_GBOX, DESYNCPLUS_ANTIAIM_LBY_AIR_GBOX, ANTIAIM_PITCH_AIR_GBOX, ANTIAIM_STATE_GBOX
}
local tblBASEDIR = {
{ DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_TYPE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_TYPE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_TYPE },
{
{ DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_SPEED },
{ DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_SPEED },
{ DESYNCPLUS_ANTIAIM_BASEDIR_AIR_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_SPEED }
}
}
local tblROTATION = {
{ DESYNCPLUS_ANTIAIM_ROTATION_STANDING_TYPE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_TYPE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_TYPE },
{
{ DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_SPEED, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MAX },
{ DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_SPEED, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MAX },
{ DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_SPEED, DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MAX }
}
}
local tblLBY = {
{ DESYNCPLUS_ANTIAIM_LBY_STANDING_TYPE, DESYNCPLUS_ANTIAIM_LBY_MOVING_TYPE, DESYNCPLUS_ANTIAIM_LBY_AIR_TYPE },
{
{ DESYNCPLUS_ANTIAIM_LBY_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_STANDING_SPEED, DESYNCPLUS_ANTIAIM_LBY_STANDING_VALUE },
{ DESYNCPLUS_ANTIAIM_LBY_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_MOVING_SPEED, DESYNCPLUS_ANTIAIM_LBY_MOVING_VALUE },
{ DESYNCPLUS_ANTIAIM_LBY_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_AIR_SPEED, DESYNCPLUS_ANTIAIM_LBY_AIR_VALUE }
}
}
local tblPITCH = {
{ ANTIAIM_PITCH_STANDING_TYPE, ANTIAIM_PITCH_MOVING_TYPE, ANTIAIM_PITCH_AIR_TYPE },
{
{ ANTIAIM_PITCH_STANDING_MINVALUE, ANTIAIM_PITCH_STANDING_MAXVALUE, ANTIAIM_PITCH_STANDING_SPEED },
{ ANTIAIM_PITCH_MOVING_MINVALUE, ANTIAIM_PITCH_MOVING_MAXVALUE, ANTIAIM_PITCH_MOVING_SPEED },
{ ANTIAIM_PITCH_AIR_MINVALUE, ANTIAIM_PITCH_AIR_MAXVALUE, ANTIAIM_PITCH_AIR_SPEED }
}
}
local tblPITCHVALUES = {
ANTIAIM_PITCH_STANDING_MINVALUE, ANTIAIM_PITCH_STANDING_MAXVALUE, ANTIAIM_PITCH_MOVING_MINVALUE, ANTIAIM_PITCH_MOVING_MAXVALUE, ANTIAIM_PITCH_AIR_MINVALUE, ANTIAIM_PITCH_AIR_MAXVALUE
}
local tblDeadZone = {
{ DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MAX, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE },
{ DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MAX, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE },
{ DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE }
}
local tblShared = { tblBASEDIR, tblROTATION, tblLBY, tblPITCH }
local bShared = false
local function handleAntiaimGUI()
local startingIndex = nil
if activeState == states.standing then
startingIndex = 1
elseif activeState == states.moving then
startingIndex = 5
else
startingIndex = 9
end
for i = startingIndex, startingIndex + 3 do
tblANTIAIM[i]:SetInvisible(false)
end
ANTIAIM_STATE_GBOX:SetInvisible(false)
local tblDisable = {false, false, false, false}
if tblBASEDIR[1][activeState + 1]:GetValue() == 0 then
tblDisable = {true, true, true, true}
elseif tblBASEDIR[1][activeState + 1]:GetValue() == 1 then
tblDisable = {false, true, true, true}
elseif tblBASEDIR[1][activeState + 1]:GetValue() == 2 then
tblDisable = {true, false, false, false}
elseif tblBASEDIR[1][activeState + 1]:GetValue() == 3 then
tblDisable = {false, false, false, false}
elseif tblBASEDIR[1][activeState + 1]:GetValue() == 4 then
tblDisable = {false, false, false, false}
end
for j = 1, #tblBASEDIR[2][activeState + 1] do
tblBASEDIR[2][activeState + 1][j]:SetDisabled(tblDisable[j])
end
for i = 1, #tblROTATION[2] do
if tblROTATION[1][i]:GetValue() == 0 then
tblDisable = {true, true, true, true, true}
elseif tblROTATION[1][i]:GetValue() == 1 then
tblDisable = {false, true, true, true, true}
elseif tblROTATION[1][i]:GetValue() == 2 then
tblDisable = {false, false, false, true, true}
elseif tblROTATION[1][i]:GetValue() == 4 or tblROTATION[1][i]:GetValue() == 3 then
tblDisable = {false, false, false, false, false}
end
for j = 1, #tblROTATION[2][i] do
tblROTATION[2][i][j]:SetDisabled(tblDisable[j])
end
end
for i = 1, #tblLBY[2] do
if tblLBY[1][i]:GetValue() == 0 then
tblDisable = {true, true, true, true}
elseif tblLBY[1][i]:GetValue() == 1 then
tblDisable = {false, true, true, true}
elseif tblLBY[1][i]:GetValue() == 2 or tblLBY[1][i]:GetValue() == 3 then
tblDisable = {true, true, true, false}
elseif tblLBY[1][i]:GetValue() == 4 then
tblDisable = {false, false, false, true}
elseif tblLBY[1][i]:GetValue() == 5 then
tblDisable = {false, false, false, true}
elseif tblLBY[1][i]:GetValue() == 6 then
tblDisable = {false, false, false, true}
end
for j = 1, #tblLBY[2][i] do
tblLBY[2][i][j]:SetDisabled(tblDisable[j])
end
end
for i = 1, #tblPITCH[2] do
if tblPITCH[1][i]:GetValue() == 0 then
tblDisable = {true, true, true}
elseif tblPITCH[1][i]:GetValue() == 1 then
tblDisable = {false, true, true}
elseif tblPITCH[1][i]:GetValue() == 2 or tblPITCH[1][i]:GetValue() == 3 then
tblDisable = {false, false, false}
elseif tblPITCH[1][i]:GetValue() == 4 then
tblDisable = {false, false, false}
end
for j = 1, #tblPITCH[2][i] do
tblPITCH[2][i][j]:SetDisabled(tblDisable[j])
end
end
if gui.GetValue( "misc.antiuntrusted" ) then
for i = 1, #tblPITCHVALUES do
if tblPITCHVALUES[i]:GetValue() < -89 then
tblPITCHVALUES[i]:SetValue(-89)
elseif tblPITCHVALUES[i]:GetValue() > 89 then
tblPITCHVALUES[i]:SetValue(89)
end
end
end
if bShared then
for tbl = 1, #tblShared do
tblShared[tbl][1][2]:SetValue(tblShared[tbl][1][1]:GetValue())
tblShared[tbl][1][3]:SetValue(tblShared[tbl][1][1]:GetValue())
for i = 2, #tblShared[tbl][2] do
for j = 1, #tblShared[tbl][2][i] do
tblShared[tbl][2][i][j]:SetValue(tblShared[tbl][2][1][j]:GetValue())
end
end
end
end
local tblDeadZone = {
{ DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MAX, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE },
{ DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MAX, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE },
{ DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE }
}
for state = 1, #tblDeadZone do
if tblDeadZone[state][1]:GetValue() < tblDeadZone[state][2]:GetValue() then tblDeadZone[state][1]:SetValue(tblDeadZone[state][2]:GetValue()) end
if tblDeadZone[state][3]:GetValue() > tblDeadZone[state][4]:GetValue() then tblDeadZone[state][3]:SetValue(tblDeadZone[state][4]:GetValue()) end
end
end
local playerState = {
standing = 0,
moving = 1,
air = 2
}
local iBaseDirTick = 0
local iBaseDirSwitch = 0
local iBaseDirDirection = 1
local iBaseDirAngle = 0
local iLastBaseValue = 0
local iRotationTick = 0
local iRotationSwitch = 0
local iRotationDirection = 0
local iRotationAngle = 0
local iLBYTick = 0
local iLBYSwitch = 0
local iLBYDirection = 0
local iLBYAngle = 0
local iPitchTick = 0
local iPitchSwitch = 0
local iPitchDirection = 0
local iPitchAngle = 0
local iLastPitch = 0
local bShotRevolver = false
local iTickRateMultiplier = 1
local iInvert = 1
local bInvertBaseDir = false
local bInvertRotation = false
local bInvertLBY = false
local function calcCycle(angle, step)
if step == -1 then
if angle == -179 then
return 180
end
else
if angle == 180 then
return -179
end
end
return angle + step
end
local function handleAntiaim(cmd)
local hLocalPlayer = entities.GetLocalPlayer()
local tblValues = {
BaseDir = { Type = nil, BaseValue = nil, MinValue = nil, MaxValue = nil, Speed = nil },
Rotation = { Type = nil, MinValue = nil, MaxValue = nil, Speed = nil, MinDeadZone = nil, MaxDeadZone = nil },
LBY = { Type = nil, MinValue = nil, MaxValue = nil, Speed = nil, Value = nil },
Pitch = { Type = nil, MinValue = nil, MaxValue = nil, Speed = nil },
}
if bit.band(hLocalPlayer:GetPropInt("m_fFlags"), 1) == 0 then
tblValues.BaseDir.Type = DESYNCPLUS_ANTIAIM_BASEDIR_AIR_TYPE:GetValue()
tblValues.BaseDir.BaseValue = DESYNCPLUS_ANTIAIM_BASEDIR_AIR_BASEVALUE:GetValue()
tblValues.BaseDir.MinValue = DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MINVALUE:GetValue()
tblValues.BaseDir.MaxValue = DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MAXVALUE:GetValue()
tblValues.BaseDir.Speed = DESYNCPLUS_ANTIAIM_BASEDIR_AIR_SPEED:GetValue()
tblValues.Rotation.Type = DESYNCPLUS_ANTIAIM_ROTATION_AIR_TYPE:GetValue()
tblValues.Rotation.MinValue = DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE:GetValue()
tblValues.Rotation.MaxValue = DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE:GetValue()
tblValues.Rotation.Speed = DESYNCPLUS_ANTIAIM_ROTATION_AIR_SPEED:GetValue()
tblValues.Rotation.MinDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MIN:GetValue()
tblValues.Rotation.MaxDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_AIR_DEADZONE_MAX:GetValue()
tblValues.LBY.Type = DESYNCPLUS_ANTIAIM_LBY_AIR_TYPE:GetValue()
tblValues.LBY.MinValue = DESYNCPLUS_ANTIAIM_LBY_AIR_MINVALUE:GetValue()
tblValues.LBY.MaxValue = DESYNCPLUS_ANTIAIM_LBY_AIR_MAXVALUE:GetValue()
tblValues.LBY.Speed = DESYNCPLUS_ANTIAIM_LBY_AIR_SPEED:GetValue()
tblValues.LBY.Value = DESYNCPLUS_ANTIAIM_LBY_AIR_VALUE:GetValue()
tblValues.Pitch.Type = ANTIAIM_PITCH_AIR_TYPE:GetValue()
tblValues.Pitch.MinValue = ANTIAIM_PITCH_AIR_MINVALUE:GetValue()
tblValues.Pitch.MaxValue = ANTIAIM_PITCH_AIR_MAXVALUE:GetValue()
tblValues.Pitch.Speed = ANTIAIM_PITCH_AIR_SPEED:GetValue()
else
if math.sqrt(hLocalPlayer:GetPropFloat( "localdata", "m_vecVelocity[0]" ) ^ 2 + hLocalPlayer:GetPropFloat( "localdata", "m_vecVelocity[1]" ) ^ 2) > 5 then
tblValues.BaseDir.Type = DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_TYPE:GetValue()
tblValues.BaseDir.BaseValue = DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_BASEVALUE:GetValue()
tblValues.BaseDir.MinValue = DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MINVALUE:GetValue()
tblValues.BaseDir.MaxValue = DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MAXVALUE:GetValue()
tblValues.BaseDir.Speed = DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_SPEED:GetValue()
tblValues.Rotation.Type = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_TYPE:GetValue()
tblValues.Rotation.MinValue = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE:GetValue()
tblValues.Rotation.MaxValue = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE:GetValue()
tblValues.Rotation.Speed = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_SPEED:GetValue()
tblValues.Rotation.MinDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MIN:GetValue()
tblValues.Rotation.MaxDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_MOVING_DEADZONE_MAX:GetValue()
tblValues.LBY.Type = DESYNCPLUS_ANTIAIM_LBY_MOVING_TYPE:GetValue()
tblValues.LBY.MinValue = DESYNCPLUS_ANTIAIM_LBY_MOVING_MINVALUE:GetValue()
tblValues.LBY.MaxValue = DESYNCPLUS_ANTIAIM_LBY_MOVING_MAXVALUE:GetValue()
tblValues.LBY.Speed = DESYNCPLUS_ANTIAIM_LBY_MOVING_SPEED:GetValue()
tblValues.LBY.Value = DESYNCPLUS_ANTIAIM_LBY_MOVING_VALUE:GetValue()
tblValues.Pitch.Type = ANTIAIM_PITCH_MOVING_TYPE:GetValue()
tblValues.Pitch.MinValue = ANTIAIM_PITCH_MOVING_MINVALUE:GetValue()
tblValues.Pitch.MaxValue = ANTIAIM_PITCH_MOVING_MAXVALUE:GetValue()
tblValues.Pitch.Speed = ANTIAIM_PITCH_MOVING_SPEED:GetValue()
else
tblValues.BaseDir.Type = DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_TYPE:GetValue()
tblValues.BaseDir.BaseValue = DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_BASEVALUE:GetValue()
tblValues.BaseDir.MinValue = DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MINVALUE:GetValue()
tblValues.BaseDir.MaxValue = DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MAXVALUE:GetValue()
tblValues.BaseDir.Speed = DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_SPEED:GetValue()
tblValues.Rotation.Type = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_TYPE:GetValue()
tblValues.Rotation.MinValue = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE:GetValue()
tblValues.Rotation.MaxValue = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE:GetValue()
tblValues.Rotation.Speed = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_SPEED:GetValue()
tblValues.Rotation.MinDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MIN:GetValue()
tblValues.Rotation.MaxDeadZone = DESYNCPLUS_ANTIAIM_ROTATION_STANDING_DEADZONE_MAX:GetValue()
tblValues.LBY.Type = DESYNCPLUS_ANTIAIM_LBY_STANDING_TYPE:GetValue()
tblValues.LBY.MinValue = DESYNCPLUS_ANTIAIM_LBY_STANDING_MINVALUE:GetValue()
tblValues.LBY.MaxValue = DESYNCPLUS_ANTIAIM_LBY_STANDING_MAXVALUE:GetValue()
tblValues.LBY.Speed = DESYNCPLUS_ANTIAIM_LBY_STANDING_SPEED:GetValue()
tblValues.LBY.Value = DESYNCPLUS_ANTIAIM_LBY_STANDING_VALUE:GetValue()
tblValues.Pitch.Type = ANTIAIM_PITCH_STANDING_TYPE:GetValue()
tblValues.Pitch.MinValue = ANTIAIM_PITCH_STANDING_MINVALUE:GetValue()
tblValues.Pitch.MaxValue = ANTIAIM_PITCH_STANDING_MAXVALUE:GetValue()
tblValues.Pitch.Speed = ANTIAIM_PITCH_STANDING_SPEED:GetValue()
end
end
local iInvertBaseDir = 1
if bInvertBaseDir then iInvertBaseDir = iInvert end
local iInvertRotation = 1
if bInvertRotation then iInvertRotation = iInvert end
local iInvertLBY = 1
if bInvertLBY then iInvertLBY = iInvert end
-- Base Direction
if tblValues.BaseDir.Type == 1 then -- Static
gui.SetValue("rbot.antiaim.base", tblValues.BaseDir.BaseValue * iInvertBaseDir)
elseif tblValues.BaseDir.Type == 3 then -- Cycle
local iSteps = math.floor(tblValues.BaseDir.Speed / 4)
if iLastBaseValue ~= tblValues.BaseDir.BaseValue then
iBaseDirAngle = tblValues.BaseDir.BaseValue
iBaseDirDirection = 1
end
for i = 0, iSteps do
iBaseDirAngle = calcCycle(iBaseDirAngle, iBaseDirDirection)
if iBaseDirAngle == tblValues.BaseDir.MaxValue or iBaseDirAngle == tblValues.BaseDir.MinValue then
iBaseDirDirection = iBaseDirDirection * -1
end
end
gui.SetValue("rbot.antiaim.base", iBaseDirAngle * iInvertBaseDir)
iLastBaseValue = tblValues.BaseDir.BaseValue
elseif globals.TickCount() >= iBaseDirTick + (100 - tblValues.BaseDir.Speed) * iTickRateMultiplier then
if tblValues.BaseDir.Type == 2 then -- Switch
if iBaseDirSwitch == tblValues.BaseDir.MinValue then
gui.SetValue( "rbot.antiaim.base", tblValues.BaseDir.MaxValue * iInvertBaseDir )
iBaseDirSwitch = tblValues.BaseDir.MaxValue
else
gui.SetValue( "rbot.antiaim.base", tblValues.BaseDir.MinValue * iInvertBaseDir )
iBaseDirSwitch = tblValues.BaseDir.MinValue
end
elseif tblValues.BaseDir.Type == 4 then -- Jitter
local iRandom = math.random(tblValues.BaseDir.MinValue, tblValues.BaseDir.MaxValue)
if tblValues.BaseDir.BaseValue + iRandom > 180 or tblValues.BaseDir.BaseValue + iRandom < -180 then tblValues.BaseDir.BaseValue = tblValues.BaseDir.BaseValue * -1 end
gui.SetValue("rbot.antiaim.base", (tblValues.BaseDir.BaseValue + iRandom) * iInvertBaseDir)
end
iBaseDirTick = globals.TickCount()
end
-- Rotation
if tblValues.Rotation.Type == 1 then -- Static
gui.SetValue("rbot.antiaim.base.rotation", tblValues.Rotation.MinValue * iInvertRotation)
elseif tblValues.Rotation.Type == 3 then -- Cycle
local speed = tblValues.Rotation.Speed / 4
if iRotationAngle >= tblValues.Rotation.MaxValue then iRotationDirection = 1
elseif iRotationAngle <= tblValues.Rotation.MinValue + speed then iRotationDirection = 0 end
if iRotationDirection == 0 and iRotationAngle <= tblValues.Rotation.MinDeadZone and iRotationAngle + speed >= tblValues.Rotation.MinDeadZone then
iRotationAngle = tblValues.Rotation.MaxDeadZone
end
if iRotationDirection == 1 and iRotationAngle >= tblValues.Rotation.MaxDeadZone and iRotationAngle - speed <= tblValues.Rotation.MaxDeadZone then
iRotationAngle = tblValues.Rotation.MinDeadZone
end
if iRotationDirection == 0 then iRotationAngle = iRotationAngle + speed
elseif iRotationDirection == 1 then iRotationAngle = iRotationAngle - speed end
gui.SetValue("rbot.antiaim.base.rotation", iRotationAngle * iInvertRotation)
elseif globals.TickCount() >= iRotationTick + (100 - tblValues.Rotation.Speed) * iTickRateMultiplier then
if tblValues.Rotation.Type == 2 then -- Switch
if iRotationSwitch == tblValues.Rotation.MinValue then
gui.SetValue( "rbot.antiaim.base.rotation", tblValues.Rotation.MaxValue * iInvertRotation )
iRotationSwitch = tblValues.Rotation.MaxValue
else
gui.SetValue( "rbot.antiaim.base.rotation", tblValues.Rotation.MinValue * iInvertRotation )
iRotationSwitch = tblValues.Rotation.MinValue
end
elseif tblValues.Rotation.Type == 4 then -- Jitter
local rndChoice = math.random(0, 1)
local rndValue = 0
local rndValueMin = math.random(tblValues.Rotation.MinValue, tblValues.Rotation.MinDeadZone)
local rndValueMax = math.random(tblValues.Rotation.MaxDeadZone, tblValues.Rotation.MaxValue)
if rndChoice == 0 then
rndValue = rndValueMin
else
rndValue = rndValueMax
end
gui.SetValue("rbot.antiaim.base.rotation", rndValue * iInvertRotation)
end
iRotationTick = globals.TickCount()
end
-- LBY
if tblValues.LBY.Type == 1 then -- Static
gui.SetValue("rbot.antiaim.base.lby", tblValues.LBY.MinValue * iInvertLBY)
elseif tblValues.LBY.Type == 2 then -- Match
if gui.GetValue("rbot.antiaim.base.rotation") >= 0 then
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.Value * iInvertLBY )
else
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.Value * -1 * iInvertLBY )
end
elseif tblValues.LBY.Type == 3 then -- Opposite
if gui.GetValue("rbot.antiaim.base.rotation") <= 0 then
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.Value * iInvertLBY )
else
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.Value * -1 * iInvertLBY )
end
elseif tblValues.LBY.Type == 5 then -- Cycle
if iLBYAngle >= tblValues.LBY.MaxValue then iLBYDirection = 1
elseif iLBYAngle <= tblValues.LBY.MinValue + tblValues.LBY.Speed / 4 then iLBYDirection = 0 end
if iLBYDirection == 0 then iLBYAngle = iLBYAngle + tblValues.LBY.Speed / 4
elseif iLBYDirection == 1 then iLBYAngle = iLBYAngle - tblValues.LBY.Speed / 4 end
gui.SetValue("rbot.antiaim.base.lby", iLBYAngle * iInvertLBY)
elseif globals.TickCount() >= iLBYTick + (100 - tblValues.LBY.Speed) * iTickRateMultiplier then
if tblValues.LBY.Type == 4 then -- Switch
if iLBYSwitch == tblValues.LBY.MinValue then
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.MaxValue * iInvertLBY )
iLBYSwitch = tblValues.LBY.MaxValue
else
gui.SetValue( "rbot.antiaim.base.lby", tblValues.LBY.MinValue * iInvertLBY )
iLBYSwitch = tblValues.LBY.MinValue
end
elseif tblValues.LBY.Type == 6 then -- Jitter
gui.SetValue("rbot.antiaim.base.lby", math.random(tblValues.LBY.MinValue, tblValues.LBY.MaxValue) * iInvertLBY)
end
iLBYTick = globals.TickCount()
end
-- Pitch
if hLocalPlayer:GetWeaponID() == 64 then
local flReadyTime = globals.CurTime() - hLocalPlayer:GetPropEntity("m_hActiveWeapon"):GetPropFloat("m_flPostponeFireReadyTime")
if flReadyTime < 0 and bShotRevolver then bShotRevolver = false end
if flReadyTime >= 0 and bit.band(cmd.buttons, 1) ~= 0 and not bShotRevolver then
bShotRevolver = true
return
end
end
if bit.band(cmd.buttons, 1) ~= 0 or bit.band(cmd.buttons, 2048) ~= 0 or bit.band(cmd.buttons, 32) ~= 0 then return end
if hLocalPlayer:GetWeaponType() == 9 then
if hLocalPlayer:GetPropEntity("m_hActiveWeapon"):GetProp("m_fThrowTime") ~= 0 then return end
end
if tblValues.Pitch.Type == 1 then -- Static
cmd.viewangles = EulerAngles(tblValues.Pitch.MinValue, cmd.viewangles["yaw"], 0)
elseif tblValues.Pitch.Type == 3 then -- Cycle
if iPitchAngle >= tblValues.Pitch.MaxValue then iPitchDirection = 1
elseif iPitchAngle <= tblValues.Pitch.MinValue + tblValues.Pitch.Speed / 4 then iPitchDirection = 0 end
if iPitchDirection == 0 then iPitchAngle = iPitchAngle + tblValues.Pitch.Speed / 4
elseif iPitchDirection == 1 then iPitchAngle = iPitchAngle - tblValues.Pitch.Speed / 4 end
cmd.viewangles = EulerAngles(iPitchAngle, cmd.viewangles["yaw"], 0)
elseif globals.TickCount() >= iPitchTick + (100 - tblValues.Pitch.Speed) * iTickRateMultiplier then
if tblValues.Pitch.Type == 2 then -- Switch
if iPitchSwitch == tblValues.Pitch.MinValue then
cmd.viewangles = EulerAngles(tblValues.Pitch.MaxValue, cmd.viewangles["yaw"], 0)
iLastPitch = tblValues.Pitch.MaxValue
iPitchSwitch = tblValues.Pitch.MaxValue
else
cmd.viewangles = EulerAngles(tblValues.Pitch.MinValue, cmd.viewangles["yaw"], 0)
iLastPitch = tblValues.Pitch.MinValue
iPitchSwitch = tblValues.Pitch.MinValue
end
elseif tblValues.Pitch.Type == 4 then -- Jitter
local iRandom = math.random(tblValues.Pitch.MinValue, tblValues.Pitch.MaxValue)
cmd.viewangles = EulerAngles(iRandom, cmd.viewangles["yaw"], 0)
iLastPitch = iRandom
end
iPitchTick = globals.TickCount()
elseif tblValues.Pitch.Type ~= 0 then
cmd.viewangles = EulerAngles(iLastPitch, cmd.viewangles["yaw"], 0)
end
end
local iRunningStep = 0
local iSelectedStep = 1
local iLastTick = 0
local flLastTime = 0
local bSetValues = false
local tblSteps = {}
local builderTable = {
DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_STANDING_SPEED,
DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_MOVING_SPEED,
DESYNCPLUS_ANTIAIM_BASEDIR_AIR_BASEVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_BASEDIR_AIR_SPEED,
DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_STANDING_SPEED,
DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_MOVING_SPEED,
DESYNCPLUS_ANTIAIM_ROTATION_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_ROTATION_AIR_SPEED,
DESYNCPLUS_ANTIAIM_LBY_STANDING_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_STANDING_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_STANDING_SPEED, DESYNCPLUS_ANTIAIM_LBY_STANDING_VALUE,
DESYNCPLUS_ANTIAIM_LBY_MOVING_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_MOVING_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_MOVING_SPEED, DESYNCPLUS_ANTIAIM_LBY_MOVING_VALUE,
DESYNCPLUS_ANTIAIM_LBY_AIR_MINVALUE, DESYNCPLUS_ANTIAIM_LBY_AIR_MAXVALUE, DESYNCPLUS_ANTIAIM_LBY_AIR_SPEED, DESYNCPLUS_ANTIAIM_LBY_AIR_VALUE,
ANTIAIM_PITCH_STANDING_MINVALUE, ANTIAIM_PITCH_STANDING_MAXVALUE, ANTIAIM_PITCH_STANDING_SPEED,
ANTIAIM_PITCH_MOVING_MINVALUE, ANTIAIM_PITCH_MOVING_MAXVALUE, ANTIAIM_PITCH_MOVING_SPEED,
ANTIAIM_PITCH_AIR_MINVALUE, ANTIAIM_PITCH_AIR_MAXVALUE, ANTIAIM_PITCH_AIR_SPEED
}
local BUILDER_INFO_GBOX = gui.Groupbox( WINDOW, "Info", 10, 85, 200, 0 )
local BUILDER_INFO_TOTAL = gui.Text( BUILDER_INFO_GBOX, "Total Steps: 0" )
local BUILDER_INFO_RUNNING = gui.Text( BUILDER_INFO_GBOX, "Running Step: None" )
local BUILDER_ENABLE = gui.Checkbox( WINDOW, "builder.enable", "Enable", false )
guiModify(BUILDER_ENABLE, 70, 215)
local BUILDER_CONTROLS_GBOX = gui.Groupbox( WINDOW, "Controls", 220, 85, 620, 0 )
local BUILDER_CONTROLS_DURATION_VALUE = gui.Editbox( BUILDER_CONTROLS_GBOX, "builder.controls.duration.value", "Duration" )
guiModify(BUILDER_CONTROLS_DURATION_VALUE, nil, nil, 150)
local BUILDER_CONTROLS_DURATION_TYPE = gui.Combobox( BUILDER_CONTROLS_GBOX, "builder.controls.duration.type", "Duration Type", "Ticks", "Seconds" )
guiModify(BUILDER_CONTROLS_DURATION_TYPE, nil, nil, 150)
local BUILDER_CONTROLS_COPY_BTN = gui.Button( BUILDER_CONTROLS_GBOX, "Copy Previous", function()
if BUILDER_ENABLE:GetValue() then return end
if iSelectedStep - 1 < 1 then return end
if #tblSteps == 0 then return end
for i = 1, #builderTable do
builderTable[i]:SetValue(tblSteps[iSelectedStep - 1].table[i])
end
end )
guiModify(BUILDER_CONTROLS_COPY_BTN, 200, 10, 110)
local BUILDER_CONTROLS_PAGES = gui.Text( BUILDER_CONTROLS_GBOX, "Step 1/1" )
guiModify(BUILDER_CONTROLS_PAGES, 290, 80, nil)
local BUILDER_CONTROLS_SAVE_BTN = gui.Button( BUILDER_CONTROLS_GBOX, "Save Step", function()
if BUILDER_ENABLE:GetValue() then return end
if tonumber(BUILDER_CONTROLS_DURATION_VALUE:GetValue()) == nil then return end
local tmpTable = {}
for i = 1, #builderTable do
table.insert(tmpTable, builderTable[i]:GetValue())
end
tblSteps[iSelectedStep] = {duration = BUILDER_CONTROLS_DURATION_VALUE:GetValue(), type = BUILDER_CONTROLS_DURATION_TYPE:GetValue(), table = tmpTable}
BUILDER_CONTROLS_PAGES:SetText("Step " .. tostring(iSelectedStep) .. "/" .. tostring(#tblSteps))
BUILDER_INFO_TOTAL:SetText("Total Steps: " .. tostring(#tblSteps))
end )
guiModify(BUILDER_CONTROLS_SAVE_BTN, 325, 10, 110)
local BUILDER_CONTROLS_REMOVE_BTN = gui.Button( BUILDER_CONTROLS_GBOX, "Remove Step", function()
if BUILDER_ENABLE:GetValue() then return end
if #tblSteps == 1 then return end
table.remove(tblSteps, iSelectedStep)
if iSelectedStep > 1 then iSelectedStep = iSelectedStep - 1 end
BUILDER_CONTROLS_PAGES:SetText("Step " .. tostring(iSelectedStep) .. "/" .. tostring(#tblSteps))
BUILDER_INFO_TOTAL:SetText("Total Steps: " .. tostring(#tblSteps))
BUILDER_CONTROLS_DURATION_VALUE:SetValue(tblSteps[iSelectedStep].duration)
BUILDER_CONTROLS_DURATION_TYPE:SetValue(tblSteps[iSelectedStep].type)
end )
guiModify(BUILDER_CONTROLS_REMOVE_BTN, 470, 10, 110)
local BUILDER_CONTROLS_PREV_BTN = gui.Button( BUILDER_CONTROLS_GBOX, "◄", function()
if BUILDER_ENABLE:GetValue() then return end
if iSelectedStep > 1 then
iSelectedStep = iSelectedStep - 1
BUILDER_CONTROLS_PAGES:SetText("Step " .. tostring(iSelectedStep) .. "/" .. tostring(#tblSteps))
for i = 1, #builderTable do
builderTable[i]:SetValue(tblSteps[iSelectedStep].table[i])
end
BUILDER_CONTROLS_DURATION_VALUE:SetValue(tblSteps[iSelectedStep].duration)
BUILDER_CONTROLS_DURATION_TYPE:SetValue(tblSteps[iSelectedStep].type)
end
end )
guiModify(BUILDER_CONTROLS_PREV_BTN, 470, 65, 50)
local BUILDER_CONTROLS_NEXT_BTN = gui.Button( BUILDER_CONTROLS_GBOX, "►", function()
if BUILDER_ENABLE:GetValue() then return end
if iSelectedStep == #tblSteps + 1 then return end
iSelectedStep = iSelectedStep + 1
BUILDER_CONTROLS_PAGES:SetText("Step " .. tostring(iSelectedStep) .. "/" .. tostring(#tblSteps))