forked from bl1tzzz/lua-is
-
Notifications
You must be signed in to change notification settings - Fork 0
/
laffsync_src.lua
2609 lines (2283 loc) · 98.8 KB
/
laffsync_src.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
-- local variables for API functions. any changes to the line below will be lost on re-generation
local bit_band, client_camera_angles, client_color_log, client_create_interface, client_delay_call, client_exec, client_eye_position, client_key_state, client_log, client_random_int, client_scale_damage, client_screen_size, client_set_event_callback, client_trace_bullet, client_userid_to_entindex, database_read, database_write, entity_get_player_weapon, entity_get_players, entity_get_prop, entity_hitbox_position, entity_is_alive, entity_is_enemy, math_abs, math_atan2, require, error, globals_absoluteframetime, globals_curtime, globals_realtime, math_atan, math_cos, math_deg, math_floor, math_max, math_min, math_rad, math_sin, math_sqrt, print, renderer_circle_outline, renderer_gradient, renderer_measure_text, renderer_rectangle, renderer_text, renderer_triangle, string_find, string_gmatch, string_gsub, string_lower, table_insert, table_remove, ui_get, ui_new_checkbox, ui_new_color_picker, ui_new_hotkey, ui_new_multiselect, ui_reference, tostring, ui_is_menu_open, ui_mouse_position, ui_new_combobox, ui_new_slider, ui_set, ui_set_callback, ui_set_visible, tonumber, pcall = bit.band, client.camera_angles, client.color_log, client.create_interface, client.delay_call, client.exec, client.eye_position, client.key_state, client.log, client.random_int, client.scale_damage, client.screen_size, client.set_event_callback, client.trace_bullet, client.userid_to_entindex, database.read, database.write, entity.get_player_weapon, entity.get_players, entity.get_prop, entity.hitbox_position, entity.is_alive, entity.is_enemy, math.abs, math.atan2, require, error, globals.absoluteframetime, globals.curtime, globals.realtime, math.atan, math.cos, math.deg, math.floor, math.max, math.min, math.rad, math.sin, math.sqrt, print, renderer.circle_outline, renderer.gradient, renderer.measure_text, renderer.rectangle, renderer.text, renderer.triangle, string.find, string.gmatch, string.gsub, string.lower, table.insert, table.remove, ui.get, ui.new_checkbox, ui.new_color_picker, ui.new_hotkey, ui.new_multiselect, ui.reference, tostring, ui.is_menu_open, ui.mouse_position, ui.new_combobox, ui.new_slider, ui.set, ui.set_callback, ui.set_visible, tonumber, pcall
local ui_menu_position, ui_menu_size, math_pi, renderer_indicator, entity_is_dormant, client_set_clan_tag, client_trace_line, entity_get_all, entity_get_classname = ui.menu_position, ui.menu_size, math.pi, renderer.indicator, entity.is_dormant, client.set_clan_tag, client.trace_line, entity.get_all, entity.get_classname
local local_player = entity.get_local_player()
local plist_set = plist.get
local vector = require('vector')
local images = require 'gamesense/surface'
local ffi = require('ffi')
local ffi_cast = ffi.cast
local js = panorama.open()
local persona_api = js.MyPersonaAPI
local name = persona_api.GetName()
client.color_log(255, 255, 255, "|--------------------------------------------------------|")
client.color_log(21, 235, 220, " Welcome " .. name .. "! ")
client.color_log(215, 115, 222, " discord.gg/luaterrorist ")
client.color_log(235, 221, 21, " 7/1/2021 ")
client.color_log(255, 255, 255, "|--------------------------------------------------------|")
local function includes(table, key)
local state = false
for i=1, #table do
if table[i] == key then
state = true
break
end
end
return state
end
local extra_log = function(fn, ...)
local data = { ... }
for i=1, #data do
if i==1 then
local clr = {
{ 255, 255, 0 },
{ 255, 0, 0 },
}
client.color_log(clr[fn][1], clr[fn][2], clr[fn][3], ' - \0')
end
client.color_log(data[i][1], data[i][2], data[i][3], string.format('%s\0', data[i][4]))
if i == #data then
client.color_log(255, 255, 255, ' ')
end
end
end
local create_callback = function(name, func)
local get_func_index = function(fn)
return ffi.cast("int*", ffi.cast(ffi.typeof("void*(__thiscall*)(void*)"), fn))[0]
end
local DEC_HEX = function(IN)
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.fmod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
extra_log(2, { 255, 255, 255, 'Creating ' }, { 0, 255, 255, name .. ' ' }, { 255, 255, 255, 'callback ' }, { 0, 255, 255, string.format('(0x%s)', DEC_HEX(get_func_index(func))) })
client.delay_call(0.1, function()
client.set_event_callback(name, func)
end)
end
local ref = {
enabled = ui_reference("AA", "Anti-aimbot angles", "Enabled"),
pitch = ui_reference("AA", "Anti-aimbot angles", "pitch"),
yawbase = ui_reference("AA", "Anti-aimbot angles", "Yaw base"),
yaw = { ui_reference("AA", "Anti-aimbot angles", "Yaw") },
fakeyawlimit = ui_reference("AA", "anti-aimbot angles", "Fake yaw limit"),
fsbodyyaw = ui_reference("AA", "anti-aimbot angles", "Freestanding body yaw"),
edgeyaw = ui_reference("AA", "Anti-aimbot angles", "Edge yaw"),
maxprocticks = ui_reference("MISC", "Settings", "sv_maxusrcmdprocessticks"),
fakeduck = ui_reference("RAGE", "Other", "Duck peek assist"),
safepoint = ui_reference("RAGE", "Aimbot", "Force safe point"),
forcebaim = ui_reference("RAGE", "Other", "Force body aim"),
player_list = ui_reference("PLAYERS", "Players", "Player list"),
reset_all = ui_reference("PLAYERS", "Players", "Reset all"),
apply_all = ui_reference("PLAYERS", "Adjustments", "Apply to all"),
load_cfg = ui_reference("Config", "Presets", "Load"),
fl_limit = ui_reference("AA", "Fake lag", "Limit"),
dt_limit = ui_reference("RAGE", "Other", "Double tap fake lag limit"),
quickpeek = { ui_reference("RAGE", "Other", "Quick peek assist") },
yawjitter = { ui_reference("AA", "Anti-aimbot angles", "Yaw jitter") },
bodyyaw = { ui_reference("AA", "Anti-aimbot angles", "Body yaw") },
freestand = { ui_reference("AA", "Anti-aimbot angles", "Freestanding") },
os = { ui_reference("AA", "Other", "On shot anti-aim") },
slow = { ui_reference("AA", "Other", "Slow motion") },
dt = { ui_reference("RAGE", "Other", "Double tap") },
ps = { ui_reference("RAGE", "Other", "Double tap") },
fakelag = { ui_reference("AA", "Fake lag", "Enabled") }
}
local references = {
aa_enable = ui.reference("AA", "Anti-aimbot angles", "Enabled"),
yawbase = ui.reference("AA", "Anti-aimbot angles", "Yaw base"),
fyawlimit = ui.reference("AA", "Anti-aimbot angles", "Fake yaw limit"),
pitch = ui.reference("AA", "Anti-aimbot angles", "Pitch"),
freestanding_byaw = ui.reference("AA", "Anti-aimbot angles", "Freestanding body yaw"),
safe_point = ui.reference("RAGE", "Aimbot", "Force safe point"),
double_tap_mode = ui.reference("RAGE", "Other", "Double tap mode"),
double_tap_fake_lag_limit = ui.reference("RAGE", "Other", "Double tap fake lag limit"),
double_tap_hc = ui.reference("RAGE", "Other", "Double tap hit chance"),
fake_lag_type = ui.reference("AA", "Fake lag", "Amount"),
fake_lag = ui.reference("AA", "Fake lag", "Limit"),
fake_variance = ui.reference("AA", "Fake lag", "Variance"),
legmovement = ui.reference("AA", "OTHER", "leg movement"),
tickstoprocess = ui.reference("MISC", "Settings", "sv_maxusrcmdprocessticks"),
holdaim = ui.reference("MISC", "Settings", "sv_maxusrcmdprocessticks_holdaim"),
tomi = ui.reference("Rage", "Other", "Force body aim"),
fakeduck = ui.reference("Rage", "Other", "Duck peek assist"),
onShot = {ui.reference("AA", "Other", "On shot anti-aim")},
}
local yaw2, yaw = ui.reference("AA", "Anti-aimbot angles", "Yaw")
local bodyyaw, bodyyaw2 = ui.reference("AA", "Anti-aimbot angles", "Body yaw")
local jyaw, jyawslide = ui.reference("AA", "Anti-aimbot angles", "Yaw jitter")
local variables = {
legit_changed = false,
player_states = {"Global", "Standing", "Moving", "Slow motion", "Air", "On-key", "Crouched", "Moving2", "Dormant", "Freestanding"},
state_to_idx = {["Global"] = 1, ["Standing"] = 2, ["Moving"] = 3, ["Slow motion"] = 4, ["Air"] = 5, ["On-key"] = 6, ["Crouched"] = 7, ["Moving2"] = 8, ["Dormant"] = 9, ["Freestanding"] = 10},
l_s = {0, 0, 0},
rec = {},
aa_dir = 0,
auto_rage = false,
active_i = 1,
last_press_t = 0,
forward = false,
p_state = 0,
last_sway_time = 0,
choked_cmds = 0,
miss = {},
hit = {},
shots = {},
last_hit = {},
stored_misses = {},
stored_shots = {},
last_nn = 0,
best_value = 180,
flip_value = 90,
bestenemy = 0,
flip_once = false,
classnames = {
"CWorld",
"CCSPlayer",
"CFuncBrush"
},
nonweapons = {
"knife",
"hegrenade",
"inferno",
"flashbang",
"decoy",
"smokegrenade",
"taser"
},
}
local nonweapons_c =
{
"CKnife",
"CHEGrenade",
"CMolotovGrenade",
"CIncendiaryGrenade",
"CFlashbang",
"CDecoyGrenade",
"CSmokeGrenade",
"CWeaponTaser",
"CC4"
}
local mshit = {
enabled = ui.new_checkbox("AA", "Anti-aimbot angles", "Enable LAFFSYNC"),
legit_aa_key = ui_new_hotkey("AA", "Anti-aimbot angles", "Legit AA on key"),
manual_left = ui_new_hotkey("AA", "Anti-aimbot angles", "Manual left"),
manual_right = ui_new_hotkey("AA", "Anti-aimbot angles", "Manual right"),
manual_back = ui_new_hotkey("AA", "Anti-aimbot angles", "Manual back"),
manual_forward = ui_new_hotkey("AA", "Anti-aimbot angles", "Manual forward"),
freestand = { ui_new_checkbox("AA", "Anti-aimbot angles", "Freestanding\nTS"),
ui_new_hotkey("AA", "Anti-aimbot angles", "Freestanding key", true),
},
edge = { ui_new_checkbox("AA", "Anti-aimbot angles", "Edge yaw\nTS"),
ui_new_hotkey("AA", "Anti-aimbot angles", "Edge yaw key", true),
},
indicator_enable = ui.new_combobox("AA", "Anti-aimbot angles", "Indicators", { "Off", "On" }),
extra_indicators = ui.new_checkbox("AA", "Anti-aimbot angles", "Extra Skeet Indicators"),
visual_arrows = ui.new_checkbox("AA", "Anti-aimbot angles", "Arrow Indication"),
desync = ui.new_checkbox("AA", "Anti-aimbot angles", "Desync Indicator"),
desync_where = ui.new_combobox("AA", "Anti-aimbot angles", "Desync Indicator Location", "At Crosshair", "At Indicators"),
x_slider = ui.new_slider("VISUALS", "Other ESP", "Desync Indicator X offset", 0, 960, 87),
y_slider = ui.new_slider("VISUALS", "Other ESP", "Desync Indicator Y offset", 0, 540, 20),
visual_text = ui.new_checkbox("AA", "Anti-aimbot angles", "Text Indication"),
indicators = ui.new_multiselect("AA", "Anti-aimbot angles", "Indicator list", "AA States", "Doubletap", "Fakeduck", "Safepoint", "Hideshots", "Force body aim", "Fakelag"),
label = ui.new_label("AA", "Anti-aimbot angles", "Manual AA Arrows Color"),
color = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color", 194, 87, 116, 255),
label2 = ui.new_label("AA", "Anti-aimbot angles", "LAFFSYNC Indicator Color"),
color2 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color2", 147, 52, 235, 255),
label3 = ui.new_label("AA", "Anti-aimbot angles", "AA Type Color"),
color3 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color3", 98, 52, 235, 255),
label9 = ui.new_label("AA", "Anti-aimbot angles", "Doubletap (Not Charged Color)"),
color9 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color9", 254, 148, 148, 255),
label10 = ui.new_label("AA", "Anti-aimbot angles", "Doubletap (Charged Color)"),
color10 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color10", 148, 252, 153, 255),
label11 = ui.new_label("AA", "Anti-aimbot angles", "Fakeduck Color"),
color11 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color11", 255, 255, 255, 255),
label12 = ui.new_label("AA", "Anti-aimbot angles", "Safepoint Color"),
color12 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color12", 255, 255, 255, 255),
label13 = ui.new_label("AA", "Anti-aimbot angles", "Hideshots Color"),
color13 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color13", 255, 255, 255, 255),
label14 = ui.new_label("AA", "Anti-aimbot angles", "Force body aim Color"),
color14 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color13", 255, 255, 255, 255),
label8 = ui.new_label("AA", "Anti-aimbot angles", "FakeLag Color"),
color8 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator color8", 255, 255, 255, 255),
}
local yaw2, yaw = ui.reference("AA", "Anti-aimbot angles", "Yaw")
local bodyyaw, bodyyaw2 = ui.reference("AA", "Anti-aimbot angles", "Body yaw")
local quick_peek_box, quick_peek_key = ui.reference( "Rage", "Other", "Quick peek assist" )
local deez_nutz = { }
deez_nutz[0] = {
deez_nutz_mode = ui_new_combobox("AA", "Anti-aimbot angles", "Anti-aim mode", {"Rage", "Legit", "Automatic rage"}),
player_state = ui_new_combobox("AA", "Anti-aimbot angles", "Player state", variables.player_states),
}
ui_set_visible(ref.maxprocticks, true)
for i=1, 10 do
deez_nutz[i] = {
enable_shit = i == 6 and ui.get(mshit.legit_aa_key) or ui_new_checkbox("AA", "Anti-aimbot angles", "Enable:" .. string_lower(variables.player_states[i]) .. " anti-aim"),
pitch_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Pitch\n\n Shit" .. variables.player_states[i], { "Off", "Default", "Up", "Down", "Minimal", "Random" }),
yawbase_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Yaw base\n Shit" .. variables.player_states[i], { "Local view", "At targets" }),
yaw_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Yaw\n Shit" .. variables.player_states[i], { "Off", "180", "Spin", "Static", "180 Z", "Crosshair" }),
yawadd_shit = ui_new_slider("AA", "Anti-aimbot angles", "\nYaw add Shit" .. variables.player_states[i], -180, 180, 0),
yawjitter_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Yaw jitter Shit\n" .. variables.player_states[i], { "Off", "Offset", "Center", "Random" }),
yawjitteradd_shit = ui_new_slider("AA", "Anti-aimbot angles", "\nYaw jitter add Shit" .. variables.player_states[i], -180, 180, 0),
aa_mode_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Body yaw type Shit\n" .. variables.player_states[i], {"LAFFSYNC", "GameSense"}),
gs_bodyyaw_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Body yaw\n GS Shit" .. variables.player_states[i], { "Off", "Opposite", "Jitter", "Static" }),
gs_bodyyawadd_shit = ui_new_slider("AA", "Anti-aimbot angles", "\nBody yaw add Shit" .. variables.player_states[i], -180, 180, 0),
bodyyaw_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Body yaw Shit\n" .. variables.player_states[i], { "Off", "Opposite", "Freestanding", "Reversed Freestanding", "Jitter", "Random", "Max", "Max Jitter", "Max Jitter Freestand", "Ideal", "Sigma", "Sigma2", "TibzzyAir", "Random Jitter"}),
bodyyaw_settings_shit = ui_new_multiselect("AA", "Anti-aimbot angles", "Body yaw settings Shit\n" .. variables.player_states[i], { "Jitter when vulnerable", "Anti-resolver", "Detect missed angle"}),
fakeyawlimit_shit = ui_new_slider("AA", "Anti-aimbot angles", "Fake yaw limit Shit\n" .. variables.player_states[i], 0, 60, 60),
fakeyawmode_shit = ui_new_combobox("AA", "Anti-aimbot angles", "Customize fake yaw limit Shit\n" .. variables.player_states[i], { "Off", "Jitter", "Random", "Smart", "Custom right" }),
fakeyawamt_shit = ui_new_slider("AA", "Anti-aimbot angles", "\nFake yaw randomization Shit" .. variables.player_states[i], 0, 60, 0),
}
end
ui_set(deez_nutz[1].enable_shit, true)
ui_set_visible(deez_nutz[1].enable_shit, false)
deez_nutz[11] = {
aa_settings = ui_new_multiselect("AA", "Fake lag", "Anti-aim settings Shit", {"Anti-aim on use", "Disable use to plant"}),
}
for i=1, 64 do
variables.miss[i], variables.hit[i], variables.shots[i], variables.last_hit[i], variables.stored_misses[i], variables.stored_shots[i] = {}, {}, {}, 0, 0, 0
for k=1, 3 do
variables.miss[i][k], variables.hit[i][k], variables.shots[i][k] = {}, {}, {}
for j=1, 1000 do
variables.miss[i][k][j], variables.hit[i][k][j], variables.shots[i][k][j] = 0, 0, 0
end
end
variables.miss[i][4], variables.hit[i][4], variables.shots[i][4] = 0, 0, 0
end
local function contains(table, value)
if table == nil then
return false
end
table = ui_get(table)
for i=0, #table do
if table[i] == value then
return true
end
end
return false
end
local function desync_on()
ui.set(references.aa_enable, true)
end
local function desync_off()
ui.set(references.aa_enable, false)
end
local jafeth = false
local function delaytimer()
jafeth = true
end
local function delaytimer2()
jafeth = false
end
local in_air_ass = false
local function in_air_stuff()
in_air_ass = true
end
local function in_air_stuff2()
in_air_ass = false
end
--[[local local_player_fake = ui.reference("Visuals", "Colored models", "Local player fake")
local function cool_onshot_thing()
ui.set(local_player_fake, false)
end
--]]
local function aimFire()
if not ui.get(mshit.enabled) then return end
if variables.p_state == 6 then return end
kneegrow = math.random(1, 5)
kneegrow2 = math.random(5, 12)
if not (ui_get(ref.dt[1]) and ui_get(ref.dt[2])) and (ui_get(ref.os[1]) and ui_get(ref.os[2])) or ui.get(ref.fakeduck) then else
--client.delay_call(0.05, desync_off)
--client.delay_call(0.1, desync_on)
--client.delay_call((kneegrow/100), desync_off)
--client.delay_call((kneegrow2/100), desync_on)
end
--[[ui.set(local_player_fake, true)
client.delay_call(0.1, cool_onshot_thing)--]]
--[[
if jafeth == true then
jafeth = false
else
jafeth = true
end
--]]
end
create_callback("aim_fire", aimFire)
local function set_og_menu(state)
ui_set_visible(ref.enabled, state)
ui_set_visible(ref.pitch, state)
ui_set_visible(ref.yawbase, state)
ui_set_visible(ref.yaw[1], state)
ui_set_visible(ref.yaw[2], state)
ui_set_visible(ref.yawjitter[1], state)
ui_set_visible(ref.yawjitter[2], state)
ui_set_visible(ref.bodyyaw[1], state)
ui_set_visible(ref.bodyyaw[2], state)
ui_set_visible(ref.fakeyawlimit, state)
ui_set_visible(ref.fsbodyyaw, state)
ui_set_visible(ref.edgeyaw, state)
ui_set_visible(ref.freestand[1], state)
ui_set_visible(ref.freestand[2], state)
end
local function menu_elements()
variables.active_i = variables.state_to_idx[ui_get(deez_nutz[0].player_state)]
set_og_menu(false)
--[[
ui_set_visible(deez_nutz[0].player_state, true)
ui_set_visible(deez_nutz[0].deez_nutz_mode, true)
ui_set_visible(deez_nutz[11].aa_settings, true)
for i=1, 10 do
state = ui.get(mshit.enabled)
ui_set_visible(deez_nutz[i].enable_shit, variables.active_i == i and i > 1 and state)
ui_set_visible(deez_nutz[i].pitch_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].yawbase_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].yaw_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].yawadd_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].yawjitter_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].yawjitteradd_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].aa_mode_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].gs_bodyyaw_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].gs_bodyyawadd_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].bodyyaw_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].bodyyaw_settings_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].fakeyawlimit_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].fakeyawmode_shit, variables.active_i == i and state)
ui_set_visible(deez_nutz[i].fakeyawamt_shit, variables.active_i == i and state)
end
--]]
ui_set_visible(deez_nutz[0].player_state, false)
ui_set_visible(deez_nutz[0].deez_nutz_mode, false)
ui_set_visible(deez_nutz[11].aa_settings, false)
for i=1, 10 do
state = ui.get(mshit.enabled)
ui_set_visible(deez_nutz[i].enable_shit, false)
ui_set_visible(deez_nutz[i].pitch_shit, false)
ui_set_visible(deez_nutz[i].yawbase_shit, false)
ui_set_visible(deez_nutz[i].yaw_shit, false)
ui_set_visible(deez_nutz[i].yawadd_shit, false)
ui_set_visible(deez_nutz[i].yawjitter_shit, false)
ui_set_visible(deez_nutz[i].yawjitteradd_shit, false)
ui_set_visible(deez_nutz[i].aa_mode_shit, false)
ui_set_visible(deez_nutz[i].gs_bodyyaw_shit, false)
ui_set_visible(deez_nutz[i].gs_bodyyawadd_shit, false)
ui_set_visible(deez_nutz[i].bodyyaw_shit, false)
ui_set_visible(deez_nutz[i].bodyyaw_settings_shit, false)
ui_set_visible(deez_nutz[i].fakeyawlimit_shit, false)
ui_set_visible(deez_nutz[i].fakeyawmode_shit, false)
ui_set_visible(deez_nutz[i].fakeyawamt_shit, false)
end
end
local function normalize_yaw(yaw)
while yaw > 180 do yaw = yaw - 360 end
while yaw < -180 do yaw = yaw + 360 end
return yaw
end
local function round(num, decimals)
local mult = 10^(decimals or 0)
return math_floor(num * mult + 0.5) / mult
end
local function calc_angle(local_x, local_y, enemy_x, enemy_y)
local ydelta = local_y - enemy_y
local xdelta = local_x - enemy_x
local relativeyaw = math_atan( ydelta / xdelta )
relativeyaw = normalize_yaw( relativeyaw * 180 / math_pi )
if xdelta >= 0 then
relativeyaw = normalize_yaw(relativeyaw + 180)
end
return relativeyaw
end
local function angle_vector(angle_x, angle_y)
local sy = math_sin(math_rad(angle_y))
local cy = math_cos(math_rad(angle_y))
local sp = math_sin(math_rad(angle_x))
local cp = math_cos(math_rad(angle_x))
return cp * cy, cp * sy, -sp
end
local function calc_shit(xdelta, ydelta)
if xdelta == 0 and ydelta == 0 then
return 0
end
return math_deg(math_atan2(ydelta, xdelta))
end
local function get_damage(plocal, enemy, x, y,z)
local ex = { }
local ey = { }
local ez = { }
ex[0], ey[0], ez[0] = entity_hitbox_position(enemy, 1)
ex[1], ey[1], ez[1] = ex[0] + 40, ey[0], ez[0]
ex[2], ey[2], ez[2] = ex[0], ey[0] + 40, ez[0]
ex[3], ey[3], ez[3] = ex[0] - 40, ey[0], ez[0]
ex[4], ey[4], ez[4] = ex[0], ey[0] - 40, ez[0]
ex[5], ey[5], ez[5] = ex[0], ey[0], ez[0] + 40
ex[6], ey[6], ez[6] = ex[0], ey[0], ez[0] - 40
local ent, dmg = 0
for i=0, 6 do
if dmg == 0 or dmg == nil then
ent, dmg = client_trace_bullet(enemy, ex[i], ey[i], ez[i], x, y, z)
end
end
return ent == nil and client_scale_damage(plocal, 1, dmg) or dmg
end
local function get_distance(x1, y1, z1, x2, y2, z2)
return math.sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)
end
local function get_nearest_enemy(plocal, enemies)
local lx, ly, lz = client_eye_position()
local view_x, view_y, roll = client_camera_angles()
local bestenemy = nil
local fov = 180
for i=1, #enemies do
local cur_x, cur_y, cur_z = entity_get_prop(enemies[i], "m_vecOrigin")
local cur_fov = math_abs(normalize_yaw(calc_shit(lx - cur_x, ly - cur_y) - view_y + 180))
if cur_fov < fov then
fov = cur_fov
bestenemy = enemies[i]
end
end
return bestenemy
end
local function get_entities(enemy_only, alive_only)
local enemy_only = enemy_only ~= nil and enemy_only or false
local alive_only = alive_only ~= nil and alive_only or true
local result = {}
local player_resource = entity.get_player_resource()
for player = 1, globals.maxplayers() do
if entity.get_prop(player_resource, 'm_bConnected', player) == 1 then
local is_enemy, is_alive = true, true
if enemy_only and not entity.is_enemy(player) then is_enemy = false end
if is_enemy then
if alive_only and entity.get_prop(player_resource, 'm_bAlive', player) ~= 1 then is_alive = false end
if is_alive then table.insert(result, player) end
end
end
end
return result
end
local function is_valid(nn)
if nn == 0 then
return false
end
if not entity_is_alive(nn) then
return false
end
if entity_is_dormant(nn) then
return false
end
return true
end
local function enemy_visible(idx)
for i=0, 8 do
local cx, cy, cz = entity_hitbox_position(idx, i)
if client.visible(cx, cy, cz) then
return true
end
end
return false
end
local function get_best_desync()
local plocal = entity.get_local_player()
local lx, ly, lz = client_eye_position()
local view_x, view_y, roll = client_camera_angles()
local players = entity_get_players(true)
local enemies_visible = false
for i=1, #players do
local idx = players[i]
if enemy_visible(idx) then
enemies_visible = true
end
end
local enemies = entity_get_players(true)
if #enemies == 0 then
if ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Opposite" then
variables.best_value = 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Jitter" then
variables.best_value = 0
else
if ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random" then
variables.best_value = math.random(20, 60)
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random Jitter" then
variables.best_value = math.random(20, 60)
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma" then
variables.best_value = -95
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma2" then
variables.best_value = 95
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "TibzzyAir" then
variables.best_value = 98
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max" then
variables.best_value = 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter" then
variables.best_value = 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter Freestand" then
variables.best_value = -180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Ideal" then
variables.best_value = -141
else
variables.best_value = 90
end
end
return variables.best_value
end
variables.bestenemy = is_valid(variables.last_nn) and variables.last_nn or get_nearest_enemy(plocal, enemies)
if variables.bestenemy ~= nil and variables.bestenemy ~= 0 and entity_is_alive(variables.bestenemy) then
local calc_hit = variables.last_hit[variables.bestenemy] ~= 0 and contains(deez_nutz[variables.p_state].bodyyaw_settings_shit, "Anti-resolver")
local calc_miss = variables.miss[variables.bestenemy][4] > 0 and contains(deez_nutz[variables.p_state].bodyyaw_settings_shit, "Anti-resolver")
if not calc_hit and not calc_miss then
local e_x, e_y, e_z = entity_hitbox_position(variables.bestenemy, 0)
local yaw = calc_angle(lx, ly, e_x, e_y)
local rdir_x, rdir_y, rdir_z = angle_vector(0, (yaw + 90))
local rend_x = lx + rdir_x * 10
local rend_y = ly + rdir_y * 10
local ldir_x, ldir_y, ldir_z = angle_vector(0, (yaw - 90))
local lend_x = lx + ldir_x * 10
local lend_y = ly + ldir_y * 10
local r2dir_x, r2dir_y, r2dir_z = angle_vector(0, (yaw + 90))
local r2end_x = lx + r2dir_x * 100
local r2end_y = ly + r2dir_y * 100
local l2dir_x, l2dir_y, l2dir_z = angle_vector(0, (yaw - 90))
local l2end_x = lx + l2dir_x * 100
local l2end_y = ly + l2dir_y * 100
local ldamage = get_damage(plocal, variables.bestenemy, rend_x, rend_y, lz)
local rdamage = get_damage(plocal, variables.bestenemy, lend_x, lend_y, lz)
local l2damage = get_damage(plocal, variables.bestenemy, r2end_x, r2end_y, lz)
local r2damage = get_damage(plocal, variables.bestenemy, l2end_x, l2end_y, lz)
if not variables.auto_rage and ldamage > 0 and rdamage > 0 and contains(deez_nutz[variables.p_state].bodyyaw_settings_shit, "Jitter when vulnerable") then
variables.best_value = 0
else
if ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Opposite" then
variables.best_value = 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Jitter" then
variables.best_value = 0
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -95
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 95
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma2" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -95
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 95
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "TibzzyAir" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -98
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 98
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = math.random(-60, 0)
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = math.random(0, 60)
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random Jitter" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = math.random(20, 60)
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = math.random(-60, -20)
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -180
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 180
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -180
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 180
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter Freestand" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = 180
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = -180
end
end
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Ideal" then
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = -141
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = 141
end
end
else
if enemies_visible then else
if l2damage > r2damage or ldamage > rdamage or l2damage > ldamage then
variables.best_value = ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Freestanding" and -90 or 90
elseif r2damage > l2damage or rdamage > ldamage or r2damage > rdamage then
variables.best_value = ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Freestanding" and 90 or -90
end
end
end
end
elseif calc_hit then
if ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Ideal" then
variables.best_value = variables.last_hit[variables.bestenemy] == -141 and 141 or -141
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max" then
variables.best_value = variables.last_hit[variables.bestenemy] == 180 and -180 or 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random" then
variables.best_value = variables.last_hit[variables.bestenemy] == math.random(0, 60) and math.random(-60, 0) or math.random(0, 60)
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random Jitter" then
variables.best_value = variables.last_hit[variables.bestenemy] == math.random(20, 60) and math.random(-60, -20) or math.random(20, 60)
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter" then
variables.best_value = variables.last_hit[variables.bestenemy] == -180 and 180 or -180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter Freestand" then
variables.best_value = variables.last_hit[variables.bestenemy] == 180 and -180 or 180
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma" then
variables.best_value = variables.last_hit[variables.bestenemy] == -95 and 95 or -95
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma2" then
variables.best_value = variables.last_hit[variables.bestenemy] == 95 and -95 or 95
elseif ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "TibzzyAir" then
variables.best_value = variables.last_hit[variables.bestenemy] == 98 and -98 or 98
else
variables.best_value = variables.last_hit[variables.bestenemy] == 90 and -90 or 90
end
elseif calc_miss then
if variables.stored_misses[variables.bestenemy] ~= variables.miss[variables.bestenemy][4] then
variables.best_value = variables.miss[variables.bestenemy][2][variables.miss[variables.bestenemy][4]]
variables.stored_misses[variables.bestenemy] = variables.miss[variables.bestenemy][4]
end
end
else
if not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Opposite" then
variables.best_value = 180
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Jitter" then
variables.best_value = 0
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Ideal" then
variables.best_value = -141
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma" then
variables.best_value = -95
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Sigma2" then
variables.best_value = 95
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "TibzzyAir" then
variables.best_value = 98
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max" then
variables.best_value = 180
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random" then
variables.best_value = math.random(0, 60)
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Random Jitter" then
variables.best_value = math.random(20, 60)
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter" then
variables.best_value = -180
elseif not variables.auto_rage and ui_get(deez_nutz[variables.p_state].bodyyaw_shit) == "Max Jitter Freestand" then
variables.best_value = 180
else
variables.best_value = 90
end
end
return variables.best_value
end
local function run_direction()
ui_set(ref.freestand[2], "Always on")
ui_set(mshit.manual_back, "On hotkey")
ui_set(mshit.manual_forward, "On hotkey")
ui_set(mshit.manual_left, "On hotkey")
ui_set(mshit.manual_right, "On hotkey")
local on_ground = bit.band(entity.get_prop(entity.get_local_player(), "m_fFlags"), 1) == 1 and not client.key_state(0x20)
local p_key = ui.get(mshit.legit_aa_key)
local fs_e = ui_get(mshit.freestand[2]) and ui_get(mshit.freestand[1]) and on_ground and not p_key
local edge_e = ui_get(mshit.edge[2]) and ui_get(mshit.edge[1]) and on_ground and not p_key
ui_set(ref.freestand[1], fs_e and "Default" or "-")
ui_set(ref.edgeyaw, edge_e)
if fs_e then
variables.last_press_t = globals_curtime()
variables.aa_dir = 0
end
if ui_get(mshit.manual_back) then
variables.aa_dir = 0
elseif ui_get(mshit.manual_right) and variables.last_press_t + 0.2 < globals_curtime() then
variables.aa_dir = variables.aa_dir == 90 and 0 or 90
variables.last_press_t = globals_curtime()
elseif ui_get(mshit.manual_left) and variables.last_press_t + 0.2 < globals_curtime() then
variables.aa_dir = variables.aa_dir == -90 and 0 or -90
variables.last_press_t = globals_curtime()
elseif ui_get(mshit.manual_forward) and variables.last_press_t + 0.2 < globals_curtime() then
variables.aa_dir = variables.aa_dir == 180 and 0 or 180
variables.last_press_t = globals_curtime()
elseif variables.last_press_t > globals_curtime() then
variables.last_press_t = globals_curtime()
end
end
local timeToShoot = 0
local shooting = false
local record_shit = 10
local function run_shit(c)
local has_knife
local vx, vy, vz = entity_get_prop(entity.get_local_player(), "m_vecVelocity")
local is_scoped = entity_get_prop(entity.get_local_player(), "m_bIsScoped")
local p_still = math_sqrt(vx ^ 2 + vy ^ 2) < 2
local p_still2 = math_sqrt(vx ^ 2 + vy ^ 2) < 90
local on_ground = bit_band(entity_get_prop(entity.get_local_player(), "m_fFlags"), 1) == 1 and c.in_jump == 0
local p_slow = ui_get(ref.slow[1]) and ui_get(ref.slow[2])
local p_key = ui.get(mshit.legit_aa_key)
local p_duck = entity.get_prop(entity.get_local_player(), "m_flDuckAmount")
local weapon = entity.get_player_weapon(entity.get_local_player())
local weapon_id = bit_band(entity_get_prop(weapon, "m_iItemDefinitionIndex"), 0xFFFF)
local camera_angles = vector(client_camera_angles())
local eye_position_x, eye_position_y, eye_position_z = client_eye_position()
local hitbox_pos_x, hitbox_pos_y, hitbox_pos_z = entity_hitbox_position(entity.get_local_player(), 0)
local substract = hitbox_pos_z - eye_position_z
local local_player_weapon = entity.get_player_weapon(entity.get_local_player())
local cur = globals.curtime()
shooting = false
if cur < entity.get_prop(local_player_weapon, "m_flNextPrimaryAttack") then
if weapon_id == 9 then
timeToShoot = entity.get_prop(local_player_weapon, "m_flNextPrimaryAttack") - cur - 1.2
elseif weapon_id == 40 then
timeToShoot = entity.get_prop(local_player_weapon, "m_flNextPrimaryAttack") - cur - 1
elseif weapon_id == 64 then
timeToShoot = entity.get_prop(local_player_weapon, "m_flNextPrimaryAttack") - cur - 0.2
else
timeToShoot = entity.get_prop(local_player_weapon, "m_flNextPrimaryAttack") - cur - 0.08 --shooting
end
shooting = true
elseif cur < entity.get_prop(entity.get_local_player(), "m_flNextAttack") then
timeToShoot = entity.get_prop(entity.get_local_player(), "m_flNextAttack") - cur - 0.022 --swapping
end
--client.log(record_shit)
--client.log(weapon_id)
--client.log(timeToShoot)
if math.floor((timeToShoot * 1000) + 0.5) <= 10 then
timeToShoot = 0
end
if timeToShoot > 1.9 then
timeToShoot = 0
end
--client.log(shooting)
--client.log(timeToShoot)
--client.log(substract)
local fs_e = ui_get(mshit.freestand[2]) and ui_get(mshit.freestand[1]) and on_ground and not p_key
local nigger = math.random(0, 2) -- 0, 10
variables.p_state = p_key and 6 or 9
local enemies = get_entities(true, true)
for i=1, #enemies do
local player = enemies[i]
local px, py, pz = entity.get_prop(player, "m_vecOrigin")
local lx, ly, lz = entity_get_prop(entity.get_local_player(), "m_vecOrigin")
local distance = get_distance(lx, ly, lz, px, py, pz)
if px == nil or py == nil or pz == nil or lx == nil or ly == nil or lz == nil or distance == nil then
ass = false
else
ass = true
end
local weapon = entity.get_player_weapon(player)
--if p_key or ((entity_get_classname(weapon) == "CKnife" and distance <= 270) and variables.aa_dir ~= 180 and ass) then
if entity_get_classname(weapon) == "CKnife" and distance <= 270 and variables.aa_dir ~= 180 and ass then
has_knife = true
else
has_knife = false
end
if p_key or has_knife then --if ((substract > -4) and on_ground and not (p_duck >= 0.7) and not p_key) or not entity.is_alive(player) and not p_key then
variables.p_state = 6
else
--if timeToShoot >= 0.022 or not entity.is_alive(player) then
--variables.p_state = 9
--else
if not on_ground and ui_get(deez_nutz[5].enable_shit) then
variables.p_state = 5
else
if fs_e then
variables.p_state = 10
else
if (p_duck >= 0.7 or ui.get(references.fakeduck)) and ui_get(deez_nutz[7].enable_shit) then
variables.p_state = 7
else
if p_slow and ui_get(deez_nutz[4].enable_shit) and not p_still then
variables.p_state = 4
else
if p_still and ui_get(deez_nutz[2].enable_shit) then
variables.p_state = 2
elseif not p_still and ui_get(deez_nutz[3].enable_shit) and ui_get(deez_nutz[8].enable_shit) then
if is_scoped == 1 then -- and not p_still2 then
variables.p_state = 8
else
variables.p_state = 3
end
end
end
end
end
end
--end
end
end
end
create_callback("pre_render", function()
if not entity.is_alive(entity.get_local_player()) or not ui.get(ref.enabled) then else
on_ground = bit_band(entity_get_prop(entity.get_local_player(), "m_fFlags"), 1) == 1
entity.set_prop(entity.get_local_player(), "m_flPoseParameter", 1, on_ground and 0 or 6) --legs
end
end)
local function distance3d(x1, y1, z1, x2, y2, z2)
return math_sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1))
end
local function entity_has_c4(ent)
local bomb = entity_get_all("CC4")[1]
return bomb ~= nil and entity_get_prop(bomb, "m_hOwnerEntity") == ent
end
local function aa_on_use(c)
if contains(deez_nutz[11].aa_settings, "Anti-aim on use") then
local distance = 100
local bomb = entity_get_all("CPlantedC4")[1]
local bomb_x, bomb_y, bomb_z = entity_get_prop(bomb, "m_vecOrigin")
if bomb_x ~= nil then
local player_x, player_y, player_z = entity_get_prop(entity.get_local_player(), "m_vecOrigin")
distance = distance3d(bomb_x, bomb_y, bomb_z, player_x, player_y, player_z)
end
local team_num = entity_get_prop(entity.get_local_player(), "m_iTeamNum")
local defusing = team_num == 3 and distance < 62
local on_bombsite = entity_get_prop(entity.get_local_player(), "m_bInBombZone")
local has_bomb = entity_has_c4(entity.get_local_player())
local trynna_plant = on_bombsite ~= 0 and team_num == 2 and has_bomb and not contains(deez_nutz[11].aa_settings, "Disable use to plant")
local px, py, pz = client_eye_position()