· 6 years ago · Dec 31, 2019, 09:06 PM
1local s, odium = pcall( collectgarbage, 'odium' ) /*=======================================================================
2
3
4
5 ▄████████ ▄████████ ▄████████ ▀█████████▄ ▄██████▄ ███
6
7 ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀█████████▄
8
9 ███ ███ ███ █▀ ███ █▀ ███ ███ ███ ███ ▀███▀▀██
10
11 ███ ███ ███ ▄███▄▄▄ ▄███▄▄▄██▀ ███ ███ ███ ▀
12
13▀███████████ ███ ▀▀███▀▀▀ ▀▀███▀▀▀██▄ ███ ███ ███
14
15 ███ ███ ███ █▄ ███ █▄ ███ ██▄ ███ ███ ███
16
17 ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
18
19 ███ █▀ ████████▀ ██████████ ▄█████████▀ ▀██████▀ ▄████▀
20
21
22
23A revolutionary lua multihack created by LegendofRobbo
24
25Designed for usage with Project Odium
26
27Lick my taint dumb nigger
28
29
30
31Copyrighted by MingeTec Inc - putting pubbies their place since 2013
32
33
34
35=======================================================================*/
36
37
38
39--local odium = jit.status( "_O" )
40
41
42
43local AB = AB or {}
44
45/*
46
47AB.Version = "1.10 - May 26 2017"
48
49AB.LatestChanges = {
50
51 "More reliable targeting on aimbot, shouldn't snap to random targets anymore",
52
53 "Added spectator detection window, moved spectator and witness detection to utility tab",
54
55 "Added file protection for the acebot settings file",
56
57 "Improved ent marker with class searching algorithm",
58
59 "Added invalid's cac UD bhop script",
60
61 "Added sticky targeting setting to aimbot",
62
63 "Namestealer no longer saves between sessions",
64
65 "Added big secret feature",
66
67}
68
69*/
70
71AB.Version = "1.11 - Jul 04 2017"
72
73AB.LatestChanges = {
74
75 "Rewrote xray core to be 100% screengrab safe",
76
77 "Changed notification system over to aegis.Notify",
78
79 "Minor performance tweaks",
80
81}
82
83
84
85MsgC( Color( 0, 150, 250 ), "==========>----- Acebot Initialized (Version "..AB.Version..") -----<==========\n" )
86
87MsgC( Color( 0, 150, 250 ), "Latest Changes:\n" )
88
89for k, v in SortedPairs(AB.LatestChanges, false) do
90
91 MsgC( Color( 150, 200, 250 ), v.."\n" )
92
93
94
95end
96
97
98
99AB.Changelog = {
100
101 " ===== 1.09 (May 11 2017) ===== ",
102
103 "Fixed silent aim to have proper movement correction",
104
105 "Added aimbot auto-trigger setting",
106
107 "Made aimbot kick into rage mode targeting at 180 FOV (experimental)",
108
109 "Added in-hud freecam",
110
111 " ===== 1.08 (Apr 28 2017) ===== ",
112
113 "Rewrote aimbot core systems to be faster, more efficient and more stable",
114
115 "Made silent aim correctly choke bsendpacket",
116
117 "Added adaptive body targeting",
118
119 "Deprecated aegis_printlogs",
120
121 "Made everything on ESP derender when offscreen to boost fps",
122
123 " ===== 1.07 (Apr 21 2017) ===== ",
124
125 "Stopped aimbot from locking on to spawn protected players in darkrp",
126
127 "Added darkrp arrest dodger",
128
129 "Added random rpname on death option",
130
131 "Added suicide when physgunned option",
132
133 "Added ace_base_set, ace_base_remove and ace_base_setsize",
134
135 " ===== 1.06 (Apr 5 2017) ===== ",
136
137 "Added promotional chatspam",
138
139 "Added m9k wallbang mode",
140
141 "Added proper aimbot bind key mode",
142
143 "Numerical variables now save properly between sessions",
144
145 " ===== 1.05 (Mar 24 2017) ===== ",
146
147 "Added more insult modes",
148
149 "Added silent aim",
150
151 "Added esp range slider",
152
153 "Cleaned up aimbot core",
154
155 "Added pattern matching to chat spammer",
156
157 "Added clientside flashlight",
158
159 " ===== 1.04 (Mar 12 2017) ===== ",
160
161 "Added spread compensation to aimbot for xtreme accuracy",
162
163 "Added ace_insult4",
164
165 " ===== 1.03 (Feb 8 2017) ===== ",
166
167 "Added more aegis debug commands",
168
169 "Expanded insult generator",
170
171 "Added wraith vision mode",
172
173 "Added ace_exploit_rapeconsole",
174
175 " ===== 1.02 (Feb 8 2017) ===== ",
176
177 "Fixed 180up",
178
179 "Fixed error that would occasionally happen and betray our presence to server admins",
180
181 " ===== 1.01 (Nov 15 2016) ===== ",
182
183 "Added /PM Spam mode",
184
185 "Fixed innocent roleplayer printing a bunch of crap",
186
187 "Added ace_insult3 and crash jackson macros",
188
189 "Fixed TTT lua errors",
190
191 " ===== 1.00 (Aug 30 2016) ===== ",
192
193 "Finalized menu theme",
194
195 "Added bhop basic auto strafe",
196
197 "Added vote spammer module",
198
199 "Changed namestealer to use the new odium lua API",
200
201 "Added options for disabling squares and player names on the ESP",
202
203 "Fixed rear vision mirror",
204
205 " ===== 0.98 (Jul 29 2016) ===== ",
206
207 "Added more insult fragments to ace_insult",
208
209 "Added propkill visual settings",
210
211 " ===== 0.97 (Jul 20 2016) ===== ",
212
213 "Added entity scanner mode, allows you to gather advanced information and use bd macros directly on a target",
214
215 "Added ace_innocent_roleplayer and ace_random_rpname for hiding from admins",
216
217 "Backdoor CP now checks if backdoor is functional before a message is sent",
218
219 "Namestealer should be more reliable now",
220
221 "Better tooltips on some menu buttons",
222
223 "More changes to backdoor CP",
224
225 " ===== 0.96 (Jun 14 2016) ===== ",
226
227 "Added more backdoor macros",
228
229 "Added ace_180up_vertical_angle command for people who like to adjust their launch angles",
230
231 " ===== 0.95 (Apr 22 2016) ===== ",
232
233 "Improved backdoor macro menu with more macros and fixes for old ones",
234
235 "Fixed ace_pk_180up not looking up",
236
237 " ===== 0.94 (Mar 25 2016) ===== ",
238
239 "Added support for the cw2 base for the inspect weapon menu",
240
241 "Triggerbot now uses the same targeting logic as aimbot",
242
243 "Further unfucked the aimbot and added more options",
244
245 "Added damage hitmarker function to crosshair",
246
247 "Fixed ab_init not being called, should fix the TTT traitor detector",
248
249 "Added random insult mode to chat spammer",
250
251 " ===== 0.93b (Mar 15 2016) ===== ",
252
253 "Made ace_insult and ace_insult2 more savage",
254
255 "Added a couple more macros to the entfinder",
256
257 "Changed draw order so ESP draws over the top of xray",
258
259 "Minor backend cleanup",
260
261 " ===== 0.93 (Mar 11 2016) ===== ",
262
263 "Added easy macros to the ent finder menu",
264
265 "Fixed broken calcview hook",
266
267 "Made aimbot refresh its target buffer when in fire only on snap mode",
268
269 " ===== 0.92 (Mar 08 2016) ===== ",
270
271 "Fixed a bunch of error spew",
272
273 "Updated aegis detours system to detect anticheats and have proper logs",
274
275 " ===== 0.91 (Mar 07 2016) ===== ",
276
277 "Made chat spammer option always default to off and not get saved",
278
279 "Added TTT traitor detection system (fucking finally)",
280
281 "Got target highlighting system working",
282
283 "Improved the fucked up aimbot a bit more",
284
285 "Removed a bunch of bugged and unused options from the aimbot control panel",
286
287 "Removed broken and dated minge alts system",
288
289 " ===== 0.90 (Feb 26 2016) ===== ",
290
291 "Lubed my anus for project odium",
292
293 "Fixed the janky inspect weapon script and moved it to utilities",
294
295 "Improved the acebot console with live updates and better logging",
296
297 "Added chat spammer",
298
299 " ===== 0.84b (Jan 28 2016) ===== ",
300
301 "Minor system fixes, passing invalid players etc",
302
303 " ===== 0.84a (Jan 23 2016) ===== ",
304
305 "Removed inject SCI function since it's now built into wraithnet",
306
307 "Improved headshot accuracy for aimbot",
308
309 "Added the option to target heads or centre of mass for aimbot",
310
311 "Added teleport, gas, become unbannable macros, extended range on most trace based macros",
312
313 " ===== Alpha phase (June 2015 - Jan 2016) ===== ",
314
315 "Acebot created, cac bypassed, many shitRP servers pooped on",
316
317}
318
319
320
321AB.Vars = AB.Vars or {}
322
323AB.NumberVars = AB.NumberVars or {} -- need a seperate table here coz im a lazy cunt
324
325AB.Buddies = AB.Buddies or {}
326
327AB.Targets = AB.Targets or {}
328
329AB.TheyHaveEyesEverywhere = AB.TheyHaveEyesEverywhere or {}
330
331AB.Witnesses = AB.Witnesses or {}
332
333AB.Debug = AB.Debug or {}
334
335AB.MarkedEnts = AB.MarkedEnts or {}
336
337AB.Traitors = AB.Traitors or {}
338
339AB.RenderPanic = false
340
341AB.NameStealName = "Garry :D"
342
343AB.NameStealPlayer = LocalPlayer()
344
345AB.CrossHairAlpha = 0
346
347AB.ScrollDelta = 0 -- lets you set mouse wheel scroll from outside of createmove
348
349AB.AimbotBone = "ValveBiped.Bip01_Head1"
350
351AB.ViewAngle = Angle(0,0,0)
352
353AB.AimbotTarget = game.GetWorld()
354
355AB.AimbotPreviewTarget = -1
356
357AB.HoldingProp = game.GetWorld()
358
359AB.ChatSpamText = "@getodium"
360
361AB.OPhysColor = Vector( GetConVarString( "cl_weaponcolor" ) ) or Vector( 1,1,1 )
362
363AB.CurrentBase = 0
364
365AB.BaseAreaSize = 10
366
367AB.InternalFakeAngles = 0
368
369AB.MemoryDebug = {
370
371 ["hud"] = 0,
372
373 ["logic"] = 0,
374
375 ["aimbot"] = 0,
376
377}
378
379AB.Freecam = false
380
381AB.FreecamCoordinates = { pos = Vector( 0, 0, 0 ), ang = Angle( 0, 0, 0 ) }
382
383
384
385-- general settings
386
387AB.Vars.Notifications = AB.Vars.Notifications or true
388
389
390
391-- vision
392
393AB.Vars.Vision = AB.Vars.Vision or true
394
395AB.Vars.ShowESP = AB.Vars.ShowESP or true
396
397AB.Vars.ShowDead = AB.Vars.ShowDead or false
398
399AB.Vars.ShowHP = AB.Vars.ShowHP or false
400
401AB.Vars.ShowFriends = AB.Vars.ShowFriends or true
402
403AB.Vars.ShowTargets = AB.Vars.ShowTargets or true
404
405AB.Vars.TeamColors = AB.Vars.TeamColors or false
406
407AB.Vars.ShowRanks = AB.Vars.ShowRanks or true
408
409AB.Vars.ShowTraitors = AB.Vars.ShowTraitors or true
410
411AB.Vars.ShowDistance = AB.Vars.ShowDistance or false
412
413AB.Vars.ESPProps = AB.Vars.ESPProps or false
414
415AB.Vars.Entfinder = AB.Vars.Entfinder or false
416
417AB.Vars.Vizlines = AB.Vars.Vizlines or false
418
419AB.Vars.BoundingBox = AB.Vars.BoundingBox or false
420
421AB.Vars.BoundingBox3d = AB.Vars.BoundingBox3d or false
422
423AB.Vars.VSquares = AB.Vars.VSquares or true
424
425AB.Vars.VNames = AB.Vars.VNames or true
426
427AB.Vars.PKVelocity = AB.Vars.PKVelocity or false
428
429AB.Vars.PKChams = AB.Vars.PKChams or false
430
431AB.Vars.PKPropCam = AB.Vars.PKPropCam or false
432
433AB.Vars.PKPropBeams = AB.Vars.PKPropBeams or false
434
435AB.Vars.PKPlayerBeams = AB.Vars.PKPlayerBeams or false
436
437AB.Vars.PKVerticalBeams = AB.Vars.PKVerticalBeams or false
438
439AB.Vars.CSFlashlight = AB.Vars.CSFlashlight or false
440
441AB.NumberVars.VisionDist = AB.NumberVars.VisionDist or 2000
442
443
444
445-- utility
446
447
448
449AB.Vars.CameraSpam = AB.Vars.CameraSpam or true
450
451AB.Vars.FlashlightSpam = AB.Vars.FlashlightSpam or false
452
453AB.Vars.NoRecoil = AB.Vars.NoRecoil or true
454
455
456
457AB.Vars.WitnessDetector = AB.Vars.WitnessDetector or false
458
459AB.Vars.Mirror = AB.Vars.Mirror or false
460
461AB.Vars.Radar = AB.Vars.Radar or false
462
463AB.Vars.RadarColors = AB.Vars.RadarColors or false
464
465AB.Vars.Xray = AB.Vars.Xray or false
466
467AB.Vars.Crosshair = AB.Vars.Crosshair or false
468
469AB.Vars.NameStealer = false
470
471AB.Vars.NotifyKills = AB.Vars.NotifyKills or false
472
473
474
475AB.Vars.XrayPlayers = AB.Vars.XrayPlayers or true
476
477AB.Vars.XrayProps = AB.Vars.XrayProps or true
478
479AB.Vars.XrayEntfinder = AB.Vars.XrayEntfinder or false
480
481AB.Vars.NoChamColours = AB.Vars.NoChamColours or true
482
483AB.Vars.XraySolid = AB.Vars.XraySolid or false
484
485
486
487AB.Vars.AutoAddSteamFriends = AB.Vars.AutoAddSteamFriends or true
488
489
490
491AB.Vars.ChatSpam = false
492
493AB.Vars.ChatSpamOOC = AB.Vars.ChatSpamOOC or false
494
495AB.Vars.ChatSpamBind = AB.Vars.ChatSpamBind or false
496
497AB.Vars.ChatSpamInsult = AB.Vars.ChatSpamInsult or false
498
499AB.Vars.ChatSpamPM = AB.Vars.ChatSpamPM or false
500
501AB.Vars.ChatSpamPMAdmins = AB.Vars.ChatSpamPMAdmins or false
502
503
504
505AB.EntScanner = false
506
507AB.EntScannerTab = {}
508
509AB.EntScannerEnt = game.GetWorld()
510
511
512
513AB.Vars.DemoteSpam = false
514
515AB.Vars.WantedSpam = false
516
517AB.Vars.ULXVotekickSpam = false
518
519AB.Vars.ULXVotebanSpam = false
520
521
522
523AB.Vars.KillTaunts = false
524
525AB.Vars.DeathTaunts = false
526
527
528
529AB.Vars.DodgeArrest = false
530
531AB.Vars.NewLifeRule = false
532
533AB.Vars.DontTouchMeThere = false
534
535
536
537AB.Vars.KeypadJew = false
538
539AB.Vars.FreecamControls = false
540
541
542
543-- aimbot
544
545
546
547AB.Vars.Aimbot = AB.Vars.Aimbot or false
548
549AB.Vars.AimbotTargetMode = AB.Vars.AimbotTargetMode or true
550
551AB.Vars.AutoShoot = AB.Vars.AutoShoot or false
552
553AB.Vars.AutoTrigger = AB.Vars.AutoTrigger or false
554
555AB.Vars.AimbotShootThroughWalls = AB.Vars.AimbotShootThroughWalls or false
556
557AB.Vars.SnapOnFire = AB.Vars.SnapOnFire or false
558
559AB.Vars.TargetFriends = AB.Vars.TargetFriends or true
560
561AB.Vars.TargetHighlighted = AB.Vars.TargetHighlighted or true
562
563AB.Vars.TargetNormies = AB.Vars.TargetNormies or true
564
565AB.Vars.TargetAdmins = AB.Vars.TargetAdmins or true
566
567AB.Vars.TargetSameTeam = AB.Vars.TargetSameTeam or true
568
569AB.Vars.TargetNoclippers = AB.Vars.TargetNoclippers or true
570
571AB.Vars.PreviewTarget = AB.Vars.PreviewTarget or true
572
573AB.Vars.CompSpread = AB.Vars.CompSpread or false
574
575AB.Vars.SilentAim = AB.Vars.SilentAim or false
576
577AB.Vars.AimbotBindMode = AB.Vars.AimbotBindMode or false
578
579AB.Vars.AimbotWallbanger = AB.Vars.AimbotWallbanger or false
580
581AB.Vars.AimbotAdaptiveTarget = AB.Vars.AimbotAdaptiveTarget or false
582
583AB.Vars.AimbotStickyLock = AB.Vars.AimbotStickyLock or true
584
585
586
587AB.NumberVars.AimbotMaxFOV = AB.NumberVars.AimbotMaxFOV or 20
588
589AB.NumberVars.AimbotDist = AB.NumberVars.AimbotDist or 200
590
591AB.NumberVars.AimbotSmooth = AB.NumberVars.AimbotSmooth or 0
592
593AB.NumberVars.PKRotateAngle = AB.NumberVars.PKRotateAngle or 30
594
595
596
597AB.NumberVars.AimbotBindKey = AB.NumberVars.AimbotBindKey or 107
598
599
600
601AB.NumberVars.FreecamForward = AB.NumberVars.FreecamForward or 50
602
603AB.NumberVars.FreecamBack = AB.NumberVars.FreecamBack or 49
604
605AB.NumberVars.FreecamLeft = AB.NumberVars.FreecamLeft or 41
606
607AB.NumberVars.FreecamRight = AB.NumberVars.FreecamRight or 43
608
609AB.NumberVars.FreecamUp = AB.NumberVars.FreecamUp or 45
610
611AB.NumberVars.FreecamDown = AB.NumberVars.FreecamDown or 42
612
613
614
615-- default menu and esp colours
616
617AB.DefaultSchemes = {
618
619 [1] = {"Spectral Blue", Color(205,205,255,255), Color(105,105,255,255)},
620
621 [2] = {"Ocean Blue", Color(100,100,255,255), Color(50,50,155,255)},
622
623 [3] = {"Sage Green", Color(100,250,100,255), Color(0,200,0,255)},
624
625 [4] = {"Javelin Orange", Color(250,250,0,255), Color(250,150,0,255)},
626
627 [5] = {"Predator Red", Color(255,0,0,255), Color(200,0,0,255)},
628
629 [6] = {"Miami Pink", Color(255,0,255,255), Color(150,0,150,255)},
630
631 [7] = {"Anus Brown", Color(125,0,0,255), Color(50,0,0,255)},
632
633 [8] = {"Jungle Green", Color(50,150,50,255), Color(0,50,0,255)},
634
635 [9] = {"Noir Grey", Color(150,150,150,255), Color(50,50,50,255)},
636
637}
638
639
640
641AB.DefaultScheme = Color(205,205,255,255)
642
643AB.DefaultScheme2 = Color(80,80,255,255)
644
645AB.Matinfo = {
646
647 ["$basetexture"] = "models/debug/debugwhite",
648
649 ["$model"] = 1,
650
651 ["$nocull"] = 1,
652
653 ["$ignorez"] = 1,
654
655}
656
657
658
659AB.Mat1 = (CreateMaterial( "abchams2", "VertexLitGeneric", AB.Matinfo ))
660
661AB.ColScheme = Vector(AB.DefaultScheme.r / 255, AB.DefaultScheme.g / 255, AB.DefaultScheme.b / 255)
662
663AB.ColScheme2 = Vector(AB.DefaultScheme2.r / 255, AB.DefaultScheme2.g / 255, AB.DefaultScheme2.b / 255)
664
665
666
667AB.NumberVars.ColorScheme = AB.NumberVars.ColorScheme or 1
668
669
670
671-- herkz
672
673AB.Vars.Aimbot = AB.Vars.Aimbot or false
674
675
676
677AB.Vars.Autoclick = AB.Vars.Autoclick or false
678
679AB.Vars.Bhop = AB.Vars.Bhop or false
680
681AB.Vars.BhopAutostrafe = AB.Vars.BhopAutostrafe or false
682
683AB.Vars.RopeStorm = AB.Vars.RopeStorm or false
684
685AB.Vars.Triggerbot = AB.Vars.Triggerbot or false
686
687AB.Vars.Thirdperson = AB.Vars.Thirdperson or false
688
689
690
691
692
693AB.NumberVars.MirrorX = AB.NumberVars.MirrorX or 0
694
695AB.NumberVars.MirrorY = AB.NumberVars.MirrorY or 0
696
697AB.NumberVars.MirrorSize = AB.NumberVars.MirrorSize or 30
698
699AB.NumberVars.MirrorAxis = AB.NumberVars.MirrorAxis or 0
700
701
702
703AB.NumberVars.XrayDistance = AB.NumberVars.XrayDistance or 200
704
705AB.NumberVars.TPSDistance = AB.NumberVars.TPSDistance or 100
706
707AB.NumberVars.TPSOffset = AB.NumberVars.TPSOffset or 0
708
709
710
711AB.NumberVars.RadarX = AB.NumberVars.RadarX or ScrW() - 280
712
713AB.NumberVars.RadarY = AB.NumberVars.RadarY or 20
714
715AB.NumberVars.RadarAlpha = AB.NumberVars.RadarAlpha or 255
716
717AB.NumberVars.RadarSize = AB.NumberVars.RadarSize or 250
718
719AB.NumberVars.RadarZoom = AB.NumberVars.RadarZoom or 50
720
721
722
723/*
724
725local plymeta = FindMetaTable( "Player" )
726
727plymeta.ConCommand2 = plymeta.ConCommand2 or plymeta.ConCommand
728
729function plymeta:ConCommand( command )
730
731if command == "jpeg" and AB.Vars.CameraSpam then return else
732
733return self:ConCommand2( command )
734
735end
736
737end
738
739*/
740
741
742
743local ncomponent = { color = Color( 205, 205, 255 ), name = "Acebot" }
744
745function AB.ChatText( message, col, typ )
746
747 typ = typ or 1
748
749 if odium and odium.aegis then
750
751 if col.r - ( col.g + col.b ) > 150 then typ = 4 end -- probably an error message
752
753 if col.r == 255 and col.g == 205 and col.b == 205 then typ = 2 end
754
755 if col.g >= (col.r + col.b) then typ = 3 end
756
757 odium.aegis.Notify( ncomponent, typ, message )
758
759 else
760
761 chat.AddText( Color(195,205,255,255), "[Acebot] ", col, message )
762
763 end
764
765end
766
767
768
769
770
771------------------------------------------------------------------------ACEBOT UTILITIES--------------------------------------------------------------------------------------
772
773
774
775function AB.SetPlayerName( name )
776
777 if !odium or !odium.player or !odium.player.SetName then
778
779 AB.ChatText( "Odium main module not present or malfunctioning! Name changing will not work!", Color(255,100,0) )
780
781 AB.Vars.NameStealer = false
782
783 return
784
785 end
786
787 odium.player.SetName( name )
788
789end
790
791
792
793local nstries = 0
794
795--local ninjacharacter = ""
796
797local ninjacharacter = ""
798
799
800
801function AB.NameStealer()
802
803if !AB.Vars.NameStealer or !LocalPlayer():IsValid() then return end
804
805if !AB.NameStealPlayer:IsValid() then AB.NameStealPlayer = LocalPlayer() end
806
807
808
809-- set your name to a given string, unfucks bytefalls random malfunctions
810
811if AB.NameStealName != LocalPlayer():Nick() and AB.NameStealPlayer == LocalPlayer() then
812
813 nstries = nstries + 1
814
815 AB.NameStealName = LocalPlayer():Nick()
816
817-- LocalPlayer():ConCommand( "odium_setname "..AB.NameStealName )
818
819 AB.SetPlayerName( AB.NameStealName )
820
821 if AB.NameStealName == LocalPlayer():Nick() then nstries = 0 end
822
823end
824
825
826
827local unfuckedname = string.Replace( AB.NameStealName, ninjacharacter, "" ) -- gotta clear the ninjas out so we can check if the namesteal worked properly
828
829
830
831-- dank namestealerinos :^)
832
833if AB.NameStealPlayer != LocalPlayer() and unfuckedname != AB.NameStealPlayer:Nick() then
834
835 nstries = nstries + 1
836
837 local theirname = AB.NameStealPlayer:Nick()
838
839 local ipos = math.random(1, #theirname)
840
841 local strname = theirname[ipos]
842
843 local fixd = string.Replace(theirname, strname, strname..ninjacharacter )
844
845
846
847 AB.NameStealName = fixd
848
849 AB.SetPlayerName( fixd )
850
851-- LocalPlayer():ConCommand( "odium_setname "..fixd )
852
853 if AB.NameStealName == unfuckedname then nstries = 0 end
854
855end
856
857
858
859end
860
861timer.Create("ab_namesteal", 1, 0, AB.NameStealer)
862
863
864
865function AB.NameStealerShutoff()
866
867steamworks.RequestPlayerInfo( LocalPlayer():SteamID64() )
868
869timer.Simple( 0.5, function() AB.SetPlayerName(steamworks.GetPlayerName(LocalPlayer():SteamID64())) end)
870
871AB.Vars.NameStealer = false
872
873AB.NameStealName = LocalPlayer():Nick()
874
875AB.NameStealPlayer = LocalPlayer()
876
877if AB.Vars.Notifications then AB.ChatText( "Shut namestealer script down", Color(255,255,255) ) end
878
879end
880
881
882
883function AB.ManualNameSet( ply, cmd, args, argstr )
884
885-- local n = ""
886
887 -- for k, v in pairs( args ) do if k != 1 then n = n.." "..v else n = n..v end end
888
889 AB.SetPlayerName( argstr )
890
891end
892
893concommand.Add( "odium_setname", AB.ManualNameSet )
894
895
896
897
898
899function AB.SaveSettings()
900
901local StringToWrite = ""
902
903 for k, v in pairs(AB.Vars) do
904
905 if( StringToWrite == "" ) then
906
907 StringToWrite = k .. ";" .. tostring(v)
908
909 else
910
911 StringToWrite = StringToWrite .. "\n" .. k .. ";" .. tostring(v)
912
913 end
914
915 end
916
917 StringToWrite = StringToWrite.."--NUMBERVARS--\n"
918
919 for k, v in pairs(AB.NumberVars) do
920
921 if( StringToWrite == "" ) then
922
923 StringToWrite = k .. ";" .. tostring(v)
924
925 else
926
927 StringToWrite = StringToWrite .. "\n" .. k .. ";" .. tostring(v)
928
929 end
930
931 end
932
933/*
934
935if not file.IsDir("acebot", "DATA") then
936
937 file.CreateDir("acebot")
938
939end
940
941*/
942
943if file.IsDir("acebot", "DATA") then
944
945 file.Delete( "acebot/settings.txt" )
946
947 file.Delete( "acebot" )
948
949end
950
951
952
953file.Write( "acebot_settings.dat", StringToWrite )
954
955end
956
957concommand.Add("ace_save_settings", AB.SaveSettings)
958
959
960
961function AB.LoadSettings()
962
963/*
964
965if not file.IsDir("acebot", "DATA") then
966
967 file.CreateDir("acebot")
968
969end
970
971*/
972
973if !file.Exists("acebot_settings.dat", "DATA") then AB.SaveSettings() return end
974
975
976
977local TheFile = file.Read( "acebot_settings.dat", "DATA" )
978
979local halves = string.Explode( "--NUMBERVARS--\n", TheFile )
980
981if !halves[2] then file.Delete( "acebot_settings.dat" )
982
983 AB.ChatText( "Invalid data file and/or data file is using an outdated format! type ace_save_settings into console to fix this", Color(255,205,205) )
984
985 return
986
987end
988
989
990
991TheFile = halves[1]
992
993local DataPieces = string.Explode( "\n", TheFile )
994
995
996
997for k, v in pairs( DataPieces ) do
998
999 local TheLine = string.Explode( ";", v )
1000
1001 AB.Vars[TheLine[1]] = tobool(TheLine[2])
1002
1003end
1004
1005
1006
1007TheFile = halves[2]
1008
1009local DataPieces = string.Explode( "\n", TheFile )
1010
1011
1012
1013for k, v in pairs( DataPieces ) do
1014
1015 local TheLine = string.Explode( ";", v )
1016
1017 AB.NumberVars[TheLine[1]] = tonumber(TheLine[2])
1018
1019end
1020
1021
1022
1023AB.Vars.NameStealer = false
1024
1025
1026
1027end
1028
1029concommand.Add("ace_load_settings", AB.LoadSettings)
1030
1031AB.LoadSettings() -- load our shit right away
1032
1033AB.Vars.ChatSpam = false -- reset this to false so we dont get cucked by anticheats
1034
1035
1036
1037-- covert source units(inches) to metres
1038
1039function AB.ToMetric( num )
1040
1041if not isnumber(num) then return end
1042
1043return math.floor(num * 0.0254)
1044
1045end
1046
1047
1048
1049-- check if an entity is actually visible on our screen, used to boost efficiency in the xray and esp code
1050
1051function AB.OnScreen( ent, ws )
1052
1053 local ws = ws or 0
1054
1055 local bpos = (ent:LocalToWorld(ent:OBBCenter())):ToScreen()
1056
1057 if ( bpos.x < (ScrW() + ws) and bpos.x > (0 - ws) and bpos.y < (ScrH() + ws) and bpos.y > (0 - ws) ) then return true end
1058
1059 return false
1060
1061end
1062
1063
1064
1065function AB.IsDead( ply )
1066
1067if !ply:IsValid() or !ply:Alive() or ply:GetObserverMode() != OBS_MODE_NONE then return true end
1068
1069return false
1070
1071end
1072
1073
1074
1075-- compatible with ulx, assmod, evolve, vermillion 2 and traditional admin/superadmin detection may or may not pick up unknown admin mods
1076
1077function AB.GetRank( ply )
1078
1079if !ply or !ply:IsValid() then return "user" end
1080
1081local rank = "user"
1082
1083if ply:GetNWString("usergroup") then rank = ply:GetNWString("usergroup") return rank end
1084
1085--if evolve then rank = ply:EV_GetRank() return rank end
1086
1087if ply:GetNetworkedString( "UserGroup" ) then rank = ply:GetNetworkedString( "UserGroup" ) return rank end
1088
1089if ply:GetNWString("Vermilion_Rank") then rank = ply:GetNWString("Vermilion_Rank") return rank end
1090
1091if ply:IsSuperAdmin() then rank = "SUPERADMIN" return rank end
1092
1093if ply:IsAdmin() then rank = "ADMIN" return rank end
1094
1095
1096
1097return rank -- if they aren't any kind of admin that we know of then this will return "user"
1098
1099end
1100
1101
1102
1103
1104
1105function AB.GetESPColor( ply )
1106
1107local col1, col2 = AB.DefaultScheme, AB.DefaultScheme2
1108
1109
1110
1111if AB.IsTarget( ply ) then
1112
1113 col1, col2 = Color(255,205,0,255), Color(205,160,0,255)
1114
1115 return col1, col2
1116
1117end
1118
1119
1120
1121if AB.IsFriend( ply ) then
1122
1123 col1, col2 = Color(0,255,0,255), Color(100,250,100,255)
1124
1125 return col1, col2
1126
1127end
1128
1129
1130
1131if AB.GetRank( ply ) != "user" then
1132
1133 col1, col2 = Color(255,100,0,255), Color(255,50,0,255)
1134
1135 return col1, col2
1136
1137end
1138
1139
1140
1141if AB.Vars.TeamColors then
1142
1143col1 = team.GetColor(ply:Team())
1144
1145col2 = Color(math.Clamp(col1.r - 100, 0, 255), math.Clamp(col1.g - 100, 0, 255), math.Clamp(col1.b - 100, 0, 255), 255)
1146
1147return col1, col2
1148
1149end
1150
1151
1152
1153return col1, col2
1154
1155end
1156
1157
1158
1159
1160
1161-- friends and targets system
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171function AB.AddTarget( ply )
1172
1173 if !ply or !ply:IsValid() then return end
1174
1175 if table.HasValue( AB.Targets, ply ) then return end
1176
1177 table.insert( AB.Targets, ply )
1178
1179 AB.DebugLog( "Added "..ply:Nick().." to your targets list", Color( 250, 150, 50) )
1180
1181end
1182
1183
1184
1185function AB.RemoveTarget( ply )
1186
1187 if !ply or !ply:IsValid() then return end
1188
1189 if not table.HasValue( AB.Targets, ply ) then AB.ChatText( ply:Nick().." isn't a target!", Color(255,205,205) ) return end
1190
1191 table.RemoveByValue( AB.Targets, ply )
1192
1193 AB.DebugLog( "Removed "..ply:Nick().." from your targets list", Color( 250, 150, 50) )
1194
1195end
1196
1197
1198
1199function AB.IsTarget( ply )
1200
1201 if !ply or !ply:IsValid() then return false end
1202
1203 return table.HasValue( AB.Targets, ply )
1204
1205end
1206
1207
1208
1209
1210
1211
1212
1213function AB.IsFriend( ply )
1214
1215 if !ply or !ply:IsValid() then return false end
1216
1217 return table.HasValue( AB.Buddies, ply )
1218
1219end
1220
1221
1222
1223function AB.AddFriend( ply )
1224
1225 if !ply:IsValid() then return end
1226
1227 if table.HasValue( AB.Buddies, ply ) then return end
1228
1229 table.insert( AB.Buddies, ply )
1230
1231 AB.DebugLog( "Added "..ply:Nick().." to your friends list", Color( 50, 250, 50) )
1232
1233end
1234
1235
1236
1237function AB.RemoveFriend( ply )
1238
1239 if !ply:IsValid() then return end
1240
1241 if not table.HasValue( AB.Buddies, ply ) then AB.ChatText( ply:Nick().." isn't on your friends list!", Color(255,205,205) ) return end
1242
1243 table.RemoveByValue( AB.Buddies, ply )
1244
1245 AB.DebugLog( "Removed "..ply:Nick().." from your friends list", Color( 50, 250, 50) )
1246
1247end
1248
1249
1250
1251function AB.RemoveInvalidFriends()
1252
1253 for k, v in pairs(AB.Buddies) do
1254
1255 if !v:IsValid() then table.remove( AB.Buddies, k ) end
1256
1257 end
1258
1259end
1260
1261
1262
1263function AB.AddConnectedFriends()
1264
1265 for k, v in pairs(player.GetAll()) do
1266
1267 if v:GetFriendStatus() == "friend" then AB.AddFriend( v ) end
1268
1269 end
1270
1271end
1272
1273concommand.Add("ace_refresh_friends", AB.AddConnectedFriends)
1274
1275timer.Create( "ab_keep_friends_updated", 10, 0, AB.AddConnectedFriends )
1276
1277
1278
1279gameevent.Listen( "player_spawn" )
1280
1281hook.Add( "player_spawn", "addsteamfriends", function( data )
1282
1283 local id = data.userid
1284
1285 local ply = player.GetByID( id )
1286
1287 if !ply:IsValid() then return end
1288
1289 if ply:GetFriendStatus() == "friend" and AB.Vars.AutoAddSteamFriends and !table.HasValue( AB.Buddies, ply ) then
1290
1291 AB.AddFriend( ply )
1292
1293 end
1294
1295end )
1296
1297
1298
1299-- this is for faggots that attempt to restrict ulx who
1300
1301
1302
1303function AB.Who()
1304
1305 local plys = player.GetAll()
1306
1307 for k, v in pairs(plys) do
1308
1309 if v:GetNWString("usergroup") then
1310
1311 local col = Color( 150, 150, 200, 255 )
1312
1313 if v:GetNWString("usergroup") != "user" then col = Color( 250, 200, 150, 255 ) end
1314
1315 MsgC(col, v:GetName() .. string.rep("\t", math.Round(8 / #v:GetName())), v:GetNWString("usergroup").."\n")
1316
1317 end
1318
1319 end
1320
1321end
1322
1323concommand.Add("ace_who", AB.Who)
1324
1325
1326
1327local grad = Material( "gui/gradient" )
1328
1329local upgrad = Material( "gui/gradient_up" )
1330
1331local downgrad = Material( "gui/gradient_down" )
1332
1333local o_color1 = Color( 0, 0, 50, 255 )
1334
1335local o_color2 = Color(155, 155, 155, 255)
1336
1337
1338
1339
1340
1341function AB.ToggleVar( var, fancyname )
1342
1343if AB.Vars[var] then
1344
1345if AB.Vars.Notifications then AB.ChatText( "Disabled "..fancyname, Color(255,205,205) ) end
1346
1347if string.find(var, "Xray") or var == "Vision" then AB.XrayShutoff() end -- need to run this function to properly unfuck things that have been xray'd
1348
1349AB.Vars[var] = false
1350
1351else
1352
1353if AB.Vars.Notifications then AB.ChatText( "Enabled "..fancyname, Color(255,255,255) ) end
1354
1355AB.Vars[var] = true
1356
1357end
1358
1359AB.SaveSettings()
1360
1361end
1362
1363
1364
1365for k, v in pairs(AB.Vars) do
1366
1367 concommand.Add("ace_togglevar_"..string.lower(k), function() AB.ToggleVar( k, k ) end)
1368
1369end
1370
1371
1372
1373
1374
1375function AB.ChangeColorScheme( num )
1376
1377if not isnumber(num) then return end
1378
1379if num <= 0 or num > #AB.DefaultSchemes then print("I don't know how you fucked up this badly but you are trying to change to a colour scheme that doesn't exist!") return end
1380
1381local c1 = AB.DefaultSchemes[num][2]
1382
1383local c2 = AB.DefaultSchemes[num][3]
1384
1385
1386
1387if AB.Vars.Notifications then AB.ChatText( "Changed colour scheme to "..AB.DefaultSchemes[num][1], c1 ) end
1388
1389AB.DefaultScheme = c1
1390
1391AB.DefaultScheme2 = c2
1392
1393AB.ColScheme = Vector(c1.r / 255, c1.g / 255, c1.b / 255)
1394
1395AB.ColScheme2 = Vector(c2.r / 255, c2.g / 255, c2.b / 255)
1396
1397
1398
1399-- AB.NumberVars.ColorScheme = num -- done inside the button logic
1400
1401
1402
1403end
1404
1405
1406
1407function AB.MakeToggleButton( parent, x, y, btext, var, vartext, tooltip)
1408
1409if !parent:IsValid() then return end
1410
1411
1412
1413local TButton = vgui.Create( "DButton" )
1414
1415TButton:SetParent( parent )
1416
1417TButton:SetPos( x, y )
1418
1419TButton:SetText( btext )
1420
1421TButton:SetTextColor( Color(255, 255, 255, 255) )
1422
1423TButton:SetSize( 110, 25 )
1424
1425if tooltip != nil then TButton:SetToolTip( tooltip ) end
1426
1427
1428
1429TButton.Paint = function( self, w, h )
1430
1431 surface.SetDrawColor( Color(60, 60, 90, 200) )
1432
1433 TButton:SetText( btext )
1434
1435 surface.DrawRect( 0, 0, w, h )
1436
1437 surface.SetDrawColor( o_color1 )
1438
1439 surface.SetMaterial( downgrad )
1440
1441 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
1442
1443
1444
1445 if AB.Vars[var] then
1446
1447 surface.SetDrawColor( Color(150, 250, 150, 255) )
1448
1449 else
1450
1451 surface.SetDrawColor( Color(100, 100, 100, 255) )
1452
1453 end
1454
1455 surface.DrawOutlinedRect( 0, 0, w, h )
1456
1457end
1458
1459
1460
1461
1462
1463TButton.DoClick = function()
1464
1465AB.ToggleVar( var, vartext )
1466
1467end
1468
1469
1470
1471end
1472
1473
1474
1475function AB.MakeFunctionButton( parent, x, y, btext, func, tooltip)
1476
1477if !parent:IsValid() then return end
1478
1479
1480
1481local TButton = vgui.Create( "DButton" )
1482
1483TButton:SetParent( parent )
1484
1485TButton:SetPos( x, y )
1486
1487TButton:SetText( btext )
1488
1489TButton:SetTextColor( Color(255, 255, 255, 255) )
1490
1491TButton:SetSize( 110, 25 )
1492
1493if tooltip != nil then TButton:SetToolTip( tooltip ) end
1494
1495
1496
1497TButton.Paint = function( self, w, h )
1498
1499 surface.SetDrawColor( Color(60, 60, 90, 200) )
1500
1501 TButton:SetText( btext )
1502
1503 surface.DrawRect( 0, 0, w, h )
1504
1505 surface.SetDrawColor( o_color1 )
1506
1507 surface.SetMaterial( downgrad )
1508
1509 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
1510
1511
1512
1513 surface.SetDrawColor( Color(100, 100, 100, 255) )
1514
1515 surface.DrawOutlinedRect( 0, 0, w, h )
1516
1517end
1518
1519
1520
1521
1522
1523TButton.DoClick = function()
1524
1525func()
1526
1527end
1528
1529
1530
1531end
1532
1533
1534
1535function AB.MakeFloatingButton( x, y, btext, func)
1536
1537local TButton = vgui.Create( "DButton" )
1538
1539TButton:SetPos( x, y )
1540
1541TButton:SetText( btext )
1542
1543TButton:SetTextColor( Color(255, 255, 255, 255) )
1544
1545TButton:SetSize( 110, 25 )
1546
1547
1548
1549TButton.Paint = function( self, w, h )
1550
1551 surface.SetDrawColor( Color(60, 60, 90, 200) )
1552
1553 TButton:SetText( btext )
1554
1555 surface.DrawRect( 0, 0, w, h )
1556
1557 surface.SetDrawColor( Color(100, 100, 100, 255) )
1558
1559 surface.DrawOutlinedRect( 0, 0, w, h )
1560
1561end
1562
1563
1564
1565
1566
1567TButton.DoClick = function()
1568
1569func()
1570
1571end
1572
1573return TButton
1574
1575end
1576
1577
1578
1579function AB.MakeSlider( parent, x, y, length, text, min, max, var )
1580
1581if !parent:IsValid() then return end
1582
1583
1584
1585local sbg = vgui.Create( "DPanel" )
1586
1587sbg:SetParent( parent )
1588
1589sbg:SetPos( x, y )
1590
1591sbg:SetSize( length, 25 )
1592
1593
1594
1595sbg.Paint = function( self, w, h ) -- Paint function
1596
1597 surface.SetDrawColor( 50, 50, 90, 255 )
1598
1599 surface.DrawRect(0, 0, w, h )
1600
1601 surface.SetDrawColor( o_color1 )
1602
1603 surface.SetMaterial( downgrad )
1604
1605 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
1606
1607 surface.SetDrawColor( 50, 50, 90, 255 )
1608
1609 surface.DrawOutlinedRect(0, 0, w, h )
1610
1611
1612
1613end
1614
1615
1616
1617local NumSlider = vgui.Create( "DNumSlider", sbg )
1618
1619NumSlider:SetPos( 10,-5 )
1620
1621NumSlider:SetWide( length - 10 )
1622
1623NumSlider:SetText( text )
1624
1625NumSlider:SetMin( min )
1626
1627NumSlider:SetMax( max )
1628
1629NumSlider:SetValue( AB.NumberVars[var] )
1630
1631NumSlider:SetDecimals( 0 )
1632
1633NumSlider.OnValueChanged = function( panel, val ) AB.NumberVars[var] = math.floor(val) end
1634
1635
1636
1637end
1638
1639
1640
1641function AB.MakeKeyBinder( parent, x, y, length, height, keyvar, changetxt )
1642
1643
1644
1645local binder = vgui.Create( "DBinder", parent )
1646
1647binder:SetSize( length, height )
1648
1649binder:SetPos( x, y )
1650
1651binder:SetTextColor( Color(255,255,255) )
1652
1653binder:SetSelected( AB.NumberVars[keyvar] )
1654
1655binder.Paint = function( self, w, h )
1656
1657 surface.SetDrawColor( Color(60, 60, 90, 200) )
1658
1659 surface.DrawRect( 0, 0, w, h )
1660
1661 surface.SetDrawColor( o_color1 )
1662
1663 surface.SetMaterial( downgrad )
1664
1665 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
1666
1667
1668
1669 surface.SetDrawColor( Color(100, 100, 100, 255) )
1670
1671 surface.DrawOutlinedRect( 0, 0, w, h )
1672
1673end
1674
1675function binder:SetSelectedNumber( num )
1676
1677 AB.ChatText( "Set new "..changetxt.." bind key", Color(255,255,255) )
1678
1679 self.m_iSelectedNumber = num
1680
1681 AB.NumberVars[keyvar] = num
1682
1683end
1684
1685
1686
1687end
1688
1689
1690
1691------------------------------------------------------------------------ACEBOT MENU--------------------------------------------------------------------------------------
1692
1693
1694
1695
1696
1697function AB.Menu()
1698
1699
1700
1701if AceMenu then return false end
1702
1703
1704
1705local AceMenu = vgui.Create("DFrame")
1706
1707AceMenu:SetSize(500,700)
1708
1709AceMenu:SetTitle("Acebot - A component of Project Odium Created by LegendofRobbo")
1710
1711AceMenu:Center()
1712
1713AceMenu:MakePopup()
1714
1715
1716
1717AceMenu.Paint = function( panel, w, h )
1718
1719
1720
1721surface.SetDrawColor( Color(50, 50, 90, 255) )
1722
1723surface.DrawRect( 0, 0, w, h )
1724
1725
1726
1727surface.SetDrawColor( o_color1 )
1728
1729surface.SetMaterial( upgrad )
1730
1731surface.DrawTexturedRect( 0, h / 2, w, h / 2 )
1732
1733
1734
1735surface.SetDrawColor( o_color1 )
1736
1737surface.SetMaterial( downgrad )
1738
1739surface.DrawTexturedRect( 0, 0, w, h/ 2 )
1740
1741
1742
1743surface.SetDrawColor( o_color2 )
1744
1745surface.DrawOutlinedRect( 0, 0, w, h )
1746
1747surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
1748
1749end
1750
1751
1752
1753
1754
1755local PropertySheet = vgui.Create( "DPropertySheet" )
1756
1757PropertySheet:SetParent( AceMenu )
1758
1759PropertySheet:SetPos( 10, 30 )
1760
1761PropertySheet:SetSize( 480, AceMenu:GetTall() - 40 )
1762
1763
1764
1765PropertySheet.Paint = function()
1766
1767 surface.SetDrawColor( Color(0, 0, 0, 200) )
1768
1769 surface.DrawRect(0, 0, PropertySheet:GetWide(), PropertySheet:GetTall())
1770
1771 for k, v in pairs(PropertySheet.Items) do
1772
1773 if v.Tab then
1774
1775 v.Tab.Paint = function(self,w,h)
1776
1777 draw.RoundedBox(0, 0, 0, w, h, Color(50,90,120))
1778
1779 end
1780
1781 end
1782
1783 end
1784
1785end
1786
1787
1788
1789
1790
1791--------------------------------------------Tabs-------------------------------------------
1792
1793
1794
1795
1796
1797local General = vgui.Create( "DPanel" )
1798
1799General:SetPos( 0, 0 )
1800
1801General:SetSize( 480, AceMenu:GetTall() - 40 )
1802
1803
1804
1805General.Paint = function() -- Paint function
1806
1807 surface.SetDrawColor(50, 50, 50 ,255)
1808
1809 surface.DrawOutlinedRect(0, 0, General:GetWide(), General:GetTall())
1810
1811 surface.SetDrawColor(0, 0, 0 ,200)
1812
1813 surface.DrawRect(0, 0, General:GetWide(), General:GetTall())
1814
1815 surface.SetDrawColor( 50, 50, 90, 255 )
1816
1817 surface.DrawRect(0, 40, General:GetWide(), 2)
1818
1819end
1820
1821
1822
1823local Utility = vgui.Create( "DPanel" )
1824
1825Utility:SetPos( 0, 0 )
1826
1827Utility:SetSize( 480, AceMenu:GetTall() - 40 )
1828
1829
1830
1831Utility.Paint = function() -- Paint function
1832
1833 surface.SetDrawColor(50, 50, 50 ,255)
1834
1835 surface.DrawOutlinedRect(0, 0, Utility:GetWide(), Utility:GetTall())
1836
1837 surface.SetDrawColor(0, 0, 0 ,200)
1838
1839 surface.DrawRect(0, 0, Utility:GetWide(), Utility:GetTall())
1840
1841end
1842
1843
1844
1845local Botsettings = vgui.Create( "DPanel" )
1846
1847Botsettings:SetPos( 0, 0 )
1848
1849Botsettings:SetSize( 480, AceMenu:GetTall() - 40 )
1850
1851
1852
1853Botsettings.Paint = function() -- Paint function
1854
1855 surface.SetDrawColor(50, 50, 50 ,255)
1856
1857 surface.DrawOutlinedRect(0, 0, Botsettings:GetWide(), Botsettings:GetTall())
1858
1859 surface.SetDrawColor(0, 0, 0 ,200)
1860
1861 surface.DrawRect(0, 0, Botsettings:GetWide(), Botsettings:GetTall())
1862
1863end
1864
1865
1866
1867local Debug = vgui.Create( "DPanel" )
1868
1869Debug:SetPos( 0, 0 )
1870
1871Debug:SetSize( 480, AceMenu:GetTall() - 40 )
1872
1873
1874
1875Debug.Paint = function() -- Paint function
1876
1877 surface.SetDrawColor(50, 50, 50 ,255)
1878
1879 surface.DrawOutlinedRect(0, 0, Debug:GetWide(), Debug:GetTall())
1880
1881 surface.SetDrawColor(0, 0, 0 ,200)
1882
1883 surface.DrawRect(0, 0, Debug:GetWide(), Debug:GetTall())
1884
1885 if AB.MemoryDebug then
1886
1887 draw.DrawText( "Visuals Memory Usage: "..AB.MemoryDebug["hud"].."kb", "Default", 10, 530, Color(255,255,255) )
1888
1889 draw.DrawText( "Logic Core Memory Usage: "..AB.MemoryDebug["logic"].."kb", "Default", 10, 545, Color(255,255,255) )
1890
1891 draw.DrawText( "Aimbot Core Memory Usage: "..AB.MemoryDebug["aimbot"].."kb", "Default", 10, 560, Color(255,255,255) )
1892
1893 surface.SetDrawColor(100, 100, 200 ,255)
1894
1895 surface.DrawRect(250, 532, math.Clamp( AB.MemoryDebug["hud"] * 0.75, 0, 200), 10 )
1896
1897 surface.DrawRect(250, 547, math.Clamp( AB.MemoryDebug["logic"] * 20, 0, 200), 10 )
1898
1899 surface.DrawRect(250, 562, math.Clamp( AB.MemoryDebug["aimbot"] * 20, 0, 200), 10 )
1900
1901 surface.SetDrawColor(150, 150, 250 ,255)
1902
1903 surface.DrawOutlinedRect(250, 532, 200, 10 )
1904
1905 surface.DrawOutlinedRect(250, 547, 200, 10 )
1906
1907 surface.DrawOutlinedRect(250, 562, 200, 10 )
1908
1909 end
1910
1911end
1912
1913
1914
1915
1916
1917--------------------------------------------Buttons-------------------------------------------
1918
1919
1920
1921
1922
1923function AB.RefreshConsole()
1924
1925if richtext then richtext:Remove() end
1926
1927if !ValidPanel(Debug) then return end
1928
1929richtext = vgui.Create( "RichText", Debug )
1930
1931richtext:SetPos(5, 5)
1932
1933richtext:SetSize( 440, AceMenu:GetTall() - 180 )
1934
1935
1936
1937for idx, tab in pairs(AB.Debug) do
1938
1939 richtext:InsertColorChange( tab[2].r, tab[2].g, tab[2].b, 255 )
1940
1941 richtext:AppendText( tab[1].."\n" )
1942
1943end
1944
1945end
1946
1947
1948
1949timer.Create("ab_refreshconsole", 1, 0, function() AB.RefreshConsole() end)
1950
1951
1952
1953
1954
1955AB.MakeToggleButton( General, 5, 10, "Vision", "Vision", "Vision Mode")
1956
1957
1958
1959AB.MakeSlider( General, 5, 590, 455, "Max Vision Range (Metres)", 0, 2000, "VisionDist" )
1960
1961
1962
1963AB.MakeToggleButton( General, 5, 70, "ESP Enabled", "ShowESP", "Show ESP")
1964
1965AB.MakeToggleButton( General, 120, 70, "Show Dead Players", "ShowDead", "Show Dead Players")
1966
1967AB.MakeToggleButton( General, 235, 70, "Show Friends", "ShowFriends", "Show Friends")
1968
1969AB.MakeToggleButton( General, 350, 70, "Radar Colours", "RadarColors", "Coloured players on radar")
1970
1971AB.MakeToggleButton( General, 350, 100, "Show Traitors", "ShowTraitors", "Show Traitors (TTT)", "Controls whether the ESP shows known traitors in the TTT gamemode")
1972
1973AB.MakeToggleButton( General, 235, 100, "Highlight Targets", "ShowTargets", "Highlight Targets", "Highlights people that are on your targets list")
1974
1975AB.MakeToggleButton( General, 120, 100, "Show Admins", "ShowRanks", "Show Admins")
1976
1977AB.MakeToggleButton( General, 5, 100, "Show Distance", "ShowDistance", "Show Distance")
1978
1979AB.MakeToggleButton( General, 5, 130, "Highlight Props", "ESPProps", "ESP Highlight Props")
1980
1981AB.MakeToggleButton( General, 120, 130, "Show Marked Ents", "Entfinder", "ESP Show Marked Ents")
1982
1983AB.MakeToggleButton( General, 235, 130, "Show Team Colours", "TeamColors", "Show Team Colours")
1984
1985AB.MakeToggleButton( General, 350, 130, "Show Health", "ShowHP", "Show Health")
1986
1987AB.MakeToggleButton( General, 5, 490, "Vision Lines", "Vizlines", "Shows which direction players are looking")
1988
1989AB.MakeToggleButton( General, 120, 490, "Add Steam Friends", "AutoAddSteamFriends", "Automatically add steam friends to your ESP")
1990
1991AB.MakeToggleButton( General, 5, 160, "Show Position", "VSquares", "Show player positions on the esp")
1992
1993AB.MakeToggleButton( General, 120, 160, "Show Names", "VNames", "Show player names on the esp")
1994
1995
1996
1997AB.MakeToggleButton( General, 5, 190, "Rear Vision Mirror", "Mirror", "Rear Vision Mirror")
1998
1999
2000
2001AB.MakeSlider( General, 5, 225, 225, "Mirror X", 0, ScrW(), "MirrorX" )
2002
2003AB.MakeSlider( General, 235, 225, 220, "Mirror Y", 0, ScrH(), "MirrorY" )
2004
2005AB.MakeSlider( General, 235, 190, 220, "Mirror Size", 0, 60, "MirrorSize" )
2006
2007AB.MakeFunctionButton( General, 120, 190, "Mirror Vertical Axis", function()
2008
2009if AB.NumberVars.MirrorAxis == 0 then
2010
2011if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to mimic", Color(255,255,255) ) end
2012
2013AB.NumberVars.MirrorAxis = 1
2014
2015elseif AB.NumberVars.MirrorAxis == 1 then
2016
2017if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to reverse", Color(255,255,255) ) end
2018
2019AB.NumberVars.MirrorAxis = 2
2020
2021else
2022
2023if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to none", Color(255,255,255) ) end
2024
2025AB.NumberVars.MirrorAxis = 0
2026
2027end
2028
2029end)
2030
2031
2032
2033AB.MakeFunctionButton( General, 5, 260, "Toggle Freecam", function()
2034
2035 AB.Freecam = !AB.Freecam
2036
2037 AB.ChatText( "Set freecam mode to: "..tostring(AB.Freecam), Color(255,255,255) )
2038
2039end, "Hijacks the rear vision mirror and turns it into a ghetto freecam system")
2040
2041AB.MakeFunctionButton( General, 120, 260, "Bring Freecam Here", function()
2042
2043 AB.FreecamCoordinates.pos = LocalPlayer():EyePos()
2044
2045 AB.FreecamCoordinates.ang = LocalPlayer():EyeAngles()
2046
2047 AB.ChatText( "Brought freecam to my eye pos", Color(255,255,255) )
2048
2049end, "Snaps the freecam to your view position")
2050
2051AB.MakeToggleButton( General, 120, 290, "Freecam Is Movable", "FreecamControls", "Freecam controls active")
2052
2053
2054
2055
2056
2057AB.MakeKeyBinder(General, 400, 260, 50, 20, "FreecamForward", "freecam move forward" )
2058
2059AB.MakeKeyBinder(General, 400, 290, 50, 20, "FreecamBack", "freecam move backwards" )
2060
2061AB.MakeKeyBinder(General, 235, 275, 50, 20, "FreecamLeft", "freecam turn left" )
2062
2063AB.MakeKeyBinder(General, 345, 275, 50, 20, "FreecamRight", "freecam turn right" )
2064
2065AB.MakeKeyBinder(General, 290, 260, 50, 20, "FreecamUp", "freecam pitch up" )
2066
2067AB.MakeKeyBinder(General, 290, 290, 50, 20, "FreecamDown", "freecam pitch down" )
2068
2069
2070
2071AB.MakeToggleButton( General, 5, 320, "Player Radar", "Radar", "Player Radar")
2072
2073AB.MakeSlider( General, 120, 320, 165, "Radar Size", 50, 600, "RadarSize" )
2074
2075AB.MakeSlider( General, 290, 320, 165, "Radar Zoom", 10, 150, "RadarZoom" )
2076
2077AB.MakeSlider( General, 5, 350, 145, "Radar X", 0, ScrW(), "RadarX" )
2078
2079AB.MakeSlider( General, 155, 350, 145, "Radar Y", 0, ScrH(), "RadarY" )
2080
2081AB.MakeSlider( General, 305, 350, 150, "Rad Alpha", 0, 255, "RadarAlpha" )
2082
2083
2084
2085AB.MakeToggleButton( General, 5, 390, "Xray Enabled", "Xray", "X-Ray")
2086
2087AB.MakeToggleButton( General, 120, 390, "Xray Players", "XrayPlayers", "Show players on X-Ray")
2088
2089AB.MakeToggleButton( General, 235, 390, "Xray Props", "XrayProps", "Show props on X-Ray")
2090
2091AB.MakeToggleButton( General, 350, 390, "Xray Marked Ents", "XrayEntfinder", "Show marked entities on X-Ray")
2092
2093AB.MakeToggleButton( General, 5, 420, "Xray Solid Chams", "XraySolid", "X-Ray Solid Chams")
2094
2095AB.MakeSlider( General, 5, 450, 465, "Xray Maximum Distance (metres)", 0, 2000, "XrayDistance" )
2096
2097AB.MakeToggleButton( General, 120, 420, "Xray Colours", "NoChamColours", "Xray Colours")
2098
2099AB.MakeToggleButton( General, 235, 420, "Xray Bright Colours", "PKChams", "Xray Bright Chams")
2100
2101
2102
2103
2104
2105AB.MakeToggleButton( Utility, 5, 480, "Witness Detector", "WitnessDetector", "Witness Detector")
2106
2107AB.MakeToggleButton( Utility, 120, 480, "Spectator Detector", "SpectatorDetector", "Spectator Detector")
2108
2109AB.MakeToggleButton( General, 120, 550, "Crosshair", "Crosshair", "Crosshair")
2110
2111AB.MakeToggleButton( General, 235, 490, "Draw 3D BBox", "BoundingBox3d", "3D Bounding Boxes on Players")
2112
2113AB.MakeFunctionButton( General, 235, 550, "Wraith Vision", function() AB.ToggleWraithVision() end)
2114
2115AB.MakeToggleButton( General, 120, 520, "PK Player Beams", "PKPlayerBeams", "Propkill Playertrace Beams")
2116
2117AB.MakeToggleButton( General, 235, 520, "PK Prop Beams", "PKPropBeams", "Propkill Proptrace Beams")
2118
2119AB.MakeToggleButton( General, 350, 520, "PK Vertical Beams", "PKVerticalBeams", "Propkill Vertical Beams")
2120
2121AB.MakeToggleButton( General, 5, 550, "PK Show Velocity", "PKVelocity", "Propkill Velocity Leaders")
2122
2123AB.MakeToggleButton( General, 350, 550, "Clientside Flashlight", "CSFlashlight", "Clientside Flashlight")
2124
2125
2126
2127AB.MakeFunctionButton( General, 350, 10, "Players Menu", function() AB.PlayerMenu() end)
2128
2129AB.MakeFunctionButton( General, 120, 10, "Cycle Color Scheme", function()
2130
2131 if AB.NumberVars.ColorScheme < #AB.DefaultSchemes then
2132
2133 AB.NumberVars.ColorScheme = AB.NumberVars.ColorScheme + 1
2134
2135 else
2136
2137 AB.NumberVars.ColorScheme = 1
2138
2139 end
2140
2141
2142
2143 AB.ChangeColorScheme( AB.NumberVars.ColorScheme )
2144
2145end)
2146
2147AB.MakeFunctionButton( General, 235, 10, "Ent marker menu", AB.EntMarkerMenu )
2148
2149
2150
2151AB.MakeToggleButton( Utility, 5, 10, "Autoclick", "Autoclick", "Auto Mouse Click", "Make your mouse buttons fire at the maximum possible speed when holding them down")
2152
2153AB.MakeToggleButton( Utility, 120, 10, "Bhop", "Bhop", "Auto Bhop")
2154
2155AB.MakeToggleButton( Utility, 235, 10, "Rope-Nado", "RopeStorm", "Rope-Nado", "Right click with rope tool out to spam a fuckton of ropes")
2156
2157AB.MakeToggleButton( Utility, 350, 10, "Triggerbot", "Triggerbot", "Triggerbot", "Automatically pull the trigger when you look at somebody")
2158
2159AB.MakeToggleButton( Utility, 5, 40, "Third Person", "Thirdperson", "Third Person Camera")
2160
2161--AB.MakeToggleButton( Utility, 5, 120, "Camera Spam", "CameraSpam", "Camera Spam")
2162
2163AB.MakeToggleButton( Utility, 120, 120, "No Recoil", "NoRecoil", "No Recoil", "Prevents weapons from changing your eye angles")
2164
2165AB.MakeToggleButton( Utility, 235, 120, "Flashlight Spam", "FlashlightSpam", "Flashlight Spam", "Press F to party hard")
2166
2167AB.MakeSlider( Utility, 120, 40, 160, "TPS Distance", 0, 1000, "TPSDistance" )
2168
2169AB.MakeSlider( Utility, 285, 40, 175, "TPS Offset", -100, 100, "TPSOffset" )
2170
2171
2172
2173AB.MakeToggleButton( Utility, 5, 90, "Name Changer Script", "NameStealer", "Name Change Script", "Enables or disabled the name change helper script, corrects malfunctions present in odiums name change command")
2174
2175AB.MakeFunctionButton( Utility, 350, 90, "Disable NameStealer", AB.NameStealerShutoff )
2176
2177
2178
2179AB.MakeFunctionButton( Utility, 5, 150, "Inspect your Gun", AB.GunMenu, "Show a massive TLDR page of information about the gun in your hands" )
2180
2181AB.MakeFunctionButton( Utility, 120, 150, "Entity Scanner", AB.ToggleEntityScanner, "Get detailed information and easily perform actions on entities under your cursor (use C menu for best effect)" )
2182
2183
2184
2185AB.MakeToggleButton( Utility, 350, 120, "Notify Kills", "NotifyKills", "Notify Kills in Chat", "Prints kills to your chat window")
2186
2187--AB.Vars.NotifyKills
2188
2189
2190
2191AB.MakeToggleButton( Utility, 5, 210, "Chat Spammer", "ChatSpam", "Chat Spammer", "Spam chat and piss everybody off")
2192
2193AB.MakeToggleButton( Utility, 120, 210, "Auto OOC", "ChatSpamOOC", "Auto OOC chatspam", "Automatically make your chat spam in OOC mode in darkrp and most other rp gamemodes")
2194
2195AB.MakeToggleButton( Utility, 235, 210, "Bind Mode", "ChatSpamBind", "Bind Mode (L ALT)", "You only chatspam when left alt is pressed")
2196
2197--AB.MakeToggleButton( Utility, 350, 210, "Random Insults", "ChatSpamInsult", "Chatspam Random Insults", "Shower randomly generated abuse on everybody")
2198
2199AB.MakeToggleButton( Utility, 350, 180, "/PM Mode", "ChatSpamPM", "/PM Spam Mode", "Spams /pm messages to everybody on the server")
2200
2201AB.MakeToggleButton( Utility, 350, 210, "/PM Admins", "ChatSpamPMAdmins", "/PM Spam Target Admins", "Should we /pm spam admins?")
2202
2203
2204
2205AB.MakeFunctionButton( Utility, 235, 180, "Chatspam Help", function()
2206
2207 AB.ChatText( "Printed chatspam formatting info to console", Color(255,255,255) )
2208
2209 print( "---- CHAT SPAMMER PATTERN MATCHES ----" )
2210
2211 print( "@1 = Random insult" )
2212
2213 print( "@2 = Angry insult" )
2214
2215 print( "@3 = Admin insult" )
2216
2217 print( "@4 = CSGO skid gibberish" )
2218
2219 print( "@opener = Insult opening line" )
2220
2221 print( "@joiner = Insult joining line" )
2222
2223 print( "@slur = Random racist/sexist/fucking hilarious slur" )
2224
2225 print( "PUT THESE IN THE CHATSPAMMER TEXT FIELD AND THEY WILL BE AUTOMATICALLY FORMATTED INTO RANDOMLY GENERATED TEXT")
2226
2227end, "HALP HOW I USE DIS" )
2228
2229
2230
2231AB.MakeFunctionButton( Utility, 5, 300, "Dodge RP Admins", AB.InnocentRoleplayer, "You got seen doing something shifty, now its time to get a new identity\nSuicides and randomizes your rpname, job and player colours\nBind a key to ace_innocent_roleplayer to trigger quickly" )
2232
2233AB.MakeFunctionButton( Utility, 120, 300, "Random RPname", AB.GenerateRPName, "Like you can be arsed thinking up a good rpname, this one will generate a random one for you" )
2234
2235AB.MakeFunctionButton( Utility, 235, 300, "RandomRPname (fem)", AB.GenerateRPNameFemale, "You want to become a girl so you can take cocks up your ass and still call yourself straight" )
2236
2237AB.MakeToggleButton( Utility, 5, 330, "RP Demote Spam", "DemoteSpam", "Spam /Demote requests", "Demote everybody on the server from their shitty jobs")
2238
2239AB.MakeToggleButton( Utility, 120, 330, "RP Wanted Spam", "WantedSpam", "Spam /Wanted requests", "Make everybody wanted by the police")
2240
2241AB.MakeToggleButton( Utility, 235, 330, "ULX Vkick Spam", "ULXVotekickSpam", "Spam ulx votekicks", "Votekick everybody on the server :^)")
2242
2243AB.MakeToggleButton( Utility, 350, 330, "ULX Vban Spam", "ULXVotebanSpam", "Spam ulx votebans", "Voteban everybody on the server :^)")
2244
2245AB.MakeToggleButton( Utility, 5, 360, "Bhop Auto Strafe", "BhopAutostrafe", "Bhop Auto Strafe", "Presses A and D for you when you move your mouse, you lazy fuck")
2246
2247AB.MakeToggleButton( Utility, 120, 360, "Kill Taunts", "KillTaunts", "Kill Taunts", "Let acebot automatically talk smack for you whenever you kill somebody")
2248
2249AB.MakeToggleButton( Utility, 235, 360, "Death Taunts", "DeathTaunts", "Death Taunts", "Automatic chat rage when you die")
2250
2251
2252
2253AB.MakeFunctionButton( Utility, 5, 450, "Set Base", function() RunConsoleCommand("ace_base_set") end, "Set a home base location to warn you if people go near it" )
2254
2255AB.MakeFunctionButton( Utility, 120, 450, "Remove Base", function() RunConsoleCommand("ace_base_remove") end, "Delete your base" )
2256
2257AB.MakeToggleButton( Utility, 350, 420, "Keypad Jew", "KeypadJew", "Keypad Code Stealer", "Your a sneaky jew stealing peoples keypad codes and busting into their base")
2258
2259
2260
2261AB.MakeToggleButton( Utility, 5, 420, "RP Arrest Dodger", "DodgeArrest", "Get out of jail free card", "Automatically suicide if somebody tries to hit you with an arrest baton")
2262
2263AB.MakeToggleButton( Utility, 120, 420, "New RPname on Death", "NewLifeRule", "Choose new RPname when killed", "Make things extra confusing for cuntmins")
2264
2265--AB.MakeToggleButton( Utility, 235, 420, "Dodge Physgun", "DontTouchMeThere", "Suicide When PhysGunned", "Don't touch me there, that's my private place")
2266
2267
2268
2269
2270
2271AB.MakeToggleButton( Botsettings, 5, 10, "Toggle Aimbot", "Aimbot", "Aimbot", "Sup pussy ass white boi how bout i come to ur base and fuck ur girl u little bitch, imma shoot lazers all up in this place pew pew nigga")
2272
2273AB.MakeToggleButton( Botsettings, 120, 10, "Snap on Shoot Only", "SnapOnFire", "Aimbot only snaps when firing", "Makes things a little bit more sneeki breeki")
2274
2275AB.MakeToggleButton( Botsettings, 5, 40, "Auto Shoot", "AutoShoot", "Aimbot Auto-Shoot", "Your aimbot is now doing all the work for you, you may as well afk and masturbate")
2276
2277AB.MakeToggleButton( Botsettings, 235, 70, "Auto Trigger", "AutoTrigger", "Aimbot Auto-Trigger", "Spams the trigger on semi auto weapons when locked on and holding left click")
2278
2279AB.MakeToggleButton( Botsettings, 120, 40, "Snap on Bind Only", "AimbotBindMode", "Aimbot snap only when bind pressed", "Extra protection against accidentally fucking yourself over when trying to play >legit")
2280
2281--AB.MakeToggleButton( Botsettings, 235, 40, "Shoot Through Walls", "AimbotShootThroughWalls", "Aimbot shoot through walls", "Target people through walls?")
2282
2283AB.MakeToggleButton( Botsettings, 235, 40, "M9K Wallbanger", "AimbotWallbanger", "Aimbot shoot through walls (m9k)", "Lock on to people if the current gun is able to penetrate the wall/object they are hiding behind")
2284
2285AB.MakeToggleButton( Botsettings, 235, 10, "Draw Target Position", "PreviewTarget", "Draw Target Lock Position", "Shows the current/next position the aimbot is locking on to")
2286
2287AB.MakeToggleButton( Botsettings, 350, 10, "Compensate Spread", "CompSpread", "Compensate Bullet Spread", "Basically cac undetected nospread. Works with m9k, hl2 weps, ttt weps and some simple weapon bases. Does not work with fas2 or cw2")
2288
2289AB.MakeToggleButton( Botsettings, 350, 40, "Silent Aim", "SilentAim", "Silent Aim", "Makes it far less obvious that you are aimbotting")
2290
2291AB.MakeToggleButton( Botsettings, 350, 70, "Adaptive Targeting", "AimbotAdaptiveTarget", "Aimbot Adaptive Targeting", "Shoot at any part of their body that is exposed, not just their head. Absolute rape when paired with comp spread and wallbanger")
2292
2293
2294
2295AB.MakeToggleButton( Botsettings, 5, 160, "Target Friends", "TargetFriends", "Aimbot Target Friends", "Do you really want to betray your buddies like this? :(")
2296
2297AB.MakeToggleButton( Botsettings, 120, 160, "Target Admins", "TargetAdmins", "Aimbot Target Admins", "Milk some darkrp admin tears")
2298
2299AB.MakeToggleButton( Botsettings, 235, 160, "Target Same Team", "TargetSameTeam", "Aimbot Target Same Team", "Do you want to betray your team?")
2300
2301AB.MakeToggleButton( Botsettings, 350, 160, "Target Highlighted", "TargetHighlighted", "Aimbot Target Highlighted targets", "For killing those special high priority targets")
2302
2303AB.MakeToggleButton( Botsettings, 120, 190, "Target Noclippers", "TargetNoclippers", "Aimbot Target People in Noclip", "You usually can't kill them anyway so why bother?")
2304
2305AB.MakeToggleButton( Botsettings, 5, 190, "Prefer Headshots", "AimbotTargetMode", "Aimbot Target Heads", "Target heads or go straight for centre of mass?")
2306
2307AB.MakeToggleButton( Botsettings, 235, 190, "Sticky Targeting", "AimbotStickyLock", "Sticky Targeting", "Aimbot will not switch target until the current target is dead, out of FOV or no longer visible")
2308
2309--AB.MakeToggleButton( Botsettings, 5, 190, "Prefer Headshots", "AimbotTargetMode", "Aimbot Target Heads", "Target heads or go straight for centre of mass?")
2310
2311
2312
2313
2314
2315local tttt = vgui.Create( "DLabel", Botsettings )
2316
2317tttt:SetPos( 25, 228 )
2318
2319tttt:SetText( "Aimbot Bind Key:" )
2320
2321tttt:SizeToContents()
2322
2323
2324
2325AB.MakeKeyBinder( Botsettings, 120, 220, 110, 30, "AimbotBindKey", "aimbot" )
2326
2327
2328
2329AB.MakeSlider( Botsettings, 5, 70, 210, "Smooth Aim", 0, 50, "AimbotSmooth" )
2330
2331AB.MakeSlider( Botsettings, 5, 100, 210, "Max Distance", 0, 9999, "AimbotDist" )
2332
2333AB.MakeSlider( Botsettings, 225, 100, 220, "Targeting FOV", 0.1, 180, "AimbotMaxFOV" )
2334
2335
2336
2337
2338
2339local TextEntry = vgui.Create( "DTextEntry", Utility )
2340
2341TextEntry:SetPos( 120, 90 )
2342
2343TextEntry:SetSize( 195, 25 )
2344
2345TextEntry:SetText( AB.NameStealName )
2346
2347TextEntry.OnEnter = function( self )
2348
2349AB.NameStealName = self:GetValue()
2350
2351if AB.Vars.Notifications then AB.ChatText( "Set my name to: "..self:GetValue(), Color(255,255,255) ) end
2352
2353end
2354
2355
2356
2357local TextEntry = vgui.Create( "DTextEntry", Utility )
2358
2359TextEntry:SetPos( 5, 240 )
2360
2361TextEntry:SetSize( 450, 25 )
2362
2363TextEntry:SetText( AB.ChatSpamText )
2364
2365TextEntry.OnEnter = function( self )
2366
2367AB.ChatSpamText = self:GetValue()
2368
2369if AB.Vars.Notifications then AB.ChatText( "Set my chatspam message to: "..self:GetValue(), Color(255,255,255) ) end
2370
2371end
2372
2373
2374
2375
2376
2377AB.MakeFunctionButton( Debug, 5, AceMenu:GetTall() - 110, "Clear Console", function() table.Empty(AB.Debug) end)
2378
2379AB.MakeFunctionButton( Debug, 120, AceMenu:GetTall() - 110, "Print Changelog", function()
2380
2381 AB.DebugLog( "", Color(0,0,0) )
2382
2383 AB.DebugLog( "Acebot current version: "..AB.Version, Color(155,255,155) )
2384
2385 AB.DebugLog( "", Color(0,0,0) )
2386
2387 local tt = 200
2388
2389 for k, v in SortedPairs(AB.Changelog, false) do AB.DebugLog( v, Color(tt, tt, tt + 30) ) tt = math.Clamp(tt - 10, 100, 200) end
2390
2391end)
2392
2393--AB.MakeFunctionButton( Debug, 235, Menu:GetTall() - 110, "Game Event Logging", function() end)
2394
2395--AB.MakeFunctionButton( Debug, 350, Menu:GetTall() - 110, "Extensive Logging", function() end)
2396
2397
2398
2399PropertySheet:AddSheet( "Vision", General, "icon16/zoom.png", false, false, "ESP/Xray/HUD settings" )
2400
2401--PropertySheet:AddSheet( "Vision Advanced", General2, "icon16/zoom_in.png", false, false, "ESP/Xray/HUD settings" )
2402
2403PropertySheet:AddSheet( "Utility", Utility, "icon16/wrench.png", false, false, "Tools and utilities" )
2404
2405PropertySheet:AddSheet( "Aimbot", Botsettings, "icon16/bomb.png", false, false, "Aimbot settings" )
2406
2407PropertySheet:AddSheet( "Exploit", Exploit, "icon16/bug.png", false, false, "Lua Exploit settings" )
2408
2409PropertySheet:AddSheet( "Backdoor", Backdoor, "icon16/door_in.png", false, false, "Control panel for the Wraithnet/HTX serverside backdoor" )
2410
2411PropertySheet:AddSheet( "Debug", Debug, "icon16/printer.png", false, false, "Acebot debug settings" )
2412
2413
2414
2415end
2416
2417concommand.Add("ace_menu", AB.Menu)
2418
2419
2420
2421
2422
2423------------------------------------------------------------------------DEBUG CONSOLE SHIT--------------------------------------------------------------------------------------
2424
2425
2426
2427
2428
2429
2430
2431function AB.DebugLog( str, col )
2432
2433table.insert(AB.Debug, {str, col})
2434
2435if #AB.Debug > 40 then
2436
2437 table.remove( AB.Debug, 1 )
2438
2439end
2440
2441end
2442
2443
2444
2445------------------------------------------------------------------------ENT MARKER MENU--------------------------------------------------------------------------------------
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461local OtherEnts = {}
2462
2463
2464
2465function AB.EntMarkerMenu()
2466
2467if EMenu then return end
2468
2469
2470
2471table.Empty(OtherEnts)
2472
2473for k,v in pairs(ents.GetAll()) do
2474
2475 local addToAllEnts = true
2476
2477
2478
2479 for i,p in pairs(AB.MarkedEnts) do
2480
2481 if p == v:GetClass() then
2482
2483 addToAllEnts = false
2484
2485 end
2486
2487 end
2488
2489
2490
2491 for i,p in pairs(OtherEnts) do
2492
2493 if p == v:GetClass() then
2494
2495 addToAllEnts = false
2496
2497 end
2498
2499 end
2500
2501
2502
2503 if addToAllEnts then
2504
2505 table.insert(OtherEnts, v:GetClass())
2506
2507 end
2508
2509end
2510
2511
2512
2513local EMenu = vgui.Create("DFrame")
2514
2515EMenu:SetSize(500,485)
2516
2517EMenu:SetTitle("Entity marker menu")
2518
2519EMenu:Center()
2520
2521EMenu:MakePopup()
2522
2523
2524
2525EMenu.Paint = function()
2526
2527surface.SetDrawColor( Color(50, 50, 90, 255) )
2528
2529surface.DrawRect( 0, 0, EMenu:GetWide(), EMenu:GetTall() )
2530
2531surface.SetDrawColor( Color(155, 155, 155, 255) )
2532
2533surface.DrawOutlinedRect( 0, 0, EMenu:GetWide(), EMenu:GetTall() )
2534
2535surface.DrawOutlinedRect( 1, 1, EMenu:GetWide() - 2, EMenu:GetTall() - 2 )
2536
2537surface.SetDrawColor( Color(0, 0, 0, 200) )
2538
2539surface.DrawRect( 10, 25, EMenu:GetWide() - 20, EMenu:GetTall() - 35 )
2540
2541end
2542
2543
2544
2545
2546
2547DermaList = vgui.Create( "DPanelList", EMenu )
2548
2549 DermaList:SetPos( 25,35 )
2550
2551 DermaList:SetSize( 500, 400 )
2552
2553 DermaList:SetSpacing( 75 )
2554
2555 DermaList:EnableHorizontal( false )
2556
2557 DermaList:EnableVerticalScrollbar( true )
2558
2559
2560
2561 local SelectedEnts = vgui.Create("DListView")
2562
2563 SelectedEnts:SetSize(220, 335)
2564
2565 SelectedEnts:SetPos(0, 0)
2566
2567 SelectedEnts:SetMultiSelect(false)
2568
2569 SelectedEnts:AddColumn("Ents to show")
2570
2571 for k,v in SortedPairs(AB.MarkedEnts, false) do
2572
2573 SelectedEnts:AddLine(v)
2574
2575 end
2576
2577 SelectedEnts.DoDoubleClick = function(parent, index, list)
2578
2579 table.remove(AB.MarkedEnts, index)
2580
2581 EMenu:rebuildlists()
2582
2583 end
2584
2585 DermaList:Add(SelectedEnts)
2586
2587
2588
2589 local AllEnts = vgui.Create("DListView")
2590
2591 AllEnts:SetSize(220, 335)
2592
2593 AllEnts:SetPos(230, 0)
2594
2595 AllEnts:SetMultiSelect(false)
2596
2597 AllEnts:AddColumn("Ents not to show")
2598
2599 for k,v in SortedPairs(OtherEnts, false) do
2600
2601 AllEnts:AddLine(v)
2602
2603 end
2604
2605 AllEnts.DoDoubleClick = function(parent, index, panel )
2606
2607 table.insert(AB.MarkedEnts, OtherEnts[index])
2608
2609 EMenu:rebuildlists()
2610
2611 end
2612
2613DermaList:Add(AllEnts)
2614
2615
2616
2617
2618
2619function EMenu:rebuildlists()
2620
2621 table.Empty(OtherEnts)
2622
2623 for k,v in pairs(ents.GetAll()) do
2624
2625 local addToAllEnts = true
2626
2627
2628
2629 for i,p in pairs(AB.MarkedEnts) do
2630
2631 if p == v:GetClass() then
2632
2633 addToAllEnts = false
2634
2635 end
2636
2637 end
2638
2639
2640
2641 for i,p in pairs(OtherEnts) do
2642
2643 if p == v:GetClass() then
2644
2645 addToAllEnts = false
2646
2647 end
2648
2649 end
2650
2651
2652
2653 if addToAllEnts then
2654
2655 table.insert(OtherEnts, v:GetClass())
2656
2657 end
2658
2659 end
2660
2661
2662
2663 AllEnts:Clear()
2664
2665 SelectedEnts:Clear()
2666
2667 for k,v in SortedPairs(OtherEnts, false) do
2668
2669 AllEnts:AddLine( v )
2670
2671 end
2672
2673 for k,v in SortedPairs(AB.MarkedEnts, false) do
2674
2675 SelectedEnts:AddLine( v )
2676
2677 end
2678
2679end
2680
2681
2682
2683
2684
2685AB.MakeFunctionButton( EMenu, 25, 380, "Find all Printers", function()
2686
2687 for k,v in pairs(ents.GetAll()) do
2688
2689 if string.find(v:GetClass(), "print") and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
2690
2691 table.insert(AB.MarkedEnts, v:GetClass())
2692
2693 end
2694
2695 end
2696
2697EMenu:rebuildlists()
2698
2699end, "Finds everything that looks like a money printer")
2700
2701
2702
2703AB.MakeFunctionButton( EMenu, 140, 380, "Find all Weapons", function()
2704
2705 for k,v in pairs(ents.GetAll()) do
2706
2707 if (string.find(v:GetClass(), "weap") or string.find(v:GetClass(), "fas2") or string.find(v:GetClass(), "m9k")) and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
2708
2709 table.insert(AB.MarkedEnts, v:GetClass())
2710
2711 end
2712
2713 end
2714
2715EMenu:rebuildlists()
2716
2717end, "Finds everything that looks like a weapon")
2718
2719
2720
2721AB.MakeFunctionButton( EMenu, 255, 380, "Find all Vehicles", function()
2722
2723 for k,v in pairs(ents.GetAll()) do
2724
2725 if v:IsVehicle() and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
2726
2727 table.insert(AB.MarkedEnts, v:GetClass())
2728
2729 end
2730
2731 end
2732
2733EMenu:rebuildlists()
2734
2735end, "Finds everything that looks like a vehicle")
2736
2737
2738
2739AB.MakeFunctionButton( EMenu, 370, 380, "Find all Loot", function()
2740
2741 for k,v in pairs(ents.GetAll()) do
2742
2743 if (string.find(v:GetClass(), "item") or string.find(v:GetClass(), "loot")) and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
2744
2745 table.insert(AB.MarkedEnts, v:GetClass())
2746
2747 end
2748
2749 end
2750
2751EMenu:rebuildlists()
2752
2753end, "Finds everything that looks like loot items (generally only useful for gmod dayz, after the end etc)")
2754
2755
2756
2757AB.MakeFunctionButton( EMenu, 25, 410, "Find all RP Goodies", function()
2758
2759 for k,v in pairs(ents.GetAll()) do
2760
2761 if v:GetClass() == "spawned_shipment" or v:GetClass() == "spawned_money" or v:GetClass() == "spawned_weapon" or v:GetClass() == "spawned_ammo" or v:GetClass() == "spawned_food" and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
2762
2763 table.insert(AB.MarkedEnts, v:GetClass() )
2764
2765 end
2766
2767 end
2768
2769EMenu:rebuildlists()
2770
2771end, "Finds all darkrp goodies (guns, money, shipments etc)")
2772
2773
2774
2775AB.MakeFunctionButton( EMenu, 370, 410, "Clear List", function()
2776
2777AB.MarkedEnts = {}
2778
2779EMenu:rebuildlists()
2780
2781end, "Clears the entfinder list")
2782
2783
2784
2785local turd = vgui.Create( "DLabel", EMenu )
2786
2787turd:SetPos( 25, 447 )
2788
2789turd:SetText( "Search for classes: " )
2790
2791turd:SizeToContents()
2792
2793
2794
2795local target4 = vgui.Create( "DTextEntry", EMenu )
2796
2797target4:SetPos( 125, 442 )
2798
2799target4:SetSize( 255, 25 )
2800
2801target4:SetText( "" )
2802
2803target4.OnChange = function( self )
2804
2805 local nam = self:GetValue()
2806
2807 if nam == "" then
2808
2809 AB.MarkedEnts = {}
2810
2811 EMenu:rebuildlists()
2812
2813 return
2814
2815 end
2816
2817 local namtab = string.Explode( ", ", nam )
2818
2819 AB.MarkedEnts = {}
2820
2821 for _, en in pairs( ents.GetAll() ) do
2822
2823 for _, s in pairs( namtab ) do
2824
2825 if string.find( string.lower( en:GetClass() ), s, 1, true ) then
2826
2827 if !table.HasValue( AB.MarkedEnts, en:GetClass() ) then table.insert( AB.MarkedEnts, en:GetClass() ) end
2828
2829 end
2830
2831 end
2832
2833 end
2834
2835 EMenu:rebuildlists()
2836
2837end
2838
2839
2840
2841end
2842
2843concommand.Add("ace_ents", AB.EntMarkerMenu)
2844
2845
2846
2847
2848
2849
2850
2851------------------------------------------------------------------------PLAYERS MENU--------------------------------------------------------------------------------------
2852
2853
2854
2855
2856
2857function AB.PlayerMenu()
2858
2859if PMenu then return end
2860
2861
2862
2863local PMenu = vgui.Create("DFrame")
2864
2865PMenu:SetSize(590,420)
2866
2867PMenu:SetTitle("Players menu")
2868
2869PMenu:Center()
2870
2871PMenu:MakePopup()
2872
2873
2874
2875PMenu.Paint = function()
2876
2877surface.SetDrawColor( Color(50, 50, 90, 255) )
2878
2879surface.DrawRect( 0, 0, PMenu:GetWide(), PMenu:GetTall() )
2880
2881surface.SetDrawColor( Color(155, 155, 155, 255) )
2882
2883surface.DrawOutlinedRect( 0, 0, PMenu:GetWide(), PMenu:GetTall() )
2884
2885surface.DrawOutlinedRect( 1, 1, PMenu:GetWide() - 2, PMenu:GetTall() - 2 )
2886
2887surface.SetDrawColor( Color(0, 0, 0, 200) )
2888
2889surface.DrawRect( 10, 25, PMenu:GetWide() - 20, PMenu:GetTall() - 35 )
2890
2891end
2892
2893
2894
2895
2896
2897local Plist = vgui.Create( "DPanelList", PMenu )
2898
2899Plist:SetSize( 560, 370 )
2900
2901Plist:SetPadding( 5 )
2902
2903Plist:SetSpacing( 5 )
2904
2905Plist:EnableHorizontal( false )
2906
2907Plist:EnableVerticalScrollbar( true )
2908
2909Plist:SetPos( 10, 25 )
2910
2911Plist:SetName( "" )
2912
2913
2914
2915for k, v in pairs( player.GetAll() ) do
2916
2917if v == LocalPlayer() then continue end
2918
2919
2920
2921 local plypanel2 = vgui.Create( "DPanel" )
2922
2923 plypanel2:SetPos( 0, 0 )
2924
2925 plypanel2:SetSize( 480, 40 )
2926
2927 plypanel2.Paint = function() -- Paint function
2928
2929 draw.RoundedBoxEx(8,1,1,plypanel2:GetWide(),plypanel2:GetTall(),Color(0, 0, 0, 150), false, false, false, false)
2930
2931 surface.SetDrawColor(Color(50, 50, 90, 255))
2932
2933 surface.DrawOutlinedRect(1, 1, plypanel2:GetWide() - 1 , plypanel2:GetTall() - 1)
2934
2935 end
2936
2937
2938
2939 local plyname = vgui.Create( "DLabel", plypanel2 )
2940
2941 plyname:SetPos( 15, 5 )
2942
2943 plyname:SetFont( "Trebuchet18" )
2944
2945 plyname:SetColor( team.GetColor(v:Team()) )
2946
2947 plyname:SetText( "Name: "..v:Nick() )
2948
2949 plyname:SetSize(180, 15)
2950
2951
2952
2953 if AB.GetRank(v) != ( "user" or "guest" or "player" ) then
2954
2955 local rtxt = vgui.Create( "DLabel", plypanel2 )
2956
2957 rtxt:SetPos( 15, 20 )
2958
2959 rtxt:SetFont( "Trebuchet18" )
2960
2961 rtxt:SetColor( Color(255,100,0,255) )
2962
2963 rtxt:SetText( "Rank: "..AB.GetRank(v) )
2964
2965 rtxt:SetSize(180, 15)
2966
2967 end
2968
2969
2970
2971 local faggot = vgui.Create("DButton", plypanel2)
2972
2973 faggot:SetSize( 45, 25 )
2974
2975 faggot:SetPos( 250, 8 )
2976
2977 faggot:SetText("Profile")
2978
2979 faggot:SetTextColor(Color(255, 255, 255, 255))
2980
2981 faggot.Paint = function(panel, w, h)
2982
2983 surface.SetDrawColor(100, 100, 200 ,255)
2984
2985 surface.DrawOutlinedRect(0, 0, w, h)
2986
2987 surface.SetDrawColor(0, 0, 50 ,155)
2988
2989 surface.DrawRect(0, 0, w, h)
2990
2991 end
2992
2993 faggot.DoClick = function()
2994
2995 AB.ChatText( "Opened steam profile of: "..v:Nick().." ("..v:SteamID()..")", Color(255,255,255) )
2996
2997 v:ShowProfile()
2998
2999 surface.PlaySound("buttons/button7.wav")
3000
3001 end
3002
3003
3004
3005 local faggot = vgui.Create("DButton", plypanel2)
3006
3007 faggot:SetSize( 45, 25 )
3008
3009 faggot:SetPos( 300, 8 )
3010
3011 faggot:SetText("Mute")
3012
3013 faggot:SetTextColor(Color(255, 255, 255, 255))
3014
3015 faggot.Paint = function(panel, w, h)
3016
3017 if !v:IsValid() then return end
3018
3019 if v:IsMuted() then
3020
3021 surface.SetDrawColor(200, 100, 000 ,255)
3022
3023 else
3024
3025 surface.SetDrawColor(100, 100, 200 ,255)
3026
3027 end
3028
3029 surface.DrawOutlinedRect(0, 0, w, h)
3030
3031 surface.SetDrawColor(0, 0, 50 ,155)
3032
3033 surface.DrawRect(0, 0, w, h)
3034
3035 end
3036
3037 faggot.DoClick = function()
3038
3039 v:SetMuted( !v:IsMuted() )
3040
3041 if v:IsMuted() then AB.ChatText( "Voice muted: "..v:Nick(), Color(255,255,255) ) else AB.ChatText( "Unmuted: "..v:Nick(), Color(255,255,255) ) end
3042
3043 surface.PlaySound("buttons/button7.wav")
3044
3045 end
3046
3047
3048
3049 local faggot = vgui.Create("DButton", plypanel2)
3050
3051 faggot:SetSize( 60, 25 )
3052
3053 faggot:SetPos( 350, 8 )
3054
3055 faggot:SetText("Namesteal")
3056
3057 faggot:SetTextColor(Color(255, 255, 255, 255))
3058
3059 faggot.Paint = function(panel, w, h)
3060
3061 if AB.NameStealPlayer == v then
3062
3063 surface.SetDrawColor(100, 200, 100 ,255)
3064
3065 else
3066
3067 surface.SetDrawColor(100, 100, 200 ,255)
3068
3069 end
3070
3071 surface.DrawOutlinedRect(0, 0, w, h)
3072
3073 surface.SetDrawColor(0, 0, 50 ,155)
3074
3075 surface.DrawRect(0, 0, w, h)
3076
3077 end
3078
3079 faggot.DoClick = function()
3080
3081 if AB.NameStealPlayer == v then AB.NameStealPlayer = LocalPlayer() AB.ChatText( "Cleared name stealer target", Color(255,255,255) ) return end
3082
3083 AB.NameStealPlayer = v
3084
3085 AB.ChatText( "Set name stealer target to: "..v:Nick(), Color(255,255,255) )
3086
3087 surface.PlaySound("buttons/button7.wav")
3088
3089 end
3090
3091
3092
3093 local faggot = vgui.Create("DButton", plypanel2)
3094
3095 faggot:SetSize( 60, 25 )
3096
3097 faggot:SetPos( 415, 8 )
3098
3099 faggot:SetText("Highlight")
3100
3101 faggot:SetTextColor(Color(255, 255, 255, 255))
3102
3103 faggot.Paint = function(panel, w, h)
3104
3105 if AB.IsTarget( v ) then
3106
3107 surface.SetDrawColor(100, 200, 100 ,255)
3108
3109 else
3110
3111 surface.SetDrawColor(100, 100, 200 ,255)
3112
3113 end
3114
3115 surface.DrawOutlinedRect(0, 0, w, h)
3116
3117 surface.SetDrawColor(0, 0, 50 ,155)
3118
3119 surface.DrawRect(0, 0, w, h)
3120
3121 end
3122
3123 faggot.DoClick = function()
3124
3125 if AB.IsTarget( v ) then AB.RemoveTarget(v) else AB.AddTarget(v) end
3126
3127 surface.PlaySound("buttons/button7.wav")
3128
3129 end
3130
3131
3132
3133 local faggot = vgui.Create("DButton", plypanel2)
3134
3135 faggot:SetSize( 60, 25 )
3136
3137 faggot:SetPos( 480, 8 )
3138
3139 faggot:SetText("Friendly")
3140
3141 faggot:SetTextColor(Color(255, 255, 255, 255))
3142
3143 faggot.Paint = function(panel, w, h)
3144
3145 if AB.IsFriend( v ) then
3146
3147 surface.SetDrawColor(100, 200, 100 ,255)
3148
3149 else
3150
3151 surface.SetDrawColor(100, 100, 200 ,255)
3152
3153 end
3154
3155 surface.DrawOutlinedRect(0, 0, w, h)
3156
3157 surface.SetDrawColor(0, 0, 50 ,155)
3158
3159 surface.DrawRect(0, 0, w, h)
3160
3161 end
3162
3163 faggot.DoClick = function()
3164
3165 if AB.IsFriend( v ) then AB.RemoveFriend(v) else AB.AddFriend(v) end
3166
3167 surface.PlaySound("buttons/button7.wav")
3168
3169 end
3170
3171
3172
3173
3174
3175 Plist:AddItem( plypanel2 )
3176
3177
3178
3179end
3180
3181
3182
3183
3184
3185end
3186
3187concommand.Add("ace_players", AB.PlayerMenu)
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203------------------------------------------------------------------------BIG MEMES----------------------------------------------------------------------------------------
3204
3205
3206
3207
3208
3209
3210
3211function AB.IsMessagePooled( netmessage )
3212
3213status, error = pcall(net.Start,netmessage)
3214
3215return status
3216
3217end
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227------------------------------------------------------------------------DANK NOSPREAD----------------------------------------------------------------------------------------
3228
3229
3230
3231
3232
3233
3234
3235function AB.GetGenericCone( cmd )
3236
3237 local ply = LocalPlayer()
3238
3239 local gun = ply:GetActiveWeapon()
3240
3241 if !gun.Primary or !gun.Primary.Cone then return Angle( 0, 0, 0 ) end
3242
3243 local meme = gun.Primary.Cone
3244
3245 local meme2 = Vector( meme, meme, meme )
3246
3247 local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme2 )
3248
3249 return cone
3250
3251end
3252
3253
3254
3255function AB.GetM9kCone( cmd )
3256
3257 local ply = LocalPlayer()
3258
3259 local gun = ply:GetActiveWeapon()
3260
3261 if !gun.Primary or !gun.Primary.Spread or !gun.Primary.IronAccuracy then return Angle( 0, 0, 0 ) end
3262
3263 local meme = gun.Primary.Spread
3264
3265 if (gun:GetIronsights() == true) and ply:KeyDown(IN_ATTACK2) then meme = gun.Primary.IronAccuracy end
3266
3267 local meme2 = Vector( meme, meme, meme )
3268
3269 local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme2 )
3270
3271 return cone
3272
3273end
3274
3275
3276
3277
3278
3279local td = {}
3280
3281local function dospread()
3282
3283 local ply = LocalPlayer()
3284
3285 local gun = ply:GetActiveWeapon()
3286
3287 local vel = ply:GetVelocity():Length()
3288
3289
3290
3291 aim = ply:GetAimVector()
3292
3293
3294
3295 if not ply.LastView then
3296
3297 ply.LastView = aim
3298
3299 ply.ViewAff = 0
3300
3301 else
3302
3303 ply.ViewAff = Lerp(0.25, ply.ViewAff, (aim - ply.LastView):Length() * 0.5)
3304
3305 ply.LastView = aim
3306
3307 end
3308
3309
3310
3311 cone = gun.HipCone * (cr and 0.75 or 1) * (gun.dt.Bipod and 0.3 or 1)
3312
3313
3314
3315 if gun.dt.Status == FAS_STAT_ADS then
3316
3317 td.start = ply:GetShootPos()
3318
3319 td.endpos = td.start + aim * 30
3320
3321 td.filter = ply
3322
3323
3324
3325 tr = util.TraceLine(td)
3326
3327
3328
3329 if tr.Hit then
3330
3331 return Angle(0,0,0)
3332
3333 else
3334
3335 cone = gun.AimCone
3336
3337 end
3338
3339 end
3340
3341
3342
3343 return math.Clamp(cone + gun.AddSpread * (gun.dt.Bipod and 0.5 or 1) + (vel / 10000 * gun.VelocitySensitivity) * (gun.dt.Status == FAS_STAT_ADS and 0.25 or 1) + ply.ViewAff, 0, 0.09 + gun.MaxSpreadInc)
3344
3345
3346
3347end
3348
3349
3350
3351
3352
3353function AB.GetFags2Cone( cmd )
3354
3355 local ply = LocalPlayer()
3356
3357 local gun = ply:GetActiveWeapon()
3358
3359 local newang = ply:GetPunchAngle()
3360
3361 math.randomseed( CurTime() )
3362
3363 local cuntcone = gun.CurCone
3364
3365
3366
3367-- newang = newang + (Angle(math.Rand(-cuntcone, cuntcone), math.Rand(-cuntcone, cuntcone), 0) )
3368
3369
3370
3371 return newang
3372
3373-- return LocalPlayer():GetPunchAngle()
3374
3375end
3376
3377
3378
3379--hook.Remove( "EntityFireBullets", "Fags2lmao" )
3380
3381/*
3382
3383hook.Add( "EntityFireBullets", "Fags2lmao", function( ent, data )
3384
3385 local me = LocalPlayer()
3386
3387 local gun = me:GetActiveWeapon()
3388
3389 local oldang = me:EyeAngles()
3390
3391 math.randomseed(CurTime())
3392
3393 local Dir3 = (me:GetPunchAngle() + Angle(math.Rand(-gun.CurCone, gun.CurCone), math.Rand(-gun.CurCone, gun.CurCone), 0) * 25)
3394
3395 print( "hax"..tostring( me:EyeAngles() - Dir3) )
3396
3397-- print( "hax: "..tostring(oldang + -AB.GetFags2Cone( me:GetCurrentCommand() )) )
3398
3399-- me:SetEyeAngles( oldang + -AB.GetFags2Cone( me:GetCurrentCommand() ) )
3400
3401end)
3402
3403*/
3404
3405local hl2guns = {
3406
3407 ["weapon_smg1"] = Vector( 0.04362, 0.04362, 0.04362 ),
3408
3409 ["weapon_ar2"] = Vector( 0.02618, 0.02618, 0.02618 ),
3410
3411 ["weapon_shotgun"] = Vector( 0.08716, 0.08716, 0.08716 ),
3412
3413 ["weapon_pistol"] = Vector( 0.00873, 0.00873, 0.00873 ) ,
3414
3415}
3416
3417
3418
3419function AB.GetHL2Cone( cmd )
3420
3421 local ply = LocalPlayer()
3422
3423 local gun = ply:GetActiveWeapon()
3424
3425 local meme = hl2guns[gun:GetClass()]
3426
3427 local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme )
3428
3429 return cone
3430
3431end
3432
3433
3434
3435function AB.GetCurrentWeaponCone( cmd )
3436
3437 if !odium or !odium.engine or !odium.engine.GetWeaponCone then
3438
3439 AB.ChatText( "Odium main module not present or malfunctioning! Compensated spread will not work!", Color(255,100,0) )
3440
3441 AB.Vars.CompSpread = false
3442
3443 return Angle( 0, 0, 0 )
3444
3445 end
3446
3447 local ply = LocalPlayer()
3448
3449 local gun = ply:GetActiveWeapon()
3450
3451 if hl2guns[gun:GetClass()] or gun:GetClass() == "weapon_pistol" then return AB.GetHL2Cone( cmd ) end
3452
3453 if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9kCone( cmd ) end
3454
3455 if gun.HipCone then return AB.GetFags2Cone( cmd ) end
3456
3457 if gun.Primary and gun.Primary.Cone then return AB.GetGenericCone( cmd ) end
3458
3459 return Angle( 0, 0, 0 )
3460
3461end
3462
3463
3464
3465
3466
3467local penistration = {
3468
3469 ["SniperPenetratedRound"] = 20,
3470
3471 ["pistol"] = 9,
3472
3473 ["357"] = 12,
3474
3475 ["smg1"] = 14,
3476
3477 ["ar2"] = 16,
3478
3479 ["buckshot"] = 5,
3480
3481 ["slam"] = 5,
3482
3483 ["AirboatGun"] = 17,
3484
3485}
3486
3487
3488
3489function AB.GetM9gayPenetration( ply, gun, tr, testent )
3490
3491 if !gun.Penetration then return false end
3492
3493 local ammotyp = gun.Primary.Ammo
3494
3495 local penindex = 14
3496
3497 if penistration[ammotyp] then penindex = penistration[ammotyp] end
3498
3499 if tr.MatType == MAT_METAL and ammotyp != "SniperPenetratedRound" then return false end
3500
3501 penindex = penindex - 0.05 -- precaution so we don't botch extreme range shots
3502
3503
3504
3505 local penissize = tr.Normal * penindex
3506
3507 if (tr.MatType == MAT_GLASS or tr.MatType == MAT_PLASTIC or tr.MatType == MAT_WOOD or tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH) then
3508
3509 penissize = tr.Normal * (penindex * 2)
3510
3511 end
3512
3513
3514
3515 local ntrace = {}
3516
3517 ntrace.endpos = tr.HitPos + tr.Normal * 99999
3518
3519 ntrace.start = tr.HitPos + penissize
3520
3521 ntrace.mask = MASK_SHOT
3522
3523 ntrace.filter = {ply}
3524
3525 local trace = util.TraceLine(ntrace)
3526
3527
3528
3529 if trace.StartSolid or ( trace.Entity and trace.Entity != testent ) then return false end
3530
3531
3532
3533 return true
3534
3535
3536
3537end
3538
3539
3540
3541
3542
3543function AB.CanWeaponPenetrate( tr, testent )
3544
3545 local ply = LocalPlayer()
3546
3547 local gun = ply:GetActiveWeapon()
3548
3549 if !ply:IsValid() or !gun or !gun:IsValid() then return false end
3550
3551 if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9gayPenetration( ply, gun, tr, testent ) end
3552
3553 return false
3554
3555end
3556
3557
3558
3559
3560
3561function AB.IsBabyGod( ply )
3562
3563 if !ply:IsValid() or !ply:Alive() or ply:InVehicle() then return false end
3564
3565 if ply:GetRenderMode() == RENDERMODE_TRANSALPHA and ply:GetColor().a == 100 then
3566
3567 return true
3568
3569 else
3570
3571 return false
3572
3573 end
3574
3575end
3576
3577
3578
3579
3580
3581function AB.SetPacketChoke( choke )
3582
3583 if !odium or !odium.engine then return end
3584
3585 if choke then
3586
3587 odium.engine.SetSendPacketEnabled( true )
3588
3589 odium.engine.SetChokedPacketNum( 0 )
3590
3591 else
3592
3593 odium.engine.ResetSendPacket()
3594
3595 odium.engine.ResetChokedPacketNum()
3596
3597 end
3598
3599end
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609/*
3610
3611function AB.GetPenetrationStrength( tr ) --heh
3612
3613 if !AB.CanWeaponPenetrate() then return 0 end
3614
3615 local ply = LocalPlayer()
3616
3617 local gun = ply:GetActiveWeapon()
3618
3619 if !ply:IsValid() or !gun or !gun:IsValid() then return 0 end
3620
3621 if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9gayPenetration( ply, gun ) end
3622
3623 return 0
3624
3625end
3626
3627*/
3628
3629
3630
3631function AB.FixMove( cmd, safe )
3632
3633 local move = Vector( cmd:GetForwardMove(), cmd:GetSideMove(), cmd:GetUpMove() )
3634
3635 local speed = math.sqrt( move.x * move.x + move.y * move.y )
3636
3637 local mang = move:Angle()
3638
3639 local yaw = math.rad( cmd:GetViewAngles().y - AB.InternalFakeAngles.y + mang.y )
3640
3641 cmd:SetForwardMove( (math.cos(yaw) * speed) * 1 )
3642
3643 cmd:SetSideMove( math.sin(yaw) * speed )
3644
3645end
3646
3647
3648
3649
3650
3651------------------------------------------------------------------------AIMBOT FUNCTIONS--------------------------------------------------------------------------------------
3652
3653
3654
3655
3656
3657
3658
3659local isfiring = false
3660
3661local lastoldang = 0
3662
3663
3664
3665function AB.AimbotCore( cmd )
3666
3667 local ply = LocalPlayer()
3668
3669
3670
3671 if !AB.Vars.SilentAim then AB.InternalFakeAngles = 0 end
3672
3673 if lastoldang and isangle( lastoldang ) then
3674
3675 cmd:SetViewAngles( lastoldang )
3676
3677 lastoldang = 0
3678
3679 AB.SetPacketChoke( false )
3680
3681 end
3682
3683
3684
3685 if !AB.Vars.Aimbot then
3686
3687 lastoldang = 0
3688
3689 AB.AimbotPreviewTarget = -1
3690
3691 AB.AimbotTarget = game.GetWorld()
3692
3693 return
3694
3695 end
3696
3697
3698
3699 if !AB.Vars.AimbotStickyLock then
3700
3701 local closestfag = AB.GetClosestToCursor( true )
3702
3703 if closestfag != AB.AimbotTarget then AB.AimbotTarget = closestfag end
3704
3705 end
3706
3707
3708
3709 local atarg = AB.AimbotTarget
3710
3711 local pozzed = AB.PrepareForAStomping( atarg )
3712
3713
3714
3715 if isvector( pozzed ) then AB.AimbotPreviewTarget = pozzed end
3716
3717
3718
3719 -- negate target if they are invalid for whatever reason
3720
3721 if !atarg:IsValid() or AB.IsDead( atarg ) or !AB.InFOV( atarg ) or !AB.CanTargetPlayer( atarg ) or (AB.ToMetric(ply:GetPos():Distance(atarg:GetPos())) >= AB.NumberVars.AimbotDist) or !isvector( pozzed ) then
3722
3723 AB.AimbotPreviewTarget = -1
3724
3725 AB.AimbotTarget = AB.GetClosestToCursor( true )
3726
3727 AB.InternalFakeAngles = 0
3728
3729 return
3730
3731 end
3732
3733
3734
3735 -- snap only on fire option
3736
3737 if AB.Vars.SnapOnFire and !input.IsMouseDown(MOUSE_LEFT) or !ply:GetActiveWeapon() or !ply:GetActiveWeapon():IsValid() or !AB.CanBotShoot( ply:GetActiveWeapon() ) then
3738
3739-- AB.AimbotTarget = game.GetWorld()
3740
3741 targetlerp = LocalPlayer():EyeAngles()
3742
3743 return
3744
3745 end
3746
3747
3748
3749 -- keybind mode
3750
3751 if AB.Vars.AimbotBindMode then
3752
3753 local khn = AB.NumberVars.AimbotBindKey
3754
3755 if not ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then
3756
3757 -- AB.AimbotTarget = game.GetWorld()
3758
3759 targetlerp = LocalPlayer():EyeAngles()
3760
3761 return
3762
3763 end
3764
3765 end
3766
3767
3768
3769 -- cap a motherfucker
3770
3771 AB.AimbotPreviewTarget = pozzed
3772
3773 local aids = pozzed - ply:GetShootPos()
3774
3775 aids = aids:Angle()
3776
3777 aids:Normalize()
3778
3779-- if AB.NumberVars.AimbotSmooth > 0 then
3780
3781-- targetlerp = LerpAngle(FrameTime() * ((51 - AB.NumberVars.AimbotSmooth) / 5), targetlerp, aids)
3782
3783-- aids = targetlerp
3784
3785-- end
3786
3787
3788
3789 if AB.Vars.CompSpread then
3790
3791 local cone = AB.GetCurrentWeaponCone( cmd )
3792
3793 aids = aids + -cone
3794
3795 end
3796
3797
3798
3799 aids = Angle( aids.p, aids.y, 0 )
3800
3801 if AB.Vars.SilentAim then
3802
3803 AB.SetPacketChoke( true )
3804
3805 lastoldang = cmd:GetViewAngles() + Angle( cmd:GetMouseY() * 0.02, -cmd:GetMouseX() * 0.015, 0 )
3806
3807 AB.InternalFakeAngles = lastoldang
3808
3809 end
3810
3811 cmd:SetViewAngles(aids)
3812
3813 if AB.Vars.SilentAim then AB.FixMove( cmd, true ) end
3814
3815
3816
3817 if AB.Vars.AutoShoot then
3818
3819 if( !isfiring ) then
3820
3821 cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
3822
3823 isfiring = true
3824
3825 else
3826
3827 cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_ATTACK ) ) )
3828
3829 isfiring = false
3830
3831 end
3832
3833 end
3834
3835
3836
3837 if AB.Vars.AutoTrigger then
3838
3839 if ply:KeyDown(IN_ATTACK) then cmd:RemoveKey(IN_ATTACK) end
3840
3841 end
3842
3843
3844
3845end
3846
3847
3848
3849
3850
3851AB.BHopBuffer = {}
3852
3853AB.BHopCount1 = 0
3854
3855AB.BHopCount2 = 0
3856
3857AB.StoredOnGround = false
3858
3859AB.StoredInJump = false
3860
3861
3862
3863function AB.ResetCounters()
3864
3865 AB.BHopCount1 = 0
3866
3867 AB.BHopCount2 = 0
3868
3869 for i = #AB.BHopBuffer, 1, -1 do
3870
3871 AB.BHopBuffer[i] = nil
3872
3873 end
3874
3875end
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885local vw = Angle( 0, 0, 0 )
3886
3887local targetlerp = Angle( 0, 0, 0)
3888
3889local nxtangle = false
3890
3891function AB.CreateMove( cmd )
3892
3893
3894
3895local ply = LocalPlayer()
3896
3897if !ply:IsValid() then return end
3898
3899
3900
3901local amemfootprint = gcinfo()
3902
3903
3904
3905
3906
3907if( AB.Vars.Autoclick and !AB.Vars.RopeStorm) then
3908
3909 if ply:KeyDown(IN_ATTACK2) then cmd:RemoveKey(IN_ATTACK2) end
3910
3911 if ply:KeyDown(IN_ATTACK) then cmd:RemoveKey(IN_ATTACK) end
3912
3913 end
3914
3915
3916
3917 if( AB.Vars.Bhop) then
3918
3919 if AB.Vars.BhopAutostrafe and !ply:IsFlagSet( FL_ONGROUND ) and ply:GetMoveType() != MOVETYPE_NOCLIP then
3920
3921 if cmd:GetMouseX() < 0 then
3922
3923 cmd:SetSideMove(-1000000)
3924
3925 end
3926
3927 if cmd:GetMouseX() > 0 then
3928
3929 cmd:SetSideMove(1000000)
3930
3931 end
3932
3933 end
3934
3935
3936
3937
3938
3939////////////////////////// credit goes to invalid/kilgrave for this UD bhop ///////////////////////////
3940
3941
3942
3943
3944
3945
3946
3947 if AB.BHopCount1 < 13 then
3948
3949 if(cmd:KeyDown(2) && !ply:IsOnGround()) then
3950
3951 cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( 2 ) ) );
3952
3953 end
3954
3955 elseif(cmd:KeyDown(IN_JUMP)) then
3956
3957 cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( 2 ) ) );
3958
3959 end
3960
3961
3962
3963 local lastOnGround = AB.StoredOnGround
3964
3965 local lastInJump = AB.StoredInJump
3966
3967
3968
3969 local onGround = ply:IsOnGround()
3970
3971 local inJump = cmd:KeyDown (IN_JUMP)
3972
3973
3974
3975 if lastOnGround and !onGround then
3976
3977 AB.BHopCount2 = 0
3978
3979 elseif !lastOnGround and onGround then
3980
3981 if !lastInJump and inJump then
3982
3983 AB.BHopCount1 = AB.BHopCount1 + 1
3984
3985-- ply:ChatPrint(AB.BHopCount1)
3986
3987 if AB.BHopCount1 == 14 then
3988
3989 local a, b, c = 0, 0, 0
3990
3991 for i = 1, #AB.BHopBuffer do
3992
3993 local x = AB.BHopBuffer [i]
3994
3995 a = a + 1
3996
3997 b = b + x
3998
3999 c = c + x * x
4000
4001 end
4002
4003
4004
4005 if (c - b * b / a) / a < 0.1 then
4006
4007-- ply:ChatPrint("Detected")
4008
4009 AB.ChatText( "Whoops, your bhope abuse may have been detected! The protection system is good but not perfect I'm sorry to say", Color(255,205,205) )
4010
4011 end
4012
4013 end
4014
4015 else
4016
4017 AB.ResetCounters()
4018
4019 end
4020
4021 elseif onGround then
4022
4023 if lastInJump != inJump then
4024
4025 AB.ResetCounters()
4026
4027 end
4028
4029 end
4030
4031
4032
4033 if !onGround and
4034
4035 lastInJump and not inJump and
4036
4037 AB.BHopCount2 >= 0 then
4038
4039 AB.BHopBuffer[#AB.BHopBuffer + 1] = AB.BHopCount2
4040
4041 AB.BHopCount2 = -math.huge
4042
4043 end
4044
4045
4046
4047 AB.BHopCount2 = AB.BHopCount2 + 1
4048
4049
4050
4051 AB.StoredOnGround = onGround
4052
4053 AB.StoredInJump = nJump
4054
4055
4056
4057////////////////////////// old and gay ///////////////////////////
4058
4059
4060
4061/*
4062
4063 if !ply:IsFlagSet( FL_ONGROUND ) and ply:GetMoveType() != MOVETYPE_NOCLIP then
4064
4065 cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_JUMP ) ) )
4066
4067 end
4068
4069*/
4070
4071 end
4072
4073
4074
4075
4076
4077 if AB.Vars.Triggerbot and ply:Alive() and ply:GetActiveWeapon() and ply:GetActiveWeapon():IsValid() and AB.CanBotShoot( ply:GetActiveWeapon() ) then
4078
4079 local td = {start = ply:GetShootPos(), endpos = ply:GetShootPos() + ply:EyeAngles():Forward() * 65535, filter = ply, mask = MASK_SHOT}
4080
4081 local tr = util.TraceLine(td)
4082
4083
4084
4085 if (tr.Entity:IsPlayer() and AB.CanTargetPlayer( tr.Entity ) ) or tr.Entity:IsNPC() or tr.Entity.Type == "nextbot" then
4086
4087 if( !isfiring ) then
4088
4089 cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
4090
4091 isfiring = true
4092
4093 else
4094
4095 cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_ATTACK ) ) )
4096
4097 isfiring = false
4098
4099 end
4100
4101 end
4102
4103
4104
4105 end
4106
4107
4108
4109 if AB.ScrollDelta != 0 then cmd:SetMouseWheel( AB.ScrollDelta ) end
4110
4111
4112
4113 if( AB.Vars.RopeStorm and ply:KeyDown(IN_ATTACK2)) then
4114
4115 local aids = Angle(math.random(-90, 90), math.random(-180, 180), 0)
4116
4117 aids:Normalize()
4118
4119 cmd:SetViewAngles(aids)
4120
4121 if ply:KeyDown(IN_ATTACK2) then cmd:RemoveKey(IN_ATTACK2) end
4122
4123 end
4124
4125
4126
4127
4128
4129
4130
4131 if AB.Vars.FreecamControls then
4132
4133 local khn = AB.NumberVars.FreecamForward
4134
4135 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.pos = AB.FreecamCoordinates.pos + AB.FreecamCoordinates.ang:Forward() * 7 end
4136
4137 local khn = AB.NumberVars.FreecamBack
4138
4139 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.pos = AB.FreecamCoordinates.pos - AB.FreecamCoordinates.ang:Forward() * 7 end
4140
4141 local khn = AB.NumberVars.FreecamLeft
4142
4143 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.y = AB.FreecamCoordinates.ang.y + 1 end
4144
4145 local khn = AB.NumberVars.FreecamRight
4146
4147 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.y = AB.FreecamCoordinates.ang.y - 1 end
4148
4149 local khn = AB.NumberVars.FreecamUp
4150
4151 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.p = AB.FreecamCoordinates.ang.p - 0.75 end
4152
4153 local khn = AB.NumberVars.FreecamDown
4154
4155 if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.p = AB.FreecamCoordinates.ang.p + 0.75 end
4156
4157 end
4158
4159
4160
4161 AB.AimbotCore( cmd )
4162
4163
4164
4165 AB.MemoryDebug["aimbot"] = gcinfo() - amemfootprint
4166
4167
4168
4169end
4170
4171hook.Add( "CreateMove", "cmove", AB.CreateMove )
4172
4173
4174
4175
4176
4177local xraytrans = Color(255, 255, 255, 101)
4178
4179
4180
4181surface.CreateFont( "memes", {
4182
4183 font = "Trebuchet",
4184
4185 size = 200,
4186
4187 weight = 950,
4188
4189} )
4190
4191
4192
4193local scanmat = Material("particle/particle_ring_blur")
4194
4195local leadermat = Material( "particle/particle_ring_wave_additive" )
4196
4197local beammat = Material("trails/laser")
4198
4199
4200
4201function AB.Vision()
4202
4203local me = LocalPlayer()
4204
4205if !me:IsValid() then return end
4206
4207
4208
4209local memfootprint = gcinfo()
4210
4211/*
4212
4213for i = 0, ScrH(), 200 do
4214
4215 for w = 0, ScrW(), 200 do
4216
4217 draw.SimpleTextOutlined( ":^)", "memes", w, i, Color(255,255,255,255), 0, 0, 1, Color(0,0,55,255) )
4218
4219 end
4220
4221end
4222
4223
4224
4225draw.SimpleTextOutlined( "IM A HUGE FUCKING FAGGOT", "memes", 200, ScrH() / 2 - 230, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
4226
4227draw.SimpleTextOutlined( "WHO USES LEAKED HACKS", "memes", 260, ScrH() / 2 - 50, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
4228
4229draw.SimpleTextOutlined( "COS IM POOR AND RETARDED", "memes", 180, ScrH() / 2 + 150, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
4230
4231*/
4232
4233
4234
4235if !AB.Vars.Vision then return end
4236
4237
4238
4239
4240
4241if AB.Vars.CSFlashlight then
4242
4243 local dlight = DynamicLight( me:EntIndex() + 5 )
4244
4245 if ( dlight ) then
4246
4247 dlight.pos = me:GetEyeTraceNoCursor().HitPos
4248
4249 dlight.r = 255
4250
4251 dlight.g = 255
4252
4253 dlight.b = 255
4254
4255 dlight.brightness = 2
4256
4257 dlight.Decay = 1000
4258
4259 dlight.Size = 2256
4260
4261 dlight.DieTime = CurTime() + 0.5
4262
4263 end
4264
4265end
4266
4267
4268
4269if AB.Vars.ShowESP then
4270
4271-- players
4272
4273for k, v in pairs( player.GetAll() ) do
4274
4275
4276
4277 if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
4278
4279 if !AB.OnScreen( v, 50 ) then continue end
4280
4281
4282
4283 local teamcol, teamcol2
4284
4285 if AB.Vars.TeamColors then
4286
4287 teamcol = team.GetColor(v:Team())
4288
4289 teamcol2 = Color(math.Clamp(teamcol.r - 100, 0, 255), math.Clamp(teamcol.g - 100, 0, 255), math.Clamp(teamcol.b - 100, 0, 255), 255)
4290
4291 else
4292
4293 teamcol = AB.DefaultScheme
4294
4295 teamcol2 = AB.DefaultScheme2
4296
4297 end
4298
4299
4300
4301
4302
4303if v == me then continue end
4304
4305
4306
4307local pos = (v:GetPos() + Vector(0, 0, 45)):ToScreen()
4308
4309local admintext = AB.GetRank( v )
4310
4311
4312
4313if !AB.IsDead( v ) then
4314
4315 if AB.Vars.VSquares then
4316
4317 surface.SetDrawColor(teamcol)
4318
4319 surface.DrawOutlinedRect(pos.x - 10, pos.y - 10, 20, 20)
4320
4321 surface.SetDrawColor(teamcol2)
4322
4323 surface.DrawOutlinedRect(pos.x - 8, pos.y - 8, 16, 16)
4324
4325 surface.SetDrawColor(Color(255,255,255,255))
4326
4327 surface.DrawRect(pos.x - 2, pos.y - 2, 4, 4)
4328
4329 end
4330
4331 if AB.Vars.VNames then draw.SimpleTextOutlined( v:Name(), "DermaDefault", pos.x, pos.y - 30, teamcol, 1, 0, 1, Color(0,0,55,255) ) end
4332
4333
4334
4335
4336
4337 if AB.Vars.BoundingBox3d then cam.Start3D(EyePos(),EyeAngles()) render.DrawWireframeBox( v:GetPos(), Angle(0,0,0), Vector( -16, -16, 0 ), Vector( 16, 16, 72 ), AB.ColScheme, true ) cam.End3D() end
4338
4339 -- propkill shit
4340
4341
4342
4343 render.SetMaterial( beammat )
4344
4345 if AB.Vars.PKPlayerBeams then
4346
4347 local vz, ppos = AB.PlayerVisiblePK( me:GetShootPos(), v )
4348
4349 if vz then
4350
4351 cam.Start3D(EyePos(),EyeAngles())
4352
4353 render.DrawBeam( (me:GetShootPos() + Vector(0,0,-5)) + EyeAngles():Forward() * 5, ppos, 5, 0, 1, teamcol )
4354
4355 cam.End3D()
4356
4357 end
4358
4359 end
4360
4361
4362
4363 if AB.Vars.PKPropBeams then
4364
4365 if AB.HoldingProp and AB.HoldingProp:IsValid() then
4366
4367 local src = AB.HoldingProp:LocalToWorld( AB.HoldingProp:OBBCenter() )
4368
4369/*
4370
4371 cam.Start3D(EyePos(),EyeAngles())
4372
4373 render.StartBeam( 5 )
4374
4375 for i = 0, 4 do
4376
4377 local zp = src + (me:GetAimVector() * (i * 200)) + Vector( 0, 0, -(i ^ 3.15))
4378
4379 render.AddBeam( zp, 150, i, Color( 255, 100, 0) )
4380
4381 end
4382
4383 render.EndBeam()
4384
4385 render.DrawBeam( me:EyePos(), me:EyePos() + me:GetAimVector() * 2000, 50, 0, 1, Color( 255, 100, 0) )
4386
4387 cam.End3D()
4388
4389*/
4390
4391 local vz2, ppos2 = AB.PlayerVisiblePK( src, v )
4392
4393 if vz2 then
4394
4395 cam.Start3D(EyePos(),EyeAngles())
4396
4397 render.DrawBeam( src, ppos2, 50, 0, 1, teamcol2 )
4398
4399 cam.End3D()
4400
4401 end
4402
4403 end
4404
4405 end
4406
4407
4408
4409 -- target highlighting
4410
4411
4412
4413 if AB.Vars.ShowTargets and AB.IsTarget( v ) then
4414
4415 draw.SimpleTextOutlined( "[TARGETED]", "DermaDefault", math.Clamp(pos.x, 30, ScrW() - 54), math.Clamp(pos.y - 42, 30, ScrH() - 54), Color(255,155,0,255), 1, 0, 1, Color(55,20,0,255) )
4416
4417 surface.SetDrawColor(Color(255,155,0,255))
4418
4419 surface.DrawRect( pos.x - 20, pos.y - 15, 4, 30 )
4420
4421 surface.DrawRect( pos.x + 16, pos.y - 15, 4, 30 )
4422
4423
4424
4425 surface.DrawRect( pos.x - 30, pos.y - 20, 4, 40 )
4426
4427 surface.DrawRect( pos.x + 26, pos.y - 20, 4, 40 )
4428
4429
4430
4431 surface.DrawLine( ScrW() / 2, ScrH(), pos.x, pos.y )
4432
4433 end
4434
4435 if AB.Vars.ShowFriends and AB.IsFriend( v ) and !AB.IsTarget( v ) then
4436
4437 draw.SimpleTextOutlined( "[FRIEND]", "DermaDefault", pos.x, pos.y - 42, Color(0,255,0,255), 1, 0, 1, Color(0,0,55,255) )
4438
4439 end
4440
4441 if AB.Vars.ShowRanks and !(admintext == "user" or admintext == "guest" or admintext == "player") then
4442
4443 draw.SimpleTextOutlined( "["..admintext.."]", "DermaDefault", pos.x, pos.y + 12, Color(255,100,0,255), 1, 0, 1, Color(50,0,0,255) )
4444
4445 end
4446
4447 if AB.Vars.ShowTraitors and table.HasValue( AB.Traitors, v ) then
4448
4449 draw.SimpleTextOutlined( "[TRAITOR]", "DermaDefault", pos.x, pos.y - 56, Color(255,55,0,255), 1, 0, 1, Color(55,10,0,255) )
4450
4451 end
4452
4453 if AB.Vars.Vizlines then
4454
4455 local tr = util.TraceLine ({
4456
4457 start = v:EyePos(),
4458
4459 endpos = v:EyePos() + v:GetAimVector() * 5000,
4460
4461 filter = v,
4462
4463 mask = MASK_SOLID_BRUSHONLY
4464
4465 })
4466
4467 local tp = tr.HitPos:ToScreen()
4468
4469 local p = v:EyePos():ToScreen()
4470
4471 surface.DrawLine(p.x, p.y, tp.x, tp.y)
4472
4473 surface.SetDrawColor(teamcol)
4474
4475 surface.DrawLine(tp.x - 4, tp.y, tp.x + 4, tp.y)
4476
4477 surface.DrawLine(tp.x, tp.y - 4, tp.x, tp.y + 4)
4478
4479 end
4480
4481
4482
4483 if AB.Vars.ShowDistance then
4484
4485 draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x, pos.y + 24, teamcol, 1, 0, 1, Color(0,0,55,255) )
4486
4487 end
4488
4489 if AB.Vars.ShowHP then
4490
4491 local colhp = math.Clamp(v:Health() * 3, 0, 255)
4492
4493 local colcomp = Color(255,colhp,0,255)
4494
4495 draw.SimpleTextOutlined( tostring(v:Health()).."%", "DermaDefault", pos.x, pos.y + 38, colcomp, 1, 0, 1, Color(0,0,0,255) )
4496
4497 end
4498
4499
4500
4501 if AB.Vars.PKVelocity then
4502
4503 local velpos = ((v:GetPos() + Vector(0, 0, 45)) + v:GetVelocity() * 0.3 ):ToScreen()
4504
4505 surface.SetDrawColor(teamcol)
4506
4507 surface.SetMaterial( leadermat )
4508
4509 surface.DrawTexturedRect(velpos.x - 15, velpos.y - 15, 30, 30)
4510
4511 surface.SetDrawColor(teamcol2)
4512
4513 surface.DrawTexturedRect(velpos.x - 10, velpos.y - 10, 20, 20)
4514
4515 end
4516
4517
4518
4519-- the fag is dead, i dunno why i did a second logic block for this, im just retarded i guess
4520
4521elseif AB.Vars.ShowDead then
4522
4523 surface.SetDrawColor(Color(255,255,255,255))
4524
4525 surface.DrawLine(pos.x - 15, pos.y - 15, pos.x + 15, pos.y + 15)
4526
4527 surface.DrawLine(pos.x + 15, pos.y - 15, pos.x - 15, pos.y + 15)
4528
4529 if AB.Vars.VNames then draw.SimpleTextOutlined( v:Name(), "DermaDefault", pos.x, pos.y - 30, teamcol, 1, 0, 1, Color(0,0,55,255) ) end
4530
4531 if AB.Vars.ShowFriends and AB.IsFriend( v ) then
4532
4533 draw.SimpleTextOutlined( "[FRIEND]", "DermaDefault", pos.x, pos.y - 42, Color(0,255,0,255), 1, 0, 1, Color(0,0,55,255) )
4534
4535 end
4536
4537 if AB.Vars.ShowRanks and !(admintext == "user" or admintext == "guest" or admintext == "player") then
4538
4539 draw.SimpleTextOutlined( "["..admintext.."]", "DermaDefault", pos.x, pos.y + 12, Color(255,100,0,255), 1, 0, 1, Color(50,0,0,255) )
4540
4541 end
4542
4543 if AB.Vars.ShowDistance then
4544
4545 draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x, pos.y + 24, teamcol, 1, 0, 1, Color(0,0,55,255) )
4546
4547 end
4548
4549end
4550
4551
4552
4553
4554
4555end -- end of players loop
4556
4557
4558
4559if AB.Vars.ESPProps then
4560
4561 for k, v in pairs(ents.FindByClass("prop_physics")) do
4562
4563 if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
4564
4565 local pos = (v:LocalToWorld(v:OBBCenter())):ToScreen()
4566
4567 surface.SetDrawColor(AB.DefaultScheme)
4568
4569 surface.DrawOutlinedRect(pos.x - 10, pos.y - 10, 20, 20)
4570
4571 local aligndist = surface.GetTextSize( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m" )
4572
4573 draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x - (aligndist / 2), pos.y + 12, AB.DefaultScheme, 0, 0, 1, Color(0,0,55,255) )
4574
4575 end
4576
4577end
4578
4579
4580
4581
4582
4583
4584
4585if AB.Vars.Entfinder then
4586
4587 for k, v in pairs(ents.GetAll()) do
4588
4589 if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
4590
4591 if !AB.OnScreen( v, 20 ) then continue end
4592
4593 local drawing = false
4594
4595
4596
4597 for i,p in pairs(AB.MarkedEnts) do
4598
4599 if v:GetClass() == p then
4600
4601 drawing = true
4602
4603 end
4604
4605 end
4606
4607
4608
4609 if drawing then
4610
4611 local pos = (v:LocalToWorld(v:OBBCenter())):ToScreen()
4612
4613 surface.SetDrawColor(Color(255,255,255,255))
4614
4615 surface.DrawRect(pos.x - 3, pos.y - 3, 6, 6)
4616
4617 local alignclass = surface.GetTextSize( tostring(v:GetClass()) )
4618
4619 draw.SimpleTextOutlined( tostring(v:GetClass()), "DermaDefault", pos.x - (alignclass / 2), pos.y + 12, AB.DefaultScheme, 0, 0, 1, Color(0,0,55,255) )
4620
4621 end
4622
4623
4624
4625 end
4626
4627
4628
4629end
4630
4631
4632
4633end -- end of showesp
4634
4635
4636
4637
4638
4639if AB.Freecam then
4640
4641 local CamData = {}
4642
4643 CamData.origin = AB.FreecamCoordinates.pos
4644
4645 CamData.angles = AB.FreecamCoordinates.ang
4646
4647 CamData.x = AB.NumberVars.MirrorX
4648
4649 CamData.y = AB.NumberVars.MirrorY
4650
4651 CamData.w = ScrW() / (AB.NumberVars.MirrorSize / 10)
4652
4653 CamData.h = ScrH() / (AB.NumberVars.MirrorSize / 10)
4654
4655 CamData.drawviewmodel = false
4656
4657 CamData.drawhud = false
4658
4659 CamData.fov = 90
4660
4661 render.RenderView( CamData )
4662
4663end
4664
4665
4666
4667if AB.Vars.Mirror then
4668
4669 local CamData = {}
4670
4671 if AB.NumberVars.MirrorAxis == 0 then
4672
4673 CamData.angles = Angle(0,me:EyeAngles().yaw - 180,0)
4674
4675 elseif AB.NumberVars.MirrorAxis == 1 then
4676
4677 CamData.angles = Angle(me:EyeAngles().pitch,me:EyeAngles().yaw - 180,0)
4678
4679 else
4680
4681 CamData.angles = Angle(-me:EyeAngles().pitch,me:EyeAngles().yaw - 180,0)
4682
4683 end
4684
4685
4686
4687 CamData.origin = me:GetPos()+Vector(0,0,50)
4688
4689 CamData.x = AB.NumberVars.MirrorX
4690
4691 CamData.y = AB.NumberVars.MirrorY
4692
4693 CamData.w = ScrW() / (AB.NumberVars.MirrorSize / 10)
4694
4695 CamData.h = ScrH() / (AB.NumberVars.MirrorSize / 10)
4696
4697 CamData.drawviewmodel = false
4698
4699 CamData.drawhud = false
4700
4701 CamData.fov = 90
4702
4703 render.RenderView( CamData )
4704
4705end
4706
4707
4708
4709
4710
4711
4712
4713if AB.Vars.PreviewTarget then
4714
4715 local t = AB.AimbotPreviewTarget
4716
4717 if isvector( t ) then
4718
4719 local p = t:ToScreen()
4720
4721 surface.SetDrawColor(Color(255,155,55,255))
4722
4723 surface.DrawRect(p.x-1, p.y + 6, 2, 20)
4724
4725 surface.DrawRect(p.x-1, p.y - (6 + 20), 2, 20)
4726
4727 surface.DrawRect(p.x + 6, p.y-1, 20, 2)
4728
4729 surface.DrawRect(p.x - (6 + 20), p.y-1, 20, 2)
4730
4731 end
4732
4733end
4734
4735
4736
4737
4738
4739if AB.Vars.Radar then
4740
4741 local size = AB.NumberVars.RadarSize
4742
4743 local fov = AB.NumberVars.RadarZoom
4744
4745 local x = AB.NumberVars.RadarX
4746
4747 local y = AB.NumberVars.RadarY
4748
4749
4750
4751 surface.SetDrawColor(AB.DefaultScheme.r, AB.DefaultScheme.g, AB.DefaultScheme.b, AB.NumberVars.RadarAlpha)
4752
4753 surface.DrawRect(x - 2, y - 2, size + 4, size + 4)
4754
4755
4756
4757
4758
4759 surface.SetDrawColor(Color(20, 20, 20, AB.NumberVars.RadarAlpha))
4760
4761 surface.DrawRect(x, y, size, size)
4762
4763 surface.SetDrawColor(Color(30, 30, 30, 255))
4764
4765 surface.DrawLine(x, y, x + (size / 2), y + (size / 2))
4766
4767 surface.DrawLine(x + size, y, x + (size / 2), y + (size / 2))
4768
4769
4770
4771 surface.SetDrawColor(AB.DefaultScheme)
4772
4773 surface.DrawRect((x -2)+ (size/2), (y-2) + (size/2), 4, 4)
4774
4775
4776
4777 for key, ply in pairs(player.GetAll()) do
4778
4779 local teamcol, teamcol2 = AB.GetESPColor( ply )
4780
4781
4782
4783
4784
4785 if ply != me and !AB.IsDead( ply ) then
4786
4787 local lx = me:GetPos().x - ply:GetPos().x
4788
4789 local ly = me:GetPos().y - ply:GetPos().y
4790
4791 local ang = EyeAngles().y
4792
4793 local cos = math.cos(math.rad(-ang))
4794
4795 local sin = math.sin(math.rad(-ang))
4796
4797 local px = (ly * cos) + (lx * sin)
4798
4799 local py = (lx * cos) - (ly * sin)
4800
4801 px = px / fov
4802
4803 py = py / fov
4804
4805 px = math.Clamp(px, -(size * 0.50), size * 0.50)
4806
4807 py = math.Clamp(py, -(size * 0.50), size * 0.50)
4808
4809 local name = player.GetAll()[key]:Nick()
4810
4811 draw.SimpleText(name, "default", x + size - (size * 0.50) + px - 13, y + size - (size * 0.50) + py - 7, teamcol2, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
4812
4813 surface.SetDrawColor(teamcol)
4814
4815 surface.DrawRect(x + size - (size * 0.50) + px, y + size - (size * 0.50) + py, 3, 3)
4816
4817
4818
4819 end
4820
4821
4822
4823 end
4824
4825
4826
4827end
4828
4829
4830
4831if AB.Vars.Crosshair then
4832
4833 local hitpos = util.TraceLine ({
4834
4835 start = me:GetShootPos(),
4836
4837 endpos = me:GetShootPos() + me:GetAimVector() * 4096,
4838
4839 filter = me,
4840
4841 mask = MASK_SHOT
4842
4843 }).HitPos
4844
4845
4846
4847 local screenpos = hitpos:ToScreen()
4848
4849 local x = screenpos.x
4850
4851 local y = screenpos.y
4852
4853
4854
4855 surface.SetDrawColor(Color(255, 255, 255, 255))
4856
4857 surface.DrawRect((ScrW() / 2) - 1, (ScrH() / 2) - 1, 2, 2)
4858
4859 surface.DrawRect(x-1, y + 6, 2, 20)
4860
4861 surface.DrawRect(x-1, y - (6 + 20), 2, 20)
4862
4863 surface.DrawRect(x + 6, y-1, 20, 2)
4864
4865 surface.DrawRect(x - (6 + 20), y-1, 20, 2)
4866
4867
4868
4869 if AB.CrossHairAlpha > 0 then AB.CrossHairAlpha = math.Clamp(AB.CrossHairAlpha - 6, 0, 255) end
4870
4871 surface.SetDrawColor(Color(255, 255, 255, AB.CrossHairAlpha))
4872
4873 surface.DrawLine(x - 24, y + 24, x - 6, y + 6)
4874
4875 surface.DrawLine(x + 24, y + 24, x + 6, y + 6)
4876
4877 surface.DrawLine(x - 24, y - 24, x - 6, y - 6)
4878
4879 surface.DrawLine(x + 24, y - 24, x + 6, y - 6)
4880
4881
4882
4883
4884
4885end
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895if isvector( AB.CurrentBase ) then
4896
4897 local sc = (AB.CurrentBase + Vector( 0, 0, 10 )):ToScreen()
4898
4899
4900
4901 draw.SimpleText("My Base", "default", sc.x, sc.y - 42, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
4902
4903 draw.SimpleText( AB.ToMetric( LocalPlayer():GetPos():Distance( AB.CurrentBase ) ).."m", "default", sc.x, sc.y - 30, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
4904
4905 surface.SetDrawColor( Color(205,205,255, 100 ) )
4906
4907 draw.NoTexture()
4908
4909 local triangle = {
4910
4911 { x = sc.x - 10, y = sc.y - 20 },
4912
4913 { x = sc.x + 10, y = sc.y - 20 },
4914
4915 { x = sc.x, y = sc.y },
4916
4917 }
4918
4919 surface.DrawPoly( triangle )
4920
4921
4922
4923end
4924
4925
4926
4927if AB.Vars.KeypadJew then
4928
4929
4930
4931 local e = me:GetEyeTrace().Entity
4932
4933 if IsValid(e) and string.find( e:GetClass(), "Keypad") then
4934
4935 local text;
4936
4937 local color;
4938
4939 if(e.code && e.code != "") then
4940
4941 text = e.code;
4942
4943 color = Color( 105, 255, 105, 150 )
4944
4945 elseif(e.tempCode && e.tempCode != "") then
4946
4947 text = e.tempCode;
4948
4949 color = Color( 250, 150, 150, 150 )
4950
4951 else
4952
4953 text = "Unknown"
4954
4955 color = Color(150,150,150,150)
4956
4957 end
4958
4959-- draw.WordBox( 8, ScrW() / 2, ScrH() / 2, text, "Default", color, Color(255,255,255,255) )
4960
4961
4962
4963 surface.SetDrawColor( Color( 0,0,50, 150 ) )
4964
4965 surface.SetMaterial( grad )
4966
4967 surface.DrawTexturedRect( ScrW() / 2 + 57, ScrH() / 2 - 7, 50, 15 )
4968
4969 draw.SimpleText(text, "DermaDefault", ScrW() / 2 + 60, ScrH() / 2, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
4970
4971
4972
4973 end
4974
4975
4976
4977 for k,v in pairs(ents.GetAll()) do
4978
4979 if IsValid(v) and string.find( v:GetClass(), "Keypad") then
4980
4981 if v != e and me:GetPos():Distance( v:GetPos() ) < 8000 then
4982
4983 local pos = v:GetPos():ToScreen()
4984
4985 if pos.x > 0 and pos.x < ScrW() and pos.y > 0 and pos.y < ScrH() then
4986
4987 if (v.code && v.code != "") then
4988
4989 surface.SetDrawColor( Color( 0,0,50, 150 ) )
4990
4991 surface.SetMaterial( grad )
4992
4993 surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
4994
4995 draw.SimpleText( v.code, "DermaDefault", pos.x + 5, pos.y + 6, Color( 105, 255, 105, 150 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
4996
4997
4998
4999-- draw.WordBox( 8, pos.x-5, pos.y-5, v.code, "Default", Color( 0, 255, 0, 150 ), Color(255,255,255,255) )
5000
5001 else
5002
5003 if(v.tempCode && v.tempCode != "") then
5004
5005 surface.SetDrawColor( Color( 0,0,50, 150 ) )
5006
5007 surface.SetMaterial( grad )
5008
5009 surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
5010
5011 draw.SimpleText( v.tempCode, "DermaDefault", pos.x + 5, pos.y + 6, Color( 250, 150, 150, 150 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
5012
5013 else
5014
5015 surface.SetDrawColor( Color( 0,0,50, 150 ) )
5016
5017 surface.SetMaterial( grad )
5018
5019 surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
5020
5021 draw.SimpleText( "Unknown", "DermaDefault", pos.x + 5, pos.y + 6, Color(150,150,150,150), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
5022
5023 end
5024
5025 end
5026
5027 end
5028
5029 end
5030
5031 end
5032
5033 end
5034
5035
5036
5037end
5038
5039
5040
5041
5042
5043if AB.Vars.Bhop then
5044
5045 local sped = me:GetVelocity():Length()
5046
5047 draw.SimpleText("Velocity: "..math.Round( sped ), "DermaDefault", (ScrW() / 2), ScrH() - 60, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
5048
5049 surface.SetDrawColor( AB.DefaultScheme )
5050
5051 surface.DrawOutlinedRect( (ScrW() / 2) - 100, ScrH() - 50, 200, 10 )
5052
5053 surface.SetDrawColor( Color( AB.DefaultScheme.r, AB.DefaultScheme.g, AB.DefaultScheme.b, 100 ) )
5054
5055 surface.DrawRect( (ScrW() / 2) - 100, ScrH() - 50, math.Clamp( (sped / 2000) * 200, 0, 200 ), 10 )
5056
5057end
5058
5059
5060
5061
5062
5063if AB.Vars.WitnessDetector then
5064
5065
5066
5067 if #AB.Witnesses > 0 then
5068
5069 surface.SetDrawColor( Color(50, 50, 90, 255) )
5070
5071 surface.DrawRect( (ScrW() / 2) - 150, 0, 300, (#AB.Witnesses * 20) + 30)
5072
5073 surface.SetDrawColor( Color(0, 0, 0, 250) )
5074
5075 surface.DrawRect( (ScrW() / 2) - 145, 25, 290, (#AB.Witnesses * 20) )
5076
5077 draw.SimpleText("These people can see you", "DermaDefault", (ScrW() / 2) - 63, 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
5078
5079
5080
5081
5082
5083 for k, v in pairs(AB.Witnesses) do
5084
5085 if !v:IsValid() then continue end -- let this pass silently, it only spams briefly when some faggot dcs anyway
5086
5087 draw.SimpleText(v:Nick(), "DermaDefault", (ScrW() / 2) - 140, 8 + (k * 20), AB.GetESPColor( v ) )
5088
5089 end
5090
5091
5092
5093 end
5094
5095end
5096
5097
5098
5099if AB.Vars.SpectatorDetector then
5100
5101 local starty = 0
5102
5103 if AB.Vars.WitnessDetector then starty = (#AB.Witnesses * 20) + 35 end
5104
5105
5106
5107 if AB.TheyHaveEyesEverywhere and #AB.TheyHaveEyesEverywhere > 0 then
5108
5109 surface.SetDrawColor( Color(50, 50, 90, 255) )
5110
5111 surface.DrawRect( (ScrW() / 2) - 150, starty, 300, (#AB.TheyHaveEyesEverywhere * 20) + 30)
5112
5113 surface.SetDrawColor( Color(0, 0, 0, 250) )
5114
5115 surface.DrawRect( (ScrW() / 2) - 145, starty + 25, 290, (#AB.TheyHaveEyesEverywhere * 20) )
5116
5117 draw.SimpleText("These people are spectating you", "DermaDefault", (ScrW() / 2) - 63, starty + 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
5118
5119
5120
5121
5122
5123 for k, v in pairs( AB.TheyHaveEyesEverywhere ) do
5124
5125 if !v:IsValid() then continue end -- let this pass silently, it only spams briefly when some faggot dcs anyway
5126
5127 draw.SimpleText(v:Nick(), "DermaDefault", (ScrW() / 2) - 140, starty + 8 + (k * 20), AB.GetESPColor( v ) )
5128
5129 end
5130
5131
5132
5133 end
5134
5135end
5136
5137
5138
5139-- ent scanner
5140
5141if AB.EntScanner then
5142
5143
5144
5145 local c = me:GetEyeTrace()
5146
5147 local screenpos = c.HitPos:ToScreen()
5148
5149 local x = screenpos.x
5150
5151 local y = screenpos.y
5152
5153 local pulse = math.abs( math.sin( CurTime() * 2 ) )
5154
5155 surface.SetDrawColor( AB.DefaultScheme )
5156
5157 surface.SetMaterial( scanmat )
5158
5159 surface.DrawTexturedRect( x - (15 + (pulse * 15)), y - (15 + (pulse * 15)), 30 + (pulse * 30), 30 + (pulse * 30) )
5160
5161 surface.SetDrawColor( AB.DefaultScheme2 )
5162
5163 surface.DrawTexturedRect( x - (12 + (pulse * 12)), y - (12 + (pulse * 12)), 24 + (pulse * 24), 24 + (pulse * 24) )
5164
5165
5166
5167 if c.Entity and c.Entity:IsValid() then
5168
5169 AB.EntScannerTab = {}
5170
5171 local e = c.Entity
5172
5173 AB.EntScannerEnt = e
5174
5175
5176
5177 if e:IsPlayer() then
5178
5179 table.insert( AB.EntScannerTab, e:Nick() )
5180
5181 table.insert( AB.EntScannerTab, {e:SteamID(), Color(255,255,255)} )
5182
5183 table.insert( AB.EntScannerTab, {AB.GetRank( e ), Color( 255, 100, 0 )} )
5184
5185 table.insert( AB.EntScannerTab, "Health: "..e:Health().."% Armor: "..e:Armor().."%" )
5186
5187 if DarkRP then
5188
5189 table.insert( AB.EntScannerTab, {DarkRP.formatMoney(e:getDarkRPVar("money")) or "$ERROR", Color( 50, 255, 50)} )
5190
5191 table.insert( AB.EntScannerTab, {"Real Name: "..e:SteamName(), Color( 150, 150, 150)} )
5192
5193 end
5194
5195
5196
5197 if e:GetActiveWeapon() then table.insert( AB.EntScannerTab, "Holding: "..(e:GetActiveWeapon():GetClass() or "None" ) ) end
5198
5199 local weps = {}
5200
5201 for _, g in pairs( e:GetWeapons() ) do table.insert( weps, g:GetClass() )end
5202
5203 table.insert( AB.EntScannerTab, {table.ToString( weps ), Color(155,155,255)} )
5204
5205 end
5206
5207 table.insert( AB.EntScannerTab, e:GetClass() )
5208
5209 table.insert( AB.EntScannerTab, e:GetModel() )
5210
5211 table.insert( AB.EntScannerTab, "Distance: "..AB.ToMetric(e:GetPos():Distance( me:GetPos() )).."m" )
5212
5213
5214
5215 end
5216
5217
5218
5219 local textx, texty = ScrW() / 2 + 50, ScrH() / 2
5220
5221 for k, v in pairs(AB.EntScannerTab) do
5222
5223 if istable( v ) then
5224
5225 draw.SimpleTextOutlined( v[1], "default", textx + 40, (texty - 40) + (k * 12), v[2], 0, 0, 1, Color(0,0,0) )
5226
5227 else
5228
5229 draw.SimpleTextOutlined( v, "default", textx + 40, (texty - 40) + (k * 12), AB.DefaultScheme, 0, 0, 1, Color(0,0,0) )
5230
5231 end
5232
5233 end
5234
5235
5236
5237
5238
5239end
5240
5241
5242
5243AB.MemoryDebug["hud"] = gcinfo() - memfootprint
5244
5245
5246
5247end
5248
5249hook.Add("HUDPaint", "ab_hud", AB.Vision)
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259---------------------------------------------- NEW XRAY HERE -------------------------------------------------
5260
5261
5262
5263
5264
5265/*
5266
5267if AB.Vars.Xray then
5268
5269
5270
5271 for k, v in pairs(ents.GetAll()) do
5272
5273
5274
5275 if AB.ToMetric(me:GetPos():Distance(v:GetPos())) > AB.NumberVars.XrayDistance then if v:GetColor().a == 100 then v:SetColor(Color(255,255,255,255)) end continue end
5276
5277
5278
5279 -- set rendermode none?
5280
5281
5282
5283 if AB.Vars.XrayPlayers then
5284
5285 if v:IsValid() and v:IsPlayer() and v != LocalPlayer() and !AB.IsDead( v ) and AB.OnScreen( v ) then
5286
5287 cam.Start3D(EyePos(),EyeAngles())
5288
5289 if AB.Vars.NoChamColours then
5290
5291 v:SetMaterial(AB.mat1)
5292
5293 v:SetRenderMode(4)
5294
5295 v:SetColor(xraytrans)
5296
5297 render.SuppressEngineLighting( true )
5298
5299 render.MaterialOverride( AB.mat1 )
5300
5301 end
5302
5303 if AB.Vars.PKChams and AB.Vars.NoChamColours then render.SetColorModulation( 0, 1, 0 ) render.SetBlend(0.8) else render.SetColorModulation( AB.ColScheme.x, AB.ColScheme.y, AB.ColScheme.z ) render.SetBlend(0.3) end
5304
5305 v:DrawModel()
5306
5307 if IsValid( v:GetActiveWeapon() ) then
5308
5309 if AB.Vars.NoChamColours then render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z ) end
5310
5311 v:GetActiveWeapon():DrawModel()
5312
5313 end
5314
5315 render.SetBlend(1)
5316
5317 render.SuppressEngineLighting( false )
5318
5319 render.MaterialOverride( )
5320
5321-- v:SetColor(Color(255,255,255,255))
5322
5323 cam.End3D()
5324
5325
5326
5327 end
5328
5329 end
5330
5331 if AB.Vars.XrayProps then
5332
5333 if v:IsValid() and v:GetClass() == "prop_physics" and AB.OnScreen( v ) then
5334
5335 cam.Start3D(EyePos(),EyeAngles())
5336
5337 if AB.Vars.NoChamColours then
5338
5339 v:SetMaterial(AB.mat1)
5340
5341 v:SetRenderMode(4)
5342
5343 v:SetColor(xraytrans)
5344
5345 render.SuppressEngineLighting( true )
5346
5347 render.MaterialOverride( AB.mat1 )
5348
5349 end
5350
5351 if AB.Vars.PKChams and AB.Vars.NoChamColours then render.SetColorModulation( 1, 0.2, 0 ) render.SetBlend(0.6) else render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z ) render.SetBlend(0.3) end
5352
5353 v:DrawModel()
5354
5355 render.SetBlend(1)
5356
5357 render.SuppressEngineLighting( false )
5358
5359 render.MaterialOverride( )
5360
5361-- v:SetColor(Color(255,255,255,255))
5362
5363 cam.End3D()
5364
5365 end
5366
5367 end
5368
5369
5370
5371
5372
5373 if AB.Vars.XrayEntfinder then
5374
5375 local drawing = false
5376
5377
5378
5379 for i,p in pairs(AB.MarkedEnts) do
5380
5381 if v:GetClass() == p then
5382
5383 drawing = true
5384
5385 end
5386
5387 end
5388
5389
5390
5391 if drawing and AB.OnScreen( v ) then
5392
5393 cam.Start3D(EyePos(),EyeAngles())
5394
5395 v:SetMaterial(AB.mat1)
5396
5397 v:SetRenderMode(4)
5398
5399 v:SetColor(xraytrans)
5400
5401 render.SuppressEngineLighting( true )
5402
5403 render.MaterialOverride( AB.mat1 )
5404
5405 render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z )
5406
5407 render.SetBlend(0.3)
5408
5409 v:DrawModel()
5410
5411 render.SetBlend(1)
5412
5413 render.SuppressEngineLighting( false )
5414
5415 render.MaterialOverride( )
5416
5417-- v:SetColor(Color(255,255,255,255))
5418
5419 cam.End3D()
5420
5421 end
5422
5423
5424
5425 end
5426
5427
5428
5429
5430
5431
5432
5433 end
5434
5435end
5436
5437*/
5438
5439
5440
5441
5442
5443function AB.DrawXrayEntity( ent, col, domat, ghost )
5444
5445 cam.Start3D( EyePos(), EyeAngles() )
5446
5447 cam.IgnoreZ( true )
5448
5449 if domat then render.MaterialOverride( AB.Mat1 ) end
5450
5451 render.SuppressEngineLighting( true )
5452
5453 render.SetColorModulation( col.r / 255, col.g / 255, col.b / 255 )
5454
5455 if ghost then render.SetBlend( 0.3 ) end
5456
5457 ent:DrawModel()
5458
5459 render.SuppressEngineLighting( false )
5460
5461 cam.IgnoreZ( false )
5462
5463 render.MaterialOverride()
5464
5465 cam.End3D()
5466
5467end
5468
5469
5470
5471
5472
5473function AB.DoXray()
5474
5475 local me = LocalPlayer()
5476
5477 if !me or !me:IsValid() or !AB.Vars.Xray then return end
5478
5479
5480
5481 local fags = ents.GetAll()
5482
5483-- table.sort( fags, function( a, b ) return a:GetPos():DistToSqr( EyePos() ) > b:GetPos():DistToSqr( EyePos() ) end )
5484
5485
5486
5487 for k, v in ipairs( fags ) do
5488
5489 if !AB.OnScreen( v, 50 ) or AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.XrayDistance then continue end
5490
5491
5492
5493 -- players loop
5494
5495 if AB.Vars.XrayPlayers and v:IsPlayer() then
5496
5497 if v == LocalPlayer() or !v:Alive() then continue end
5498
5499 local teamcol, teamcol2
5500
5501 if AB.Vars.TeamColors then
5502
5503 teamcol = team.GetColor(v:Team())
5504
5505 teamcol2 = Color(math.Clamp(teamcol.r - 100, 0, 255), math.Clamp(teamcol.g - 100, 0, 255), math.Clamp(teamcol.b - 100, 0, 255), 255)
5506
5507 elseif AB.Vars.PKChams then
5508
5509 teamcol = Color( 0, 255, 0 ) teamcol2 = Color( 255, 0, 0 )
5510
5511 else
5512
5513 teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
5514
5515 end
5516
5517
5518
5519 AB.DrawXrayEntity( v, teamcol, AB.Vars.NoChamColours, !AB.Vars.XraySolid )
5520
5521
5522
5523 local gun = v:GetActiveWeapon()
5524
5525 if gun and gun:IsValid() then AB.DrawXrayEntity( gun, teamcol2, AB.Vars.NoChamColours, !AB.Vars.XraySolid ) end
5526
5527 end
5528
5529
5530
5531 -- props loop
5532
5533 if AB.Vars.XrayProps and v:GetClass() == "prop_physics" then
5534
5535 local teamcol, teamcol2
5536
5537 if AB.Vars.PKChams then
5538
5539 teamcol = Color( 0, 255, 0 ) teamcol2 = Color( 255, 0, 0 )
5540
5541 else
5542
5543 teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
5544
5545 end
5546
5547 AB.DrawXrayEntity( v, teamcol2, AB.Vars.NoChamColours, true )
5548
5549 end
5550
5551
5552
5553 -- ents loop
5554
5555 if AB.Vars.XrayEntfinder and table.HasValue( AB.MarkedEnts, v:GetClass() ) then
5556
5557 local teamcol, teamcol2
5558
5559 if AB.Vars.PKChams then
5560
5561 teamcol = Color( 255, 255, 0 ) teamcol2 = Color( 255, 255, 0 )
5562
5563 else
5564
5565 teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
5566
5567 end
5568
5569 AB.DrawXrayEntity( v, teamcol, AB.Vars.NoChamColours, true )
5570
5571 end
5572
5573
5574
5575 end
5576
5577end
5578
5579
5580
5581hook.Add( "PreDrawHUD", "AB_NewXray", AB.DoXray )
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595function AB.PKBeamsCore()
5596
5597if AB.Vars.PKVerticalBeams then
5598
5599 render.SetMaterial( beammat )
5600
5601 for k, v in pairs( player.GetAll()) do
5602
5603 if !v:Alive() or v == LocalPlayer() then continue end
5604
5605 render.DrawBeam( v:GetPos() + Vector( 0, 0, -2000 ), v:GetPos() + Vector( 0, 0, 2000 ), 50, 0, 1, Color(255,255,255) )
5606
5607 end
5608
5609end
5610
5611end
5612
5613hook.Add("PostDrawTranslucentRenderables", "ab_beams", AB.PKBeamsCore)
5614
5615
5616
5617
5618
5619function AB.ToggleEntityScanner()
5620
5621 if !AB.EntScanner then
5622
5623 AB.EntScanner = true
5624
5625 AB.ScannerButton1 = AB.MakeFloatingButton( ScrW() / 2 - 180, (ScrH() / 2) - 50, "Copy to Console", function() print(AB.EntScannerEnt)
5626
5627 for k, v in pairs( AB.EntScannerTab ) do
5628
5629 if istable( v ) then MsgC( v[2], v[1].."\n" ) else MsgN( v ) end
5630
5631 end
5632
5633 end)
5634
5635
5636
5637 AB.ScannerButton2 = AB.MakeFloatingButton( ScrW() / 2 - 180, (ScrH() / 2) - 20, "Add class to ESP", function()
5638
5639 if table.HasValue( AB.MarkedEnts, AB.EntScannerEnt:GetClass() ) then AB.ChatText( "Already marked!", Color(255,205,205) ) return end
5640
5641 AB.ChatText( "Added "..AB.EntScannerEnt:GetClass().." to marked ent classes", Color(255,255,255) )
5642
5643 table.insert(AB.MarkedEnts, AB.EntScannerEnt:GetClass())
5644
5645 end)
5646
5647
5648
5649 AB.ChatText( "Enabled Entity Scanner", Color(255,255,255) )
5650
5651 else
5652
5653 AB.EntScanner = false
5654
5655 AB.ChatText( "Disabled Entity Scanner", Color(255,205,205) )
5656
5657 if AB.ScannerButton1 then AB.ScannerButton1:Remove() end
5658
5659 if AB.ScannerButton2 then AB.ScannerButton2:Remove() end
5660
5661 end
5662
5663end
5664
5665
5666
5667AB.MouseReleased = false
5668
5669function AB.ToggleFreeMouse()
5670
5671 if !AB.MouseReleased then
5672
5673 gui.EnableScreenClicker( true )
5674
5675 AB.MouseReleased = true
5676
5677 else
5678
5679 gui.EnableScreenClicker( false )
5680
5681 AB.MouseReleased = false
5682
5683 end
5684
5685end
5686
5687concommand.Add("ace_toggle_mouse_cursor", AB.ToggleFreeMouse)
5688
5689
5690
5691function AB.CalcView( ply, pos, angles, fov )
5692
5693local me = LocalPlayer()
5694
5695if !me:IsValid() or !me:Alive() or me:GetViewEntity() != me or me:InVehicle() then return end
5696
5697
5698
5699local tps = {}
5700
5701
5702
5703 if AB.Vars.SilentAim and !AB.Vars.Thirdperson and lastoldang and isangle( lastoldang ) then
5704
5705 tps.origin = me:EyePos()
5706
5707 tps.angles = lastoldang
5708
5709 tps.fov = fov
5710
5711 return tps
5712
5713 end
5714
5715
5716
5717 if AB.Vars.NoRecoil and !AB.Vars.Thirdperson then
5718
5719-- tps.origin = me:EyePos()
5720
5721 tps.angles = me:EyeAngles()
5722
5723-- tps.fov = fov
5724
5725 return tps
5726
5727 end
5728
5729
5730
5731 if AB.Vars.Thirdperson then
5732
5733 if AB.RenderPanic then return end
5734
5735 local trace = util.TraceLine( { start = pos - ply:GetForward() * 2, endpos = pos - angles:Forward() * AB.NumberVars.TPSDistance, filter = player.GetAll(), mask = MASK_SHOT } )
5736
5737 tps.origin = trace.HitPos + ply:GetForward() * 20 + ply:GetRight() * AB.NumberVars.TPSOffset
5738
5739 tps.angles = angles
5740
5741 tps.fov = fov
5742
5743 return tps
5744
5745 end
5746
5747
5748
5749end
5750
5751hook.Add("CalcView", "ab_calcview", AB.CalcView)
5752
5753
5754
5755
5756
5757function AB.ICanSeeMyAss( ply )
5758
5759if AB.Vars.Thirdperson then return true end
5760
5761return false
5762
5763end
5764
5765hook.Add("ShouldDrawLocalPlayer", "ab_drawplayer", AB.ICanSeeMyAss)
5766
5767
5768
5769-- it would be very wise to keep this disabled for now
5770
5771/*
5772
5773function AB.Transparency()
5774
5775if AB.Vars.XrayProps then
5776
5777 for k, v in pairs(ents.GetAll()) do
5778
5779 render.SuppressEngineLighting( true )
5780
5781 end
5782
5783end
5784
5785end
5786
5787
5788
5789hook.Add("RenderScene", "ab_transparency", AB.Transparency)
5790
5791*/
5792
5793
5794
5795function AB.CheckWitnesses()
5796
5797if !AB.Vars.WitnessDetector then return end
5798
5799AB.Witnesses = {}
5800
5801for k, v in pairs(player.GetAll()) do
5802
5803 if v:IsValid() and v != LocalPlayer() then
5804
5805 local Trace = {}
5806
5807 Trace.start = LocalPlayer():EyePos() + Vector(0, 0, 32)
5808
5809 Trace.endpos = v:EyePos() + Vector(0, 0, 32)
5810
5811 Trace.filter = {v, LocalPlayer()}
5812
5813
5814
5815 TraceRes = util.TraceLine(Trace)
5816
5817
5818
5819 if !TraceRes.Hit then
5820
5821 if (v:EyeAngles():Forward():Dot((LocalPlayer():EyePos() - v:EyePos())) > math.cos(math.rad(45))) then
5822
5823 if !table.HasValue(AB.Witnesses, v) then table.insert( AB.Witnesses, v ) end
5824
5825 end
5826
5827 end
5828
5829
5830
5831 end
5832
5833end
5834
5835end
5836
5837timer.Create("ab_WitnessCheck", 0.5, 0, AB.CheckWitnesses)
5838
5839
5840
5841local nxtscan = CurTime()
5842
5843function AB.ScanForTraitors()
5844
5845 if nxtscan > CurTime() then return end
5846
5847/*
5848
5849 for _, ply in pairs(player.GetAll()) do
5850
5851 if ply == LocalPlayer() then continue end
5852
5853 if ply:GetRole() == ROLE_DETECTIVE then continue end
5854
5855 if !ply:GetActiveWeapon() or !ply:GetActiveWeapon():IsValid() then continue end
5856
5857
5858
5859 if ply:GetActiveWeapon().CanBuy and table.HasValue( ply:GetActiveWeapon().CanBuy, ROLE_TRAITOR ) and !table.HasValue( AB.Traitors, ply ) then
5860
5861 table.insert( AB.Traitors, ply )
5862
5863 surface.PlaySound("buttons/bell1.wav")
5864
5865 AB.ChatText( ply:Nick().." is a filthy nasty traitor!", Color(255,100,0) )
5866
5867 end
5868
5869
5870
5871 end
5872
5873*/
5874
5875 nxtscan = CurTime() + 0.5
5876
5877
5878
5879 for _,v in pairs(ents.GetAll()) do
5880
5881 if GetRoundState() == 3 and v:IsWeapon() and type(v:GetOwner()) == "Player" and v.Buyer == nil and v.CanBuy and table.HasValue(v.CanBuy, 1) and !table.HasValue(AB.Traitors, v:GetOwner()) then
5882
5883 local owner = v:GetOwner()
5884
5885 if !owner:IsValid() then continue end
5886
5887 if owner:GetRole() == 2 then
5888
5889 v.Buyer = owner
5890
5891 else
5892
5893 table.insert(AB.Traitors, owner)
5894
5895 AB.ChatText( ply:Nick().." is a filthy nasty traitor! He bought a: "..v:GetClass(), Color(255,100,0) )
5896
5897 end
5898
5899 elseif GetRoundState() != 3 then
5900
5901 AB.Traitors = {}
5902
5903 end
5904
5905 end
5906
5907
5908
5909end
5910
5911
5912
5913function AB.ClearTraitors()
5914
5915 AB.Traitors = {}
5916
5917end
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929function AB.ChokePackets( val )
5930
5931 if val then
5932
5933 odium.engine.SetChokedPacket( 0 )
5934
5935 end
5936
5937
5938
5939end
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955function AB.XrayShutoff()
5956
5957for k, v in pairs(ents.GetAll()) do
5958
5959 v:SetColor(Color(255,255,255,255))
5960
5961end
5962
5963end
5964
5965
5966
5967AB.IsTTT = false
5968
5969
5970
5971local demotereasons = {
5972
5973 "Nigger",
5974
5975 "Faggot",
5976
5977 "Dickhead",
5978
5979 "Cuckold",
5980
5981 "RDM",
5982
5983 "Shit eating faggot",
5984
5985 "RDA",
5986
5987 "NLR",
5988
5989 "Fucking sped",
5990
5991 "kys",
5992
5993 "Shit server tbh fam",
5994
5995 "Bad scripts",
5996
5997 "Skid",
5998
5999 "Admin abuse",
6000
6001 "Abusing",
6002
6003 "Fuckwit",
6004
6005 "DarkRP Player",
6006
6007}
6008
6009
6010
6011
6012
6013
6014
6015------------------------------------------------------------------------INSULT GENERATOR--------------------------------------------------------------------------------------
6016
6017
6018
6019
6020
6021
6022
6023local openers = {
6024
6025 "get fucked",
6026
6027 "eat shit",
6028
6029 "fuck a baboon",
6030
6031 "suck my dingleberries",
6032
6033 "choke on steaming cum",
6034
6035 "die in a fire",
6036
6037 "gas yourself",
6038
6039 "sit on garden shears",
6040
6041 "choke on scrotum",
6042
6043 "shove a brick up your ass",
6044
6045 "swallow barbed wire",
6046
6047 "move to sweden",
6048
6049 "fuck a pig",
6050
6051 "bow to me",
6052
6053 "suck my ball sweat",
6054
6055 "come back when you aren't garbage",
6056
6057 "i will piss on everything you love",
6058
6059 "kill yourself",
6060
6061 "livestream suicide",
6062
6063 "neck yourself",
6064
6065 "go be black somewhere else",
6066
6067 "rotate on it",
6068
6069 "choke on it",
6070
6071 "blow it out your ass",
6072
6073 "go browse tumblr",
6074
6075 "go back to darkrp",
6076
6077 "sit on horse cock",
6078
6079 "drive off a cliff",
6080
6081 "rape yourself",
6082
6083 "get raped by niggers",
6084
6085 "fuck right off",
6086
6087 "you mother is a whore",
6088
6089 "come at me",
6090
6091 "go work the corner",
6092
6093-- "you are literal cancer",
6094
6095 "why haven't you killed yourself yet",
6096
6097 "why do you even exist",
6098
6099 "shoot your balls off with a shotgun",
6100
6101 "sterilize yourself",
6102
6103 "convert to islam",
6104
6105 "drink bleach",
6106
6107 "remove yourself",
6108
6109 "choke on whale cock",
6110
6111 "suck shit",
6112
6113 "suck a cock",
6114
6115 "lick my sphincter",
6116
6117 "set yourself on fire",
6118
6119 "drink jenkem",
6120
6121 "get beaten to death by your dad",
6122
6123 "choke on your uncle's cock",
6124
6125 "get sat on by a 200kg feminist",
6126
6127 "blow off",
6128
6129 "join isis",
6130
6131 "stick your cock in a blender",
6132
6133 "OD yourself on meth",
6134
6135 "lie under a truck",
6136
6137 "lick a wall socket",
6138
6139 "swallow hot coals",
6140
6141 "die slowly",
6142
6143 "explode yourself",
6144
6145 "swing from the noose",
6146
6147 "end yourself",
6148
6149 "take your best shot",
6150
6151 "get shot in a gay bar",
6152
6153 "drink pozzed cum",
6154
6155 "marry a muslim",
6156
6157 "get a better cheat",
6158
6159 "rub your dick on a cheese grater",
6160
6161 "wrap a rake with barbed wire and sodomize yourself",
6162
6163 "close your gaping cunt",
6164
6165}
6166
6167
6168
6169local joiners = {
6170
6171 "cancer infested",
6172
6173 "cock sucking",
6174
6175 "fuck faced",
6176
6177 "cunt eyed",
6178
6179 "nigger fucking",
6180
6181 "candy ass",
6182
6183 "fairy ass fucking",
6184
6185 "shit licking",
6186
6187 "unlovable",
6188
6189 "disgusting",
6190
6191 "degenerate",
6192
6193 "fuck headed",
6194
6195 "dick lipped",
6196
6197 "autismal",
6198
6199 "gook eyed",
6200
6201 "mongoloided",
6202
6203 "cunt faced",
6204
6205 "dick fisted",
6206
6207 "worthless",
6208
6209 "bleeding cunted",
6210
6211 "hillary loving",
6212
6213 "maggot infested",
6214
6215 "boot lipped",
6216
6217 "chink eyed",
6218
6219 "shit skinned",
6220
6221 "nigger headed",
6222
6223 "lgbt supporting",
6224
6225 "cum stained",
6226
6227}
6228
6229
6230
6231local enders = {
6232
6233 "fuck face",
6234
6235 "poofter",
6236
6237 "jew cunt",
6238
6239 "fagmaster",
6240
6241 "goat rapist",
6242
6243 "rag head",
6244
6245 "cock cheese",
6246
6247 "vaginaphobe",
6248
6249 "coon",
6250
6251 "nigger",
6252
6253 "slag cunt",
6254
6255 "garbage man",
6256
6257 "paeodophile",
6258
6259 "kiddy toucher",
6260
6261 "pony fucker",
6262
6263 "tumblrite",
6264
6265 "sperglord",
6266
6267 "gorilla's dick",
6268
6269 "shit licker",
6270
6271 "shit slick",
6272
6273 "redditor",
6274
6275 "pig fucker",
6276
6277 "spastic",
6278
6279 "cuckold",
6280
6281 "chode gobbler",
6282
6283 "fuckwit",
6284
6285 "retard",
6286
6287 "mongoloid",
6288
6289 "elephants cunt",
6290
6291 "cunt",
6292
6293 "gook",
6294
6295 "fag lord",
6296
6297 "shit stain",
6298
6299 "mpgh skid",
6300
6301 "batch coder",
6302
6303 "pony fucker",
6304
6305 "furfag",
6306
6307 "half caste",
6308
6309 "double nigger",
6310
6311 "cock socket",
6312
6313 "cunt rag",
6314
6315 "anal wart",
6316
6317 "maggot",
6318
6319 "knob polisher",
6320
6321 "fudge packer",
6322
6323 "cock slave",
6324
6325 "trashmaster",
6326
6327 "shitskin",
6328
6329 "curry muncher",
6330
6331 "gator bait",
6332
6333 "bootlip",
6334
6335 "camel jockey",
6336
6337 "wog cunt",
6338
6339 "hooknosed kike",
6340
6341 "feminist",
6342
6343 "wop cunt",
6344
6345 "abbo",
6346
6347 "porch monkey",
6348
6349 "dago",
6350
6351 "anal secretion",
6352
6353 "pig cunt",
6354
6355 "insect",
6356
6357 "sub human",
6358
6359 "mental defect",
6360
6361 "fat whore",
6362
6363 "cunt blood",
6364
6365 "cunt rag",
6366
6367 "cotton picker",
6368
6369 "bum tickling fag",
6370
6371 "degenerate faggot",
6372
6373 "smegma lump",
6374
6375 "darkie",
6376
6377 "fuck toy",
6378
6379 "underage midget cunt",
6380
6381 "twelvie",
6382
6383 "faggot teenager",
6384
6385 "ankle biter",
6386
6387 "fat cunt american",
6388
6389 "bernie loving washout",
6390
6391 "fucking failure",
6392
6393 "cum dumpster",
6394
6395 "waste of skin",
6396
6397 "petrol sniffing coon",
6398
6399 "jenkem bottle",
6400
6401 "dirty jew",
6402
6403 "darkrp admin",
6404
6405 "cuck master",
6406
6407 "barrel of piss",
6408
6409 "tankard of shit",
6410
6411 "cock wart",
6412
6413}
6414
6415
6416
6417local adminstarts = {
6418
6419 "How much did you pay for that staff rank",
6420
6421 "Nice server you got here",
6422
6423 "How much did that gay ULX rank cost",
6424
6425 "I'll be back to shit on you again",
6426
6427 "This is only my first alt account",
6428
6429 "What autist gave you a staff rank",
6430
6431 "Banning me only makes my cock harder",
6432
6433 "I'll be back on a new account in 10 minutes",
6434
6435 "Your server deserves to be destroyed",
6436
6437 "It's been fun wrecking this shit hole",
6438
6439 "Stop touching me with your physgun",
6440
6441 "Letting you have admin was a mistake",
6442
6443 "Do what you must, I have already won",
6444
6445 "Bans mean nothing to me",
6446
6447 "You should appreciate me showing you how to break your terrible server security",
6448
6449 "I hunt down faggots like you for sport",
6450
6451 "I am better than you in every single way",
6452
6453 "I bypassed your anticheat and I'll bypass your ban too",
6454
6455 "Only power mad midget cucks become staff on darkrp",
6456
6457 "Lmao another bad server ruined",
6458
6459 "Watch me rejoin on a VPN",
6460
6461}
6462
6463
6464
6465-- i gave myself terminal autism writing these
6466
6467local cancerstrike = {
6468
6469 "LOL fuk u silver scUm",
6470
6471 "nice aim doEs It cume in NOT N00be?",
6472
6473 "u r terible my doode",
6474
6475 "u almost hit me that time LOL",
6476
6477 "ur aim iz a joke my man",
6478
6479 "get shrekt skrub xdddd",
6480
6481 "u just got shitted on kidddd",
6482
6483 "i bet u r silver on csgo xD",
6484
6485 "u never stood a chance against my pSkillz",
6486
6487 "ur just 2bad to kill me :^(",
6488
6489 "dam im good",
6490
6491 "u wil never beat odium hax kidd :^)",
6492
6493 "eat shit and die xdd",
6494
6495 "do u use xashpass cos ur 2 bad to bypass cac :D",
6496
6497 "i laugh at ur shit skillz :D",
6498
6499 "get fukn owned kid xd",
6500
6501 "i kill u every time u shud try harder :^(",
6502
6503 "all u can do is die LOL",
6504
6505 "N00bez like u cant beat me LOL",
6506
6507 "u tried but im jus 2 gud 4 u",
6508
6509 "u cant even hit me LOL uninstall kid xd",
6510
6511 "git GUD skrub u r an embarasment",
6512
6513 "pathetic LOL",
6514
6515 "2 bad so sad u just bad :^(",
6516
6517 "im global elit in gmod xd",
6518
6519 "thx 4 free kill loser :D",
6520
6521 "r u even trying???",
6522
6523 "top kekt u got rekt",
6524
6525 "fuken smashed kunt :D",
6526
6527 "u shud add me so i can teach u how 2 shoot LOL",
6528
6529 "ur jus 2 weak and sad to beat me xd",
6530
6531 "looks liek ur sad life isnt working out 2 well 4 u :D",
6532
6533 "dats all u got??? LOL!",
6534
6535}
6536
6537
6538
6539local supercancerstrike = {
6540
6541 "dont upsetti hav some spagetti",
6542
6543 "eat my asse like a bufet (3 corse meal xd)",
6544
6545 "i ownt u in ur gay butth0le",
6546
6547 "umade noobe?",
6548
6549 "le troled hard",
6550
6551 "go wach naturo and play wif urself fag REKT",
6552
6553 "LOL i fuckd u so hard just like ur mum lst nit fag",
6554
6555 "u play liek a blynd stefen hawkin haha",
6556
6557 "ARE U GUEYS NEW??",
6558
6559 "are u as bad at life as u are in gmod??",
6560
6561 "omg this is 2 ezy are U even trying??",
6562
6563 "why dont u go play halo an fist ur butthol faget",
6564
6565 "hey granma is that u???? LOL so bad",
6566
6567 "time for you 2 uninstale the game shit stane",
6568
6569 "congrtulations ur the worlds worst gmod player",
6570
6571 "dose ur aim come in NOT NOOBE? LMAO",
6572
6573 "lol i troled u so hard *OWNED*",
6574
6575 "\"i lik 2 eat daddys logs of poo for lucnh while jackn off 2 naturo\"- u",
6576
6577 "take a se4t faget $hitstain u got OWNDE",
6578
6579 "LOL scrub ur gettin rekt hardcroe",
6580
6581 "R u mad becouse ur bad nooby?",
6582
6583 "LMAO did u go to da buthurt king an g3t urself a butthurt with fries?!?",
6584
6585 "why dont u go and play manoppoly you noob",
6586
6587 "you hav no lyfe you cant evan play gmod propaly",
6588
6589 "im hi rite now on ganj but im stil ownen u xD",
6590
6591 "if u want my cum bake ask ur mum LOL",
6592
6593 "butdocter prognoses: OWND",
6594
6595 "cry 2 ur dads dick forver noob",
6596
6597 "lol troled autismal faget",
6598
6599 "LOL N3RD owned",
6600
6601 "\"i love to drink sprems all day\"- u",
6602
6603 "crushd nerd do u want a baindaid for that LOL",
6604
6605 "lol rectal rekage ur so sh1t lol",
6606
6607 "ass states - [_] NOT REKT [X] REKT",
6608
6609 "lmao do u even try????",
6610
6611 "are u slippan off ur chaire cos ur ass is bleeding so hard??",
6612
6613 "u better get a towel for all ur tears faget",
6614
6615 "u got ass asassenated by me rofl",
6616
6617 "u wont shit agen thats how rekt ur ass is",
6618
6619 "i bet youre anus is sore from me ownen u LOL",
6620
6621 "im gonna record a fragshow so i can watch me pwn u ova and ova LMAO",
6622
6623 "i almost feel sorry for you hahahaha",
6624
6625 "lol why dont u play COD so i can own you there too",
6626
6627 "how dose it feel to be owneded so hartd??",
6628
6629 "rekt u lol another one for the fraghsow",
6630
6631 "if i was as bade as u i would kil myself",
6632
6633 "dont fell bad not ervry one can be goode",
6634
6635 "do u need some loob for ur butt so it doesnt hurt so much when i fuck u",
6636
6637 "spesciall delivary for CAPTEN BUTTHURT",
6638
6639 "wats wrong cant play wif ur dads dik in ur mouth????",
6640
6641 "maybe if u put down the cheseburgers u could kill me lol fat nerd",
6642
6643 "getting mad u virgan nerd??",
6644
6645 "butt docta prognosis: buttfustrated",
6646
6647 "<<< OWEND U >>>",
6648
6649 "if u were a fish you wuld be a sperm whael LOL",
6650
6651 ">mfw i ownd u",
6652
6653 "rekt u noob *OWNED*",
6654
6655 "ur gonna have 2 wear dipers now cos ur ass got SHREDED by me",
6656
6657 "y dont u take a short strole to the fagot store and buy some skills scrub",
6658
6659 "school3d by a 13yo lol u r rely bad",
6660
6661 "ur pathetic nerd its like u have parkensons",
6662
6663 "u just got promoted 2 cumcaptain prestige",
6664
6665 "lol pwnd",
6666
6667 "u just got butt raped lol TROLLED U",
6668
6669 "did u learn 2 aim from stevie wondar??? LOL",
6670
6671 "tell ur mum to hand the keyboard and mosue back",
6672
6673 "how does it feel to be shit on by a 13 yer old",
6674
6675 "r u into scat porns or some thing cos it feel\"s like u want me 2 shit on u",
6676
6677 "u play gmod like my granpa and hes ded",
6678
6679 "are u new or just bad?? noobe",
6680
6681 "u play gmod lik a midget playin basket ball",
6682
6683 "welcome to the noob scoole bus first stop ur house <<PWND>>",
6684
6685 ">mfw i rek u",
6686
6687 "\"i got my ass kiked so hard im shittn out my mouf\" - u",
6688
6689 "<-(0.0)-< dats u gettn ownd LOL",
6690
6691 "u just got ur ass ablitterated <<<RECKT>>>",
6692
6693 "c=3 (dats ur tiney dik rofl)",
6694
6695 "just leeve the game and let the real mans play",
6696
6697 "ur so bad u make ur noobe team look good",
6698
6699 "CONGRASTULATIONS YOU GOT FRIST PRIZE IN BEING BUTT MAD (BUT LAST IN PENIS SIZE LMAO)",
6700
6701 "im not even trying to pwn u its just so easy",
6702
6703 "im only 13 an im better than u haha XD",
6704
6705 "u just got raped",
6706
6707 "some one an ambulance cos u just got DE_STROYED",
6708
6709 "i hope u got birth control coz u got rapped",
6710
6711 "lol pwnd scrubb",
6712
6713 "you play lik a girl",
6714
6715 "\"i got fukd so hard dat im cummin shit n shittn cum\"- u",
6716
6717 "ur gonna need tampons for ur ass afta that ownage",
6718
6719 "{{ scoooled u }}",
6720
6721 "(O.o) ~c======3 dats me jizzan on u",
6722
6723 "dont worry at least ur tryan XD",
6724
6725 "cya noob send me a post card from pwnd city ROFL",
6726
6727 "its ok if u keep practasing u will get bettar lol #rekt",
6728
6729 "\"evry time i fart 1 liter of cum sqerts out\" - u",
6730
6731 "rofl i pwnd u scrub #420 #based #mlgskill",
6732
6733 "u fail just like ur dads condom",
6734
6735 "if i pwnd u any harder it wud be animal abuse",
6736
6737 "uploaden this fragshow roflmao",
6738
6739}
6740
6741
6742
6743local buyourshitfaggot = {
6744
6745 "CAC + VAC + HAC + SAC UNDETECTED",
6746
6747 "STEP UP YOUR GAME FAGGOT",
6748
6749 "RUN ANY LUA SCRIPT UNDETECTED",
6750
6751 "BE THE BEST WHEN YOU BUY THE BEST",
6752
6753 "MAKE DARKRP KIDS CRY",
6754
6755 "DEMOLISH THE LUA STATE",
6756
6757 "PUT YOUR POWER ON DISPLAY",
6758
6759 "STOMP NOOBS INTO THE DIRT",
6760
6761 "CRASH SERVERS WITH NO SURVIVORS",
6762
6763 "HACK ANYWHERE, ANYTIME, ANYONE",
6764
6765 "DESTROY ALL ANTICHEATS",
6766
6767 "TRIGGER FEMINISTS",
6768
6769 "START A SECOND HOLOCAUST",
6770
6771 "TIRED OF BEING A TOTAL FUCKING LOSER?",
6772
6773 "STOMP THE COMP",
6774
6775 "BLACK LIVES SPLATTERED",
6776
6777 "MAKE FACEPUNCH FACEDUNKED",
6778
6779 "BECOME UNBANNABLE",
6780
6781 "DUNK SO HARD YOU BREAK THE NET",
6782
6783 "#1 CAUSE OF ADMIN SUICIDES",
6784
6785 "NO FAT CHICKS",
6786
6787 "DO U <3 CHEATING?",
6788
6789 "LEGIT IS FOR LOSERS",
6790
6791 "YOUR LOSER PARENTS NEVER BOUGHT YOU TOYS THIS COOL",
6792
6793 "SHOOT THE HOTTEST LOADS",
6794
6795}
6796
6797
6798
6799local thistriggersamericans = {
6800
6801 "If i found out a girl I was flirting with was transgender I'd bash the fuck out of that degenerate cunt",
6802
6803 "Feminism is a tool satan is using to corrupt and destroy gods country, FIGHT BACK!",
6804
6805 "It's scientifically proven that women are physically and mentally weaker than men",
6806
6807 "Man's job is to build empires and conquer the earth, woman's only job is to make more men",
6808
6809
6810
6811}
6812
6813
6814
6815local annoyingquestions = {
6816
6817 "whats the max tabs you can have open on a vpn",
6818
6819 "how many vpns does it take to stop a ddos",
6820
6821 "whats better analog or garrys mod",
6822
6823 "whats the time",
6824
6825 "is it possible to make a clock in binary",
6826
6827 "how many cars can you drive at once",
6828
6829 "did you know there's more planes on the ground than there is submarines in the air",
6830
6831 "how many busses can you fit on 1 bus",
6832
6833 "how many tables does it take to support a chair",
6834
6835 "how many doors does it take to screw a screw",
6836
6837 "how long can you hold your eyes closed in bed",
6838
6839 "how long can you hold your breath for under spagetti",
6840
6841 "whats the fastest time to deliver the mail as mail man",
6842
6843 "how many bees does it take to make a wasp make honey",
6844
6845 "If I paint the sun blue will it turn blue",
6846
6847 "how many beavers does it take to build a dam",
6848
6849 "how much wood does it take to build a computer",
6850
6851 "can i have ur credit card number",
6852
6853 "is it possible to blink and jump at the same time",
6854
6855 "did you know that dinosaurs were, on average, large",
6856
6857 "how many thursdays does it take to paint an elephant purple",
6858
6859 "if cars could talk how fast would they go",
6860
6861 "did you know theres no oxygen in space",
6862
6863 "do toilets flush the other way in australia",
6864
6865 "if i finger paint will i get a splinter",
6866
6867 "can you build me an ant farm",
6868
6869 "did you know australia hosts 4 out of 6 of the deadliest spiders in the world",
6870
6871 "is it possible to ride a bike in space",
6872
6873 "can i make a movie based around your life",
6874
6875 "how many pants can you put on while wearing pants",
6876
6877 "if I paint a car red can it wear pants",
6878
6879 "how come no matter what colour the liquid is the froth is always white",
6880
6881 "can a hearse driver drive a corpse in the car pool lane",
6882
6883 "how come the sun is cold at night",
6884
6885 "why is it called a TV set when there is only one",
6886
6887 "if i blend strawberries can i have ur number",
6888
6889 "if I touch the moon will it be as hot as the sun",
6890
6891 "did u know ur dad is always older than u",
6892
6893 "did u know the burger king logo spells burger king",
6894
6895 "did uknow if u chew on broken glass for a few mins, it starts to taste like blood",
6896
6897 "did u know running is faster than walking",
6898
6899 "did u kno the colur blue is called blue because its blue",
6900
6901 "did you know a shooting star isnt a star",
6902
6903 "did u know shooting stars dont actually have guns",
6904
6905 "did u kno the great wall of china is in china",
6906
6907 "statistictal fact: 100% of non smokers die",
6908
6909 "did you kmow if you eat you poop it out",
6910
6911 "did u know rain clouds r called rain clouds cus they are clouds that rain",
6912
6913 "if cows drink milk is that cow a cannibal",
6914
6915 "did u know you cant win a staring contest with a stuffed animal",
6916
6917 "did u know if a race car is at peak speed and hits someone they'll die",
6918
6919 "did u know the distance between the sun and earth is the same distance as the distance between the earth and the sun",
6920
6921 "did u kno flat screen tvs arent flat",
6922
6923 "did u know aeroplane mode on ur phone doesnt make ur phone fly",
6924
6925 "did u kno too many britdhays can kill you",
6926
6927 "did u know rock music isnt for rocks",
6928
6929 "did u know if you eat enough ice you can stop global warming",
6930
6931 "if ww2 happened before vietnam would that make vietnam world war 2",
6932
6933 "did you know 3.14 isn't a real pie",
6934
6935 "did u know 100% of stair accidents happen on stairs",
6936
6937 "can vampires get AIDS",
6938
6939 "what type of bird was a dodo",
6940
6941 "did u know dog backwards is god",
6942
6943 "did you know on average a dog barks more than a cat",
6944
6945}
6946
6947
6948
6949function AB.GenerateInsult()
6950
6951 return table.Random(openers).." you "..table.Random(joiners).." "..table.Random(enders)
6952
6953end
6954
6955
6956
6957function AB.GenerateInsult2()
6958
6959 return string.upper(table.Random(openers)).." YOU "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(enders))
6960
6961end
6962
6963
6964
6965function AB.GenerateInsult3()
6966
6967 return table.Random(adminstarts).." you "..table.Random(joiners).." "..table.Random(enders)
6968
6969end
6970
6971
6972
6973function AB.GenerateInsult4()
6974
6975 return table.Random(cancerstrike)
6976
6977end
6978
6979
6980
6981function AB.GenerateInsult5()
6982
6983 return table.Random(supercancerstrike)
6984
6985end
6986
6987
6988
6989function AB.GeneratePromo()
6990
6991 return table.Random(buyourshitfaggot).." --> GET ODIUM.PRO"
6992
6993end
6994
6995
6996
6997function AB.FormatChatString( str )
6998
6999 str = string.Replace( str, "@1", AB.GenerateInsult() )
7000
7001 str = string.Replace( str, "@2", AB.GenerateInsult2() )
7002
7003 str = string.Replace( str, "@3", AB.GenerateInsult3() )
7004
7005 str = string.Replace( str, "@4", AB.GenerateInsult4() )
7006
7007 str = string.Replace( str, "@opener", table.Random(openers) )
7008
7009 str = string.Replace( str, "@joiner", table.Random(joiners) )
7010
7011 str = string.Replace( str, "@slur", table.Random(enders) )
7012
7013 str = string.Replace( str, "@getodium", AB.GeneratePromo() )
7014
7015 str = string.Replace( str, "@csgo", AB.GenerateInsult5() )
7016
7017 return str
7018
7019end
7020
7021
7022
7023concommand.Add("ace_insult", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult() ) end)
7024
7025concommand.Add("ace_insult2", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult2() ) end)
7026
7027local siterator = 1
7028
7029concommand.Add("ace_insult3", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult3() ) end)
7030
7031concommand.Add("ace_insult4", function() LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end)
7032
7033
7034
7035concommand.Add("ace_chatspam_once", function()
7036
7037 local txt = AB.ChatSpamText
7038
7039 if AB.Vars.ChatSpamOOC then txt = "// "..txt end
7040
7041 txt = AB.FormatChatString( txt )
7042
7043 if AB.Vars.ChatSpamPM then
7044
7045 for _, p in pairs(player.GetAll()) do
7046
7047 if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
7048
7049 RunConsoleCommand("ulx", "psay", p:Nick(), txt)
7050
7051 end
7052
7053 else
7054
7055 RunConsoleCommand("say", txt)
7056
7057 end
7058
7059end)
7060
7061
7062
7063
7064
7065
7066
7067--AB.CurrentBase = 0
7068
7069--AB.BaseAreaSize = 2000
7070
7071function AB.SetBase()
7072
7073 AB.ChatText( "Set base location", Color(255,255,255) )
7074
7075 AB.CurrentBase = LocalPlayer():GetPos()
7076
7077end
7078
7079concommand.Add( "ace_base_set", AB.SetBase )
7080
7081
7082
7083function AB.UnsetBase()
7084
7085 AB.ChatText( "Removed base", Color(255,255,255) )
7086
7087 AB.CurrentBase = 0
7088
7089end
7090
7091concommand.Add( "ace_base_remove", AB.UnsetBase )
7092
7093
7094
7095function AB.SetBaseSize( p, cmd, arg, astr )
7096
7097 if !tonumber( arg[1] ) then AB.ChatText( "Please specify a valid base radius in metres", Color(255,205,205) ) return end
7098
7099 AB.ChatText( "Set base proximity radius to "..arg[1].."m", Color(255,255,255) )
7100
7101 AB.BaseAreaSize = arg[1]
7102
7103end
7104
7105concommand.Add( "ace_base_setsize", AB.SetBaseSize )
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119local elements = {
7120
7121 { -- Screen
7122
7123 x = 0.075,
7124
7125 y = 0.04,
7126
7127 w = 0.85,
7128
7129 h = 0.25,
7130
7131
7132
7133 },
7134
7135 { -- ABORT
7136
7137 x = 0.075,
7138
7139 y = 0.04 + 0.25 + 0.03,
7140
7141 w = 0.85 / 2 - 0.04 / 2 + 0.05,
7142
7143 h = 0.125,
7144
7145 text = "ABORT",
7146
7147 },
7148
7149 { -- OK
7150
7151 x = 0.5 + 0.04 / 2 + 0.05,
7152
7153 y = 0.04 + 0.25 + 0.03,
7154
7155 w = 0.85 / 2 - 0.04 / 2 - 0.05,
7156
7157 h = 0.125,
7158
7159 text = "OK",
7160
7161 }
7162
7163}
7164
7165
7166
7167do -- Create numbers
7168
7169 for i = 1, 9 do
7170
7171 local column = (i - 1) % 3
7172
7173
7174
7175 local row = math.floor((i - 1) / 3)
7176
7177
7178
7179 local element = {
7180
7181 x = 0.075 + (0.3 * column),
7182
7183 y = 0.175 + 0.25 + 0.05 + ((0.5 / 3) * row),
7184
7185 w = 0.25,
7186
7187 h = 0.13,
7188
7189 text = tostring(i),
7190
7191 }
7192
7193 table.insert(elements, element)
7194
7195 end
7196
7197end
7198
7199
7200
7201
7202
7203function AB.CalculateKeypadCursorPos(ply, ent)
7204
7205 if !ply:IsValid() then return end
7206
7207
7208
7209 local tr = util.TraceLine( { start = ply:EyePos(), endpos = ply:EyePos() + ply:GetAimVector() * 65, filter = ply } )
7210
7211 if !tr.Entity or tr.Entity ~= ent then return 0, 0 end
7212
7213
7214
7215 local scale = ent.Scale
7216
7217 if !scale then return 0, 0 end
7218
7219
7220
7221 local pos, ang = ent:CalculateRenderPos(), ent:CalculateRenderAng()
7222
7223 if !pos or !ang then return 0, 0 end
7224
7225 local normal = ent:GetForward()
7226
7227
7228
7229 local intersection = util.IntersectRayWithPlane(ply:EyePos(), ply:GetAimVector(), pos, normal)
7230
7231 if !intersection then return 0, 0 end
7232
7233
7234
7235 local diff = pos - intersection
7236
7237
7238
7239 local x = diff:Dot( -ang:Forward() ) / scale
7240
7241 local y = diff:Dot( -ang:Right() ) / scale
7242
7243
7244
7245 return x, y
7246
7247end
7248
7249
7250
7251function AB.KPGetHoveredElement(ply, ent)
7252
7253 local scale = ent.Scale
7254
7255
7256
7257 local w, h = ent.Width2D, ent.Height2D
7258
7259 local x, y = AB.CalculateKeypadCursorPos(ply, ent)
7260
7261
7262
7263 for _, element in ipairs(elements) do
7264
7265 local element_x = w * element.x
7266
7267 local element_y = h * element.y
7268
7269 local element_w = w * element.w
7270
7271 local element_h = h * element.h
7272
7273
7274
7275 if element_x < x and element_x + element_w > x and
7276
7277 element_y < y and element_y + element_h > y
7278
7279 then
7280
7281 return element
7282
7283 end
7284
7285 end
7286
7287end
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309AB.ShekelGrabbers = {}
7310
7311local nxsuicidemsg = 0
7312
7313function AB.Logic()
7314
7315local me = LocalPlayer()
7316
7317if !me:IsValid() then return end
7318
7319
7320
7321local lmemfootprint = gcinfo()
7322
7323
7324
7325for k, v in pairs(player.GetAll()) do
7326
7327
7328
7329-- spectator detector
7330
7331 if( v:GetObserverTarget() and v != me and v:GetObserverTarget() == me and !table.HasValue( AB.TheyHaveEyesEverywhere, v ) ) then
7332
7333 surface.PlaySound("buttons/bell1.wav")
7334
7335 AB.ChatText( v:Nick().." has begun spectating you!", Color(255,100,0) )
7336
7337 table.insert( AB.TheyHaveEyesEverywhere, v )
7338
7339 end
7340
7341
7342
7343 if AB.Vars.DodgeArrest then
7344
7345 if v != me and v:EyePos():Distance( me:GetPos() ) < 120 and me:Alive() and ( v:GetActiveWeapon() and v:GetActiveWeapon():IsValid() and v:GetActiveWeapon():GetClass() == "arrest_stick" ) then
7346
7347 if nxsuicidemsg <= CurTime() then
7348
7349 AB.ChatText( "Automatically suicided to avoid being arrested by "..v:Nick(), Color(255,255,255) )
7350
7351 nxsuicidemsg = CurTime() + 1
7352
7353 end
7354
7355 RunConsoleCommand( "kill" )
7356
7357 end
7358
7359 end
7360
7361
7362
7363
7364
7365 if AB.Vars.KeypadJew then
7366
7367
7368
7369 local kp = v:GetEyeTrace().Entity
7370
7371 if IsValid(kp) && IsValid(v) and string.find( kp:GetClass(), "Keypad") and v:EyePos():Distance(kp:GetPos()) <= 120 then
7372
7373 kp.tempCode = kp.tempCode or ""
7374
7375 kp.tempText = kp.tempText or ""
7376
7377 kp.tempStatus = kp.tempStatus or 0
7378
7379
7380
7381 if kp:GetText() != kp.tempText or kp:GetStatus() != kp.tempStatus then
7382
7383 kp.tempText = kp:GetText()
7384
7385 kp.tempStatus = kp:GetStatus()
7386
7387 if(kp.tempText && !kp:GetSecure()) then
7388
7389 kp.tempCode = kp.tempText
7390
7391 timer.Simple(0, function()
7392
7393 if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
7394
7395 kp.code = kp.tempCode
7396
7397 end
7398
7399 end)
7400
7401 else
7402
7403 local i = AB.KPGetHoveredElement(v, kp)
7404
7405 if (i) then i = i.text end
7406
7407 if kp.tempText then
7408
7409 timer.Simple(0, function()
7410
7411 if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
7412
7413 kp.code = kp.tempCode
7414
7415 end
7416
7417 end)
7418
7419 end
7420
7421
7422
7423 if kp.tempText == "" || kp:GetStatus() == 2 then
7424
7425 kp.tempCode = ""
7426
7427 end
7428
7429
7430
7431 timer.Simple(0, function()
7432
7433 if(tonumber(i) && kp:GetText():len() != 0) then
7434
7435 kp.tempCode = kp.tempCode..i
7436
7437 end
7438
7439 end)
7440
7441 end
7442
7443 end
7444
7445 end
7446
7447
7448
7449 end
7450
7451
7452
7453
7454
7455
7456
7457 if isvector( AB.CurrentBase ) then
7458
7459 if v == me then continue end
7460
7461 if AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) < tonumber(AB.BaseAreaSize) then
7462
7463 if !table.HasValue( AB.ShekelGrabbers, v ) then
7464
7465 surface.PlaySound("buttons/bell1.wav")
7466
7467 AB.ChatText( v:Nick().." has entered your base!", Color(255,205,0) )
7468
7469 table.insert( AB.ShekelGrabbers, v )
7470
7471 end
7472
7473 elseif table.HasValue( AB.ShekelGrabbers, v ) and AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) > tonumber(AB.BaseAreaSize) then
7474
7475 AB.ChatText( v:Nick().." has left your base", Color(100,255,100) )
7476
7477 table.RemoveByValue( AB.ShekelGrabbers, v )
7478
7479 end
7480
7481 else
7482
7483 AB.ShekelGrabbers = {}
7484
7485 end
7486
7487
7488
7489end
7490
7491
7492
7493for k,v in pairs( AB.TheyHaveEyesEverywhere ) do
7494
7495 if( !IsValid( v ) ) then table.remove( AB.TheyHaveEyesEverywhere, k ) continue end
7496
7497 if( !v:GetObserverTarget() or ( v:GetObserverTarget() and v:GetObserverTarget() != me ) ) then
7498
7499 AB.ChatText( v:Nick().." has stopped spectating you!", Color(100,255,100) )
7500
7501 table.remove( AB.TheyHaveEyesEverywhere, k )
7502
7503 end
7504
7505end
7506
7507
7508
7509if AB.Vars.ChatSpam then
7510
7511 if AB.Vars.ChatSpamBind and !me:KeyDown(IN_WALK) then return end
7512
7513 local txt = AB.ChatSpamText
7514
7515 if AB.Vars.ChatSpamInsult then txt = AB.GenerateInsult() end
7516
7517 if AB.Vars.ChatSpamOOC then txt = "// "..txt end
7518
7519 txt = AB.FormatChatString( txt )
7520
7521 if AB.Vars.ChatSpamPM then
7522
7523 for _, p in pairs(player.GetAll()) do
7524
7525 if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
7526
7527 RunConsoleCommand("ulx", "psay", p:Nick(), txt)
7528
7529 end
7530
7531 else
7532
7533 RunConsoleCommand("say", txt)
7534
7535 end
7536
7537end
7538
7539
7540
7541if AB.Vars.DemoteSpam or AB.Vars.WantedSpam or AB.Vars.ULXVotekickSpam or AB.Vars.ULXVotebanSpam then
7542
7543 for k, v in RandomPairs(player.GetAll()) do
7544
7545 if AB.IsFriend( v ) or v == me then continue end
7546
7547 local fag1, fag2 = table.Random( demotereasons )
7548
7549 if AB.Vars.DemoteSpam then RunConsoleCommand( "darkrp", "demote", v:Nick(), fag1 ) end
7550
7551 if AB.Vars.WantedSpam then RunConsoleCommand( "darkrp", "wanted", v:Nick(), fag1 ) end
7552
7553 if AB.Vars.ULXVotekickSpam then RunConsoleCommand( "ulx", "votekick", v:Nick(), fag1 ) end
7554
7555 if AB.Vars.ULXVotebanSpam then RunConsoleCommand( "ulx", "voteban", v:Nick(), "0" ) end
7556
7557 end
7558
7559end
7560
7561
7562
7563if AB.Vars.FlashlightSpam then
7564
7565 if input.IsKeyDown(KEY_F) then me:ConCommand("impulse 100") end
7566
7567end
7568
7569
7570
7571if AB.IsTTT then AB.ScanForTraitors() end
7572
7573
7574
7575AB.MemoryDebug["logic"] = gcinfo() - lmemfootprint
7576
7577
7578
7579end
7580
7581hook.Add("Think", "ab_logic", AB.Logic)
7582
7583
7584
7585
7586
7587
7588
7589function AB.PKTube()
7590
7591local oldwep = false
7592
7593if !LocalPlayer():IsOnGround() then AB.ChatText( "You can't tube launch when you aren't on the ground!", Color(255,100,0) ) return end
7594
7595if !LocalPlayer():HasWeapon("weapon_physgun") then AB.ChatText( "You don't have a physgun!", Color(255,100,0) ) return end
7596
7597if LocalPlayer():GetActiveWeapon():GetClass() != "weapon_physgun" then RunConsoleCommand( "use", "weapon_physgun" ) oldwep = true end
7598
7599
7600
7601AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(-180,0,0) )
7602
7603AB.ActionTimer( 0.05, function() RunConsoleCommand( "gm_spawn", "models/props_phx/construct/concrete_pipe01.mdl") end)
7604
7605AB.ActionTimer( 0.05, function() AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(120,0,0) ) end)
7606
7607AB.ActionTimer( 0.1, function() RunConsoleCommand( "+attack") end)
7608
7609AB.ActionTimer( 0.05, function() AB.ScrollDelta = 100 end)
7610
7611AB.ActionTimer( 0.1, function() RunConsoleCommand( "-attack") AB.ScrollDelta = 0 end)
7612
7613if oldwep then
7614
7615AB.ActionTimer( 0.01, function() RunConsoleCommand( "lastinv") end)
7616
7617end
7618
7619AB.ActionTimer( 0.1, function() RunConsoleCommand( "undo") end, true)
7620
7621
7622
7623end
7624
7625concommand.Add("ace_pk_tubelaunch", AB.PKTube)
7626
7627
7628
7629function AB.PK180()
7630
7631AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7632
7633end
7634
7635concommand.Add("ace_pk_180", AB.PK180)
7636
7637
7638
7639function AB.PK180Up()
7640
7641--AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7642
7643AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7644
7645RunConsoleCommand( "+jump")
7646
7647timer.Simple(0.1, function() RunConsoleCommand( "-jump") end)
7648
7649end
7650
7651concommand.Add("ace_pk_180up", AB.PK180Up)
7652
7653
7654
7655function AB.ClimbSwep()
7656
7657local oldang = LocalPlayer():EyeAngles()
7658
7659AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 90, LocalPlayer():EyeAngles().r) )
7660
7661timer.Simple(0.15, function() AB.EyeAngles( oldang ) end)
7662
7663end
7664
7665concommand.Add("ace_climbswep", AB.ClimbSwep)
7666
7667
7668
7669function AB.EyeAngles( ang )
7670
7671 local ang = Angle(math.Clamp(ang.p, -90, 90), ang.y, ang.r)
7672
7673 ang:Normalize()
7674
7675 LocalPlayer():SetEyeAngles(ang)
7676
7677end
7678
7679
7680
7681local actiontime = 0
7682
7683
7684
7685function AB.ActionTimer( delay, func, terminate )
7686
7687terminate = terminate or false
7688
7689actiontime = actiontime + delay + (LocalPlayer():Ping() / 1000)
7690
7691timer.Simple( actiontime, func)
7692
7693if terminate then actiontime = 0 end
7694
7695end
7696
7697
7698
7699
7700
7701
7702
7703function AB.CanSee( ply )
7704
7705local Trace = util.TraceLine( {
7706
7707start = LocalPlayer():GetShootPos(),
7708
7709endpos = AB.FindTargetPosition( ply ),
7710
7711mask = MASK_SHOT,
7712
7713filter = { LocalPlayer(), ply }
7714
7715} )
7716
7717
7718
7719return !Trace.Hit
7720
7721end
7722
7723
7724
7725
7726
7727------------------------------------------------------------------------PROPKILL UTILS--------------------------------------------------------------------------------------
7728
7729
7730
7731function AB.PhysgunPickup( p, e )
7732
7733 if AB.Vars.DontTouchMeThere and e == LocalPlayer() then RunConsoleCommand( "kill" ) end
7734
7735 AB.HoldingProp = e
7736
7737end
7738
7739
7740
7741function AB.PhysgunDrop( p, e )
7742
7743-- AB.HoldingProp = game.GetWorld()
7744
7745end
7746
7747
7748
7749hook.Add( "PhysgunPickup", "ab_physgun", AB.PhysgunPickup )
7750
7751hook.Add( "PhysgunDrop", "ab_physgun", AB.PhysgunDrop )
7752
7753
7754
7755
7756
7757------------------------------------------------------------------------WEAPON INSPECTOR--------------------------------------------------------------------------------------
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775local function gaytext( parent, text, vpos, color )
7776
7777local ABLabel = vgui.Create( "DLabel", parent )
7778
7779ABLabel:SetFont( "TargetID" )
7780
7781ABLabel:SetPos( 20, vpos)
7782
7783ABLabel:SetColor( color )
7784
7785ABLabel:SetText( text )
7786
7787ABLabel:SizeToContents()
7788
7789end
7790
7791
7792
7793local overrides = {
7794
7795
7796
7797 ["weapon_crowbar"] = {
7798
7799 Damage = 25,
7800
7801 NumShots = 1,
7802
7803 ClipSize = 1,
7804
7805 Delay = 0.404
7806
7807 },
7808
7809
7810
7811 ["weapon_stunstick"] = {
7812
7813 Damage = 40,
7814
7815 NumShots = 1,
7816
7817 ClipSize = 1,
7818
7819 Delay = 0.81
7820
7821 },
7822
7823
7824
7825 ["weapon_pistol"] = {
7826
7827 Damage = 12,
7828
7829 NumShots = 1,
7830
7831 ClipSize = 18,
7832
7833 Ammo = "pistol",
7834
7835 Delay = 0.12,
7836
7837 },
7838
7839
7840
7841 ["weapon_357"] = {
7842
7843 Damage = 75,
7844
7845 NumShots = 1,
7846
7847 ClipSize = 6,
7848
7849 Ammo = "357",
7850
7851 Delay = 0.75,
7852
7853 },
7854
7855
7856
7857 ["weapon_smg1"] = {
7858
7859 Damage = 12,
7860
7861 NumShots = 1,
7862
7863 ClipSize = 45,
7864
7865 Ammo = "SMG1",
7866
7867 Delay = 0.075,
7868
7869 },
7870
7871
7872
7873 ["weapon_shotgun"] = {
7874
7875 Damage = 4,
7876
7877 NumShots = 7,
7878
7879 ClipSize = 6,
7880
7881 Ammo = "buckshot",
7882
7883 Delay = 0.9,
7884
7885 },
7886
7887
7888
7889 ["weapon_ar2"] = {
7890
7891 Damage = 11,
7892
7893 NumShots = 1,
7894
7895 ClipSize = 30,
7896
7897 Delay = 0.105,
7898
7899 },
7900
7901
7902
7903 ["weapon_crossbow"] = {
7904
7905 Damage = 100,
7906
7907 NumShots = 1,
7908
7909 ClipSize = 1,
7910
7911 Delay = 1.95,
7912
7913 },
7914
7915
7916
7917 ["weapon_rpg"] = {
7918
7919 Damage = 150,
7920
7921 NumShots = 1,
7922
7923 ClipSize = 1,
7924
7925 Delay = 2.2,
7926
7927 },
7928
7929
7930
7931 ["weapon_frag"] = {
7932
7933 Damage = 150,
7934
7935 NumShots = 1,
7936
7937 ClipSize = 1,
7938
7939 Delay = 1.95,
7940
7941 },
7942
7943
7944
7945 ["fas2_rem870"] = {
7946
7947 Delay = .86,
7948
7949 },
7950
7951
7952
7953 ["fas2_ks23"] = {
7954
7955 Delay = 1.11,
7956
7957 },
7958
7959
7960
7961 ["fas2_m67"] = {
7962
7963 Damage = 160,
7964
7965 Delay = 1.75,
7966
7967 },
7968
7969
7970
7971}
7972
7973
7974
7975local ammostrings = {
7976
7977 pistol = "HL2 Pistol",
7978
7979 smg1 = "HL2 SMG",
7980
7981 ar2 = "HL2 Pulse Rifle",
7982
7983 ["357"] = "HL2 Magnum",
7984
7985 buckshot = "HL2 Shotgun",
7986
7987 rpg_round = "HL2 Rocket",
7988
7989}
7990
7991
7992
7993function AB.GunMenu()
7994
7995if GMenu then return end
7996
7997
7998
7999local GMenu = vgui.Create("DFrame")
8000
8001GMenu:SetSize(590,520)
8002
8003GMenu:SetTitle("Inspecting Weapon")
8004
8005GMenu:Center()
8006
8007GMenu:MakePopup()
8008
8009
8010
8011GMenu.Paint = function(panel, w, h)
8012
8013surface.SetDrawColor( Color(50, 50, 90, 255) )
8014
8015surface.DrawRect( 0, 0, w, h )
8016
8017surface.SetDrawColor( Color(155, 155, 155, 255) )
8018
8019surface.DrawOutlinedRect( 0, 0, w, h )
8020
8021surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
8022
8023surface.SetDrawColor( Color(0, 0, 0, 255) )
8024
8025surface.DrawRect( 10, 25, w - 20, h - 35 )
8026
8027end
8028
8029
8030
8031local gun = LocalPlayer():GetActiveWeapon()
8032
8033if !gun:IsValid() then return end
8034
8035local m9gay = false
8036
8037local fas = false
8038
8039local cw2 = false
8040
8041if gun.Base == "bobs_gun_base" or gun.Base == "bobs_shotty_base" or gun.Base == "bobs_scoped_base" then m9gay = true end
8042
8043if gun.Base == "fas2_base" or gun.Base == "fas2_base_shotgun" then fas = true end
8044
8045if gun.Base == "cw_base" then cw2 = true end
8046
8047
8048
8049gaytext( GMenu, "Weapon Name: "..gun:GetPrintName(), 30, Color(205,225,255,255) )
8050
8051gaytext( GMenu, "Weapon Class: "..gun:GetClass(), 50, Color(105,225,255,255) )
8052
8053
8054
8055//////////////////////////////// hl2 guns ////////////////////////////////
8056
8057
8058
8059if !gun.Primary then gun.Primary = {} end
8060
8061
8062
8063if overrides[gun:GetClass()] then
8064
8065local tab = overrides[gun:GetClass()]
8066
8067for k, v in pairs(tab) do
8068
8069 gun.Primary[k] = v
8070
8071end
8072
8073
8074
8075end
8076
8077
8078
8079//////////////////////////////// weapon stat workarounds ////////////////////////////////
8080
8081
8082
8083local delay = 0
8084
8085if gun.Primary.Delay then
8086
8087 delay = gun.Primary.Delay
8088
8089elseif m9gay then
8090
8091 delay = 60 / gun.Primary.RPM
8092
8093elseif fas or cw2 then
8094
8095 delay = gun.FireDelay
8096
8097end
8098
8099
8100
8101local gdmg = 0
8102
8103if gun.Primary.Damage then
8104
8105 gdmg = gun.Primary.Damage
8106
8107elseif fas or cw2 then
8108
8109 gdmg = gun.Damage
8110
8111end
8112
8113
8114
8115local gnumshots = 1
8116
8117if gun.Primary.NumShots then
8118
8119 gnumshots = gun.Primary.NumShots
8120
8121elseif fas or cw2 then
8122
8123 gnumshots = gun.Shots or 1
8124
8125end
8126
8127
8128
8129local gcone = 0
8130
8131if gun.Primary.Cone then
8132
8133 gcone = gun.Primary.Cone
8134
8135elseif m9gay then
8136
8137 gcone = gun.Primary.Spread
8138
8139elseif fas then
8140
8141 gcone = gun.HipCone or 0
8142
8143elseif cw2 then
8144
8145 gcone = gun.HipSpread or 0
8146
8147end
8148
8149
8150
8151local grecoil = 0
8152
8153if gun.Primary.Recoil then
8154
8155 grecoil = gun.Primary.Recoil
8156
8157elseif m9gay then
8158
8159 grecoil = gun.Primary.KickUp
8160
8161elseif fas then
8162
8163 grecoil = gun.Recoil or 0
8164
8165end
8166
8167
8168
8169local voff = 90
8170
8171
8172
8173gaytext( GMenu, "Damage: "..(gdmg or "nil").." ( x"..(gnumshots or "nil").." ) -- ("..(gdmg * gnumshots).." Total)", voff, Color(255,225,155,255) )
8174
8175voff = voff + 20
8176
8177
8178
8179
8180
8181if gun.Primary.ClipSize then
8182
8183 if gun.Primary.ClipSize == -1 then gun.Primary.ClipSize = 1 end
8184
8185 gaytext( GMenu, "Damage Per Mag: "..(gdmg * gnumshots) * gun.Primary.ClipSize, voff, Color(255,205,105,255) )
8186
8187 voff = voff + 20
8188
8189end
8190
8191
8192
8193gaytext( GMenu, "Damage Per Second: "..math.ceil(1 / delay * (gdmg * gnumshots)), voff, Color(255,155,85,255) )
8194
8195voff = voff + 20
8196
8197
8198
8199if gun.Primary.ClipSize then
8200
8201gaytext( GMenu, "Magazine: "..(gun.Primary.ClipSize or "No Magazine"), voff, Color(255,195,195,255) )
8202
8203voff = voff + 20
8204
8205
8206
8207gaytext( GMenu, "Magdump Time: "..math.Round(gun.Primary.ClipSize * delay, 3).."s", voff, Color(255,95,155,255) )
8208
8209voff = voff + 20
8210
8211end
8212
8213
8214
8215gaytext( GMenu, "Accuracy: "..(10 - (gcone * 100) ), voff, Color(255,255,155,255) )
8216
8217voff = voff + 20
8218
8219
8220
8221if fas then
8222
8223gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimCone or 0 * 100) ), voff, Color(155,255,155,255) )
8224
8225voff = voff + 20
8226
8227end
8228
8229if cw2 then
8230
8231gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimSpread or 0 * 100) ), voff, Color(155,255,155,255) )
8232
8233voff = voff + 20
8234
8235end
8236
8237
8238
8239
8240
8241gaytext( GMenu, "Fire Rate: "..math.Round(delay, 3).." ( "..math.ceil(60 / delay).." Rounds Per Min )", voff, Color(255,255,155,255) )
8242
8243voff = voff + 20
8244
8245
8246
8247--gaytext( GMenu, "Recoil: "..grecoil.." ( "..math.Round((grecoil * 10) * 1 / delay, 1).." recoil per second ) ", voff, Color(205,255,125,255) )
8248
8249--voff = voff + 20
8250
8251
8252
8253
8254
8255if gun.Primary.Ammo then
8256
8257 local ammotyperaw = gun.Primary.Ammo
8258
8259 local ammotype = string.lower(gun.Primary.Ammo)
8260
8261 if ammostrings[ammotype] then ammotyperaw = ammostrings[ammotype] end
8262
8263 gaytext( GMenu, "Ammo Type: "..ammotyperaw, voff, Color(105,255,125,255) )
8264
8265 voff = voff + 20
8266
8267end
8268
8269
8270
8271if m9gay then gaytext( GMenu, "Damage and TTK stats inaccurate due to m9k double penetration bug", voff, Color(255,0,0,255) ) end
8272
8273voff = voff + 40
8274
8275
8276
8277gaytext( GMenu, "Shots to Kill: "..math.ceil(50 / (gdmg * gnumshots) ).."x headshots -- "..math.ceil(100 / (gdmg * gnumshots)).."x torso shots -- "..math.ceil(400 / (gdmg * gnumshots)).."x limb shots", voff, Color(255,125,155,255) )
8278
8279voff = voff + 20
8280
8281gaytext( GMenu, "Shots to Kill (Armor): "..math.ceil(100 / (gdmg * gnumshots) ).."x headshots -- "..math.ceil(200 / (gdmg * gnumshots)).."x torso shots -- "..math.ceil(800 / (gdmg * gnumshots)).."x limb shots", voff, Color(255,125,255,255) )
8282
8283voff = voff + 40
8284
8285
8286
8287local ttk = (delay * math.ceil(100 / (gdmg * gnumshots) )) - delay
8288
8289local ttk2 = (delay * math.ceil(50 / (gdmg * gnumshots) )) - delay
8290
8291local ttk3 = (delay * math.ceil(400 / (gdmg * gnumshots) )) - delay
8292
8293local ttk4 = (delay * math.ceil(200 / (gdmg * gnumshots) )) - delay
8294
8295local ttk5 = (delay * math.ceil(800 / (gdmg * gnumshots) )) - delay
8296
8297gaytext( GMenu, "Time to Kill: "..math.Round(ttk2, 3).."s (Head) -- "..math.Round(ttk, 3).."s (Body) -- "..math.Round(ttk3, 3).."s (Limb)", voff, Color(205,255,185,255) )
8298
8299voff = voff + 20
8300
8301gaytext( GMenu, "Time to Kill (Armored): "..math.Round(ttk, 3).."s (Head) -- "..math.Round(ttk4, 3).."s (Body) -- "..math.Round(ttk5, 3).."s (Limb)", voff, Color(155,155,255,255) )
8302
8303voff = voff + 20
8304
8305
8306
8307
8308
8309
8310
8311end
8312
8313concommand.Add("ace_inspectweapon", AB.GunMenu)
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325------------------------------------------------------------------------AIMBOT UTIL FUNCTIONS--------------------------------------------------------------------------------------
8326
8327
8328
8329
8330
8331
8332
8333-- get this from a better place fucknuts
8334
8335local OEyeAngles = OEyeAngles or FindMetaTable( "Player" ).SetEyeAngles
8336
8337FindMetaTable( "Player" ).SetEyeAngles = function( self, angle )
8338
8339 if ( string.find( string.lower( debug.getinfo( 2 ).short_src ), "/weapons/" ) ) and AB.Vars.NoRecoil then return end
8340
8341 OEyeAngles( self, angle )
8342
8343end
8344
8345
8346
8347local shitweapons = {
8348
8349 "weapon_physgun",
8350
8351 "weapon_physcannon",
8352
8353 "weapon_bugbait",
8354
8355 "weapon_fists",
8356
8357 "gmod_camera",
8358
8359 "gmod_tool",
8360
8361 "weapon_medkit",
8362
8363 "weapon_zm_carry",
8364
8365 "weapon_ttt_unarmed",
8366
8367}
8368
8369-- make sure its a non spastic weapon to aimbot/triggerbot with
8370
8371function AB.CanBotShoot( wep )
8372
8373if !wep:IsValid() then return end
8374
8375if table.HasValue( shitweapons, wep:GetClass() ) then return false end
8376
8377return true
8378
8379end
8380
8381
8382
8383function AB.GetView()
8384
8385 return AB.ViewAngle * 1
8386
8387end
8388
8389
8390
8391function AB.FixView()
8392
8393 if !AB.Vars.Aimbot then return end
8394
8395
8396
8397 local ply = LocalPlayer()
8398
8399 if !ply:IsValid() then return end
8400
8401
8402
8403 AB.ViewAngle = ply:EyeAngles()
8404
8405end
8406
8407
8408
8409local sensitivity = 0.022
8410
8411function AB.RotateView(cmd)
8412
8413 AB.ViewAngle.p = math.Clamp(AB.ViewAngle.p + (cmd:GetMouseY() * sensitivity), -89, 89)
8414
8415 AB.ViewAngle.y = math.NormalizeAngle(AB.ViewAngle.y + (cmd:GetMouseX() * sensitivity * -1))
8416
8417end
8418
8419
8420
8421-- fov based targeting shit
8422
8423function AB.GetAngleFromCrosshair( ply )
8424
8425 local Ang = (AB.FindTargetPosition( ply ) - LocalPlayer():EyePos() ):Angle()
8426
8427 local myangles = LocalPlayer():EyeAngles()
8428
8429 if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
8430
8431 local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
8432
8433 local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
8434
8435 return DiffX, DiffY
8436
8437end
8438
8439
8440
8441function AB.GetDirtyAngleFromCrosshair( ply )
8442
8443 local Ang = ( (ply:GetPos() + Vector( 0, 0, 35 ) ) - LocalPlayer():EyePos() ):Angle()
8444
8445 local myangles = LocalPlayer():EyeAngles()
8446
8447 if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
8448
8449 local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
8450
8451 local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
8452
8453 return DiffX + DiffY
8454
8455end
8456
8457
8458
8459function AB.InFOV( ply )
8460
8461 local DiffX, DiffY = AB.GetAngleFromCrosshair( ply )
8462
8463 return ( DiffX <= AB.NumberVars.AimbotMaxFOV and DiffY <= AB.NumberVars.AimbotMaxFOV )
8464
8465end
8466
8467
8468
8469function AB.FindTargetPosition( ent )
8470
8471 if !ent:IsValid() then return end
8472
8473
8474
8475 if !AB.Vars.AimbotTargetMode then return ent:LocalToWorld( ent:OBBCenter() ) end
8476
8477
8478
8479 if ent:GetModel() == "models/crow.mdl" then return ent:LocalToWorld( Vector(0, 0, 5) ) end -- rape faggots that are in crow form, useful in gmstranded or zombie survival
8480
8481
8482
8483 if ent:IsPlayer() then
8484
8485 local head = ent:LookupAttachment( "eyes" )
8486
8487 if head then
8488
8489 local pos = ent:GetAttachment(head)
8490
8491 if pos then
8492
8493 return pos.Pos + ent:EyeAngles():Forward() * -1.5
8494
8495 end
8496
8497 end
8498
8499 end
8500
8501
8502
8503 local bone = AB.AimbotBone
8504
8505 local head = ent:LookupBone( bone )
8506
8507 if head then
8508
8509 local pos = ent:GetBonePosition( head )
8510
8511 if pos then
8512
8513 return pos
8514
8515 end
8516
8517 end
8518
8519
8520
8521 return ent:LocalToWorld( ent:OBBCenter() )
8522
8523end
8524
8525
8526
8527function AB.CalcTargetPosition( ent )
8528
8529 local targetPos = AB:FindTargetPosition( ent )
8530
8531
8532
8533 if LocalPlayer():IsValid() and LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_crossbow" then
8534
8535 targetPos = AB:PredictProjectileWeapons( ply, ent, targetPos ) or targetPos
8536
8537 end
8538
8539
8540
8541 return targetPos
8542
8543end
8544
8545
8546
8547
8548
8549function AB.PredictProjectileWeapons( ply, target, targetPos )
8550
8551-- local dist = VecM["Length"](targetPos - PlyM["GetShootPos"](ply))
8552
8553 local dist = Vector(targetPos - LocalPlayer():GetShootPos()):Length()
8554
8555 local time = (dist / 3500) + 0.05
8556
8557 targetPos = targetPos + (target:GetVelocity() * time)
8558
8559
8560
8561-- local mul = 0.0075
8562
8563 //targetPos = targetPos - (e["GetVelocity"](ply) * mul)
8564
8565
8566
8567 return targetPos
8568
8569end
8570
8571
8572
8573function AB.CanTargetPlayer( ply )
8574
8575 if !AB.Vars.TargetFriends and AB.IsFriend( ply ) then return false end
8576
8577 if !AB.Vars.TargetHighlighted and AB.IsTarget( ply ) then return false end
8578
8579 if !AB.Vars.TargetAdmins and AB.GetRank( ply ) != ( "user" or "guest" or "player" ) then return false end
8580
8581 if !AB.Vars.TargetSameTeam and ply:Team() == LocalPlayer():Team() then return false end
8582
8583 if !AB.Vars.TargetNoclippers and ply:GetMoveType() == MOVETYPE_NOCLIP then return false end
8584
8585 if DarkRP and AB.IsBabyGod( ply ) then return false end
8586
8587 return true
8588
8589end
8590
8591
8592
8593local boners = {
8594
8595 "ValveBiped.Bip01_Head1",
8596
8597 "ValveBiped.Bip01_Spine2",
8598
8599 "ValveBiped.Bip01_Pelvis",
8600
8601 "ValveBiped.Bip01_R_Forearm",
8602
8603 "ValveBiped.Bip01_L_Forearm",
8604
8605 "ValveBiped.Bip01_R_Calf",
8606
8607 "ValveBiped.Bip01_L_Calf",
8608
8609 "ValveBiped.Bip01_R_Foot",
8610
8611 "ValveBiped.Bip01_L_Foot",
8612
8613}
8614
8615
8616
8617
8618
8619
8620
8621function AB.PrepareForAStomping( ply )
8622
8623 if !ply:IsValid() then return false end
8624
8625
8626
8627 if ply:GetModel() == "models/crow.mdl" and AB.PlayerVisible( ply, ply:LocalToWorld( Vector(0, 0, 5) ) ) then return ply:LocalToWorld( Vector(0, 0, 5) ) end
8628
8629
8630
8631 if AB.Vars.AimbotTargetMode then
8632
8633 -- right in the kisser
8634
8635 local head = ply:LookupAttachment( "eyes" )
8636
8637 if head then
8638
8639 local pos = ply:GetAttachment(head)
8640
8641 if pos then
8642
8643 local tpoz = pos.Pos + ply:EyeAngles():Forward() * -1.5
8644
8645 if AB.PlayerVisible( ply, tpoz ) then return tpoz end
8646
8647 end
8648
8649 end
8650
8651
8652
8653 else
8654
8655 -- b aim
8656
8657 local head = ply:LookupBone( "ValveBiped.Bip01_Pelvis" )
8658
8659 if head then
8660
8661 local poz = ply:GetBonePosition( head )
8662
8663 if poz then
8664
8665 if AB.PlayerVisible( ply, poz ) then return poz end
8666
8667 end
8668
8669 end
8670
8671 end
8672
8673
8674
8675 if AB.Vars.AimbotAdaptiveTarget then
8676
8677 local returnpos = -1
8678
8679 for _, b in ipairs( boners ) do
8680
8681 local head = ply:LookupBone( b )
8682
8683 if head then
8684
8685 local poz = ply:GetBonePosition( head )
8686
8687 if poz then
8688
8689 if AB.PlayerVisible( ply, poz ) then returnpos = poz break end
8690
8691 end
8692
8693 end
8694
8695 end
8696
8697 if isvector( returnpos ) then return returnpos end
8698
8699 end
8700
8701
8702
8703
8704
8705 local lastresort = ply:LocalToWorld( ply:OBBCenter() )
8706
8707 if AB.PlayerVisible( ply, lastresort ) then return lastresort end
8708
8709
8710
8711 return false
8712
8713end
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723function AB.PlayerVisible( ply, testpos )
8724
8725if !ply:IsValid() or !ply:IsPlayer() then return false end
8726
8727
8728
8729local td = {start = LocalPlayer():GetShootPos(), endpos = testpos, filter = {LocalPlayer(), ply}, mask = MASK_SHOT}
8730
8731local tr = util.TraceLine(td)
8732
8733
8734
8735--if tr.Entity:IsValid() and tr.Entity == ply then return true end
8736
8737if !tr.Hit then return true end
8738
8739if AB.Vars.AimbotWallbanger and AB.CanWeaponPenetrate( tr, ply ) then return true end
8740
8741return false
8742
8743
8744
8745end
8746
8747
8748
8749-- sorta like above but doesnt require a testpos
8750
8751function AB.PlayerVisiblePK( source, ply )
8752
8753if !ply:IsValid() or !ply:IsPlayer() then return false end
8754
8755
8756
8757local td = {start = source, endpos = ply:LocalToWorld( ply:OBBCenter() ), filter = function( e ) return ( e != LocalPlayer() and e != ply and e:GetClass() != "prop_physics") end, mask = MASK_SHOT}
8758
8759local tr = util.TraceLine(td)
8760
8761
8762
8763--if tr.Entity:IsValid() and tr.Entity == ply then return true, tr.HitPos end
8764
8765if !tr.Hit then return true, ply:LocalToWorld( ply:OBBCenter() ) end
8766
8767return false, Vector( 0,0,0 )
8768
8769
8770
8771end
8772
8773
8774
8775
8776
8777-- returns the closest alive player, if visible is true then it will return the closest alive and visible player
8778
8779function AB.GetClosestPlayer()
8780
8781 local nearestEnt = game.GetWorld()
8782
8783 local mypos = LocalPlayer():GetPos()
8784
8785 local plytab = player.GetAll()
8786
8787 table.sort( plytab, function( a, b ) return a:GetPos():Distance( mypos ) < b:GetPos():Distance( mypos ) end )
8788
8789
8790
8791 for _, ent in ipairs( plytab ) do
8792
8793 if ent == LocalPlayer() then continue end
8794
8795 if !ent:IsValid() or AB.IsDead( ent ) or !AB.CanTargetPlayer( ent ) or (AB.ToMetric( LocalPlayer():GetPos():Distance( ent:GetPos() ) ) >= AB.NumberVars.AimbotDist ) then continue end
8796
8797 nearestEnt = ent
8798
8799 break
8800
8801 end
8802
8803
8804
8805 return nearestEnt
8806
8807end
8808
8809
8810
8811-- returns the closest alive player to your crosshair, visible to return only visible players
8812
8813function AB.GetClosestToCursor( visible )
8814
8815 local nearestEnt = game.GetWorld()
8816
8817 local fovtotal = AB.NumberVars.AimbotMaxFOV or 0
8818
8819 if fovtotal > 179 then return AB.GetClosestPlayer() end -- kick it into ragebot mode
8820
8821 local mypos = LocalPlayer():GetPos()
8822
8823 local plytab = player.GetAll()
8824
8825
8826
8827 table.sort( plytab, function( a, b ) return AB.GetDirtyAngleFromCrosshair( a ) < AB.GetDirtyAngleFromCrosshair( b ) end )
8828
8829
8830
8831 for _, ent in ipairs( plytab ) do
8832
8833 if ent == LocalPlayer() then continue end
8834
8835 -- we've exceeded our max fov so just stop looping here
8836
8837 if !AB.InFOV( ent ) then break end
8838
8839 -- save a bunch of useless calcs
8840
8841 if !ent:IsValid() or AB.IsDead( ent ) or !AB.CanTargetPlayer( ent ) or (AB.ToMetric( LocalPlayer():GetPos():Distance( ent:GetPos() ) ) >= AB.NumberVars.AimbotDist ) then continue end
8842
8843 nearestEnt = ent
8844
8845 break
8846
8847 end
8848
8849
8850
8851
8852
8853 return nearestEnt
8854
8855end
8856
8857
8858
8859
8860
8861gameevent.Listen( "entity_killed" )
8862
8863hook.Add( "entity_killed", "ace_propkilldetector", function( data )
8864
8865 local inflictor_index = data.entindex_inflictor
8866
8867 local attacker_index = data.entindex_attacker
8868
8869 local damagebits = data.damagebits
8870
8871 local victim_index = data.entindex_killed
8872
8873
8874
8875 local ply = "nobody?"
8876
8877 local retard = game.GetWorld()
8878
8879 local atk = "the map"
8880
8881 local wep = "unknown weapon"
8882
8883 local killah = game.GetWorld()
8884
8885 local inflictor = ents.GetByIndex(inflictor_index)
8886
8887
8888
8889 for _, p in pairs(player.GetAll()) do
8890
8891 if p:EntIndex() == victim_index then ply = p:Nick() retard = p end
8892
8893 if p:EntIndex() == attacker_index then
8894
8895 atk = p:Nick()
8896
8897 killah = p
8898
8899 if p:GetActiveWeapon() and p:GetActiveWeapon():IsValid() then wep = p:GetActiveWeapon():GetPrintName() end
8900
8901 end
8902
8903 end
8904
8905
8906
8907 if AB.Vars.DeathTaunts and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_chatspam_once" ) end
8908
8909 if AB.Vars.NewLifeRule and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_random_rpname" ) end
8910
8911
8912
8913 if attacker_index == victim_index then AB.DebugLog( ply.." necked himself", Color(180,150,150) ) if AB.Vars.NotifyKills then AB.ChatText( ply.." necked himself", Color(255,155,105) ) end return end
8914
8915 if inflictor:IsValid() and inflictor:GetClass() == "prop_physics" then
8916
8917 AB.DebugLog( ply.." got crushed by a prop!", Color(180,150,150) )
8918
8919 if AB.Vars.NotifyKills then AB.ChatText( ply.." got crushed by a prop!", Color(255,155,105) ) end
8920
8921 return
8922
8923 end
8924
8925
8926
8927 AB.DebugLog( atk.." killed "..ply.." with a "..wep, Color(200,150,150) )
8928
8929 if AB.Vars.NotifyKills then AB.ChatText( atk.." killed "..ply.." with a "..wep, Color(255,155,105) ) end
8930
8931
8932
8933 if AB.Vars.KillTaunts and retard != LocalPlayer() and killah == LocalPlayer() then LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end
8934
8935/*
8936
8937 local ply = "nobody"
8938
8939 local prop = "nothing"
8940
8941
8942
8943 for k, v in pairs(ents.GetAll()) do
8944
8945 if v:EntIndex() == victim_index then ply = v end
8946
8947 if (v:GetClass() == "prop_physics" or string.find(v:GetClass(), "gmod_") or string.find(v:GetClass(), "wire_") ) and v:EntIndex() == attacker_index then prop = v end
8948
8949 end
8950
8951
8952
8953 if !FPP then return end
8954
8955
8956
8957 if ply == "nobody" or prop == "nothing" then return end
8958
8959 if !FPP.entGetOwner( prop ):IsValid() then return end
8960
8961
8962
8963 AB.DebugLog( FPP.entGetOwner( prop ):Nick().." propkilled "..ply:Nick().." with a "..prop:GetClass().." ("..prop:GetModel()..")", Color(150,150,55) )
8964
8965 */
8966
8967
8968
8969end )
8970
8971
8972
8973gameevent.Listen( "player_connect" )
8974
8975hook.Add( "player_connect", "ace_playerconnected", function( data )
8976
8977 AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has connected to the server.", Color(150,150,150) )
8978
8979end )
8980
8981
8982
8983gameevent.Listen( "player_hurt" )
8984
8985hook.Add( "player_hurt", "crosshair_readinjuries", function( data )
8986
8987 if data.attacker == LocalPlayer():UserID() then AB.CrossHairAlpha = 255 end
8988
8989end )
8990
8991
8992
8993gameevent.Listen( "player_disconnect" )
8994
8995hook.Add( "player_disconnect", "ace_playerleave", function( data )
8996
8997 timer.Simple( 0.5, function() AB.RemoveInvalidFriends() end )
8998
8999 AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has disconnected from the server. ( ".. data.reason .." )", Color(150,150,150) )
9000
9001end )
9002
9003
9004
9005
9006
9007
9008
9009AB.DebugLog( "Acebot multihack initialized...", Color(200,200,255) )
9010
9011AB.DebugLog( "Version: "..AB.Version, Color(200,200,255) )
9012
9013
9014
9015if ULib then
9016
9017AB.DebugLog( "ULX overrides detected, repairing hook system...", Color(150,250,150) )
9018
9019AB.DebugLog( "Hook system successfully repaired", Color(150,250,150) )
9020
9021end
9022
9023
9024
9025function AB.InitPostEntity()
9026
9027-- need a timer to give the server time to send shit to us otherwise this only works on shit thats in the same PVS area as us
9028
9029
9030
9031timer.Simple( 1, function()
9032
9033 AB.AddConnectedFriends()
9034
9035if gmod.GetGamemode().Name == "Trouble in Terrorist Town" then
9036
9037 AB.IsTTT = true
9038
9039 hook.Add( "TTTBeginRound", "ab_clearTlist", AB.ClearTraitors)
9040
9041end
9042
9043
9044
9045end)
9046
9047
9048
9049end
9050
9051hook.Add( "InitPostEntity", "ab_init", AB.InitPostEntity)
9052
9053
9054
9055
9056
9057concommand.Add("aegis_printlogs", function() AB.ChatText( "aegis_printlogs is deprecated, use aegis_view_anticheats instead", Color(255,205,205) ) end)
9058
9059
9060
9061concommand.Add("aegis_dumpnwstrings", function()
9062
9063local netstrings = {}
9064
9065for i = 1, 9999 do
9066
9067 local s = util.NetworkIDToString( i )
9068
9069 if s then print( "[aegis] NetChannel "..i.." = "..s ) else break end
9070
9071end
9072
9073end)
9074
9075
9076
9077function AB.DumpHookTable( p, cmd, args )
9078
9079 local hks = args[1]
9080
9081 local hooktable = hook.GetTable()
9082
9083 if !hks or hks == "" then
9084
9085 for k, v in pairs( hooktable ) do
9086
9087 print( k.." = "..table.Count( v ).." hooks" )
9088
9089 end
9090
9091 elseif !hooktable[hks] then print( "Bad hook name! get it right you stupid fucking faggot") return
9092
9093 else
9094
9095 for k, v in pairs( hooktable[hks] ) do
9096
9097 print( k.." = "..debug.getinfo( v ).source.." lines: "..debug.getinfo( v ).linedefined.." - "..debug.getinfo( v ).lastlinedefined )
9098
9099 end
9100
9101 end
9102
9103end
9104
9105concommand.Add( "aegis_dumphooks", AB.DumpHookTable )
9106
9107
9108
9109/*
9110
9111function AB.SetRotateAngle( p, cmd, arg )
9112
9113 if !arg[1] or !isnumber(arg[1]) then return end
9114
9115 AB.NumberVars.PKRotateAngle = tonumber(arg[1])
9116
9117end
9118
9119
9120
9121concommand.Add( "ace_180up_vertical_angle", AB.SetRotateAngle )
9122
9123*/
9124
9125
9126
9127local namesf = {
9128
9129 "Joe",
9130
9131 "John",
9132
9133 "Jack",
9134
9135 "Barry",
9136
9137 "Chris",
9138
9139 "Christopher",
9140
9141 "Michael",
9142
9143 "David",
9144
9145 "Thomas",
9146
9147 "Paul",
9148
9149 "Tony",
9150
9151 "Mark",
9152
9153 "Cooper",
9154
9155 "Jared",
9156
9157 "James",
9158
9159 "Jimmy",
9160
9161 "Bob",
9162
9163 "Robert",
9164
9165 "Riley",
9166
9167 "William",
9168
9169 "Will",
9170
9171 "Donald",
9172
9173 "George",
9174
9175 "Ken",
9176
9177 "Steve",
9178
9179 "Bruce",
9180
9181 "Brian",
9182
9183 "Chad",
9184
9185 "Anthony",
9186
9187 "Tim",
9188
9189 "Eddie",
9190
9191 "Daniel",
9192
9193 "Larry",
9194
9195 "Jeff",
9196
9197 "Justin",
9198
9199 "Adam",
9200
9201 "Ralph",
9202
9203 "Brandon",
9204
9205 "Xavier",
9206
9207 "Greg",
9208
9209 "Gordon",
9210
9211 "Scott",
9212
9213 "Taine",
9214
9215 "Howie",
9216
9217 "Morgan",
9218
9219 "Curtis",
9220
9221 "Dwayne",
9222
9223 "Steven",
9224
9225 "Peter",
9226
9227 "Kevin",
9228
9229 "Coleman",
9230
9231 "Garry",
9232
9233}
9234
9235
9236
9237local namesfem = {
9238
9239 "Kate",
9240
9241 "Katie",
9242
9243 "Jane",
9244
9245 "Charlotte",
9246
9247 "Olivia",
9248
9249 "Chloe",
9250
9251 "Amelia",
9252
9253 "Isabel",
9254
9255 "Elise",
9256
9257 "Sophie",
9258
9259 "Scarlett",
9260
9261 "Lily",
9262
9263 "Lucy",
9264
9265 "Hannah",
9266
9267 "Evelyn",
9268
9269 "Willow",
9270
9271 "Anna",
9272
9273 "Sadie",
9274
9275 "Rose",
9276
9277 "Summer",
9278
9279 "Layla",
9280
9281 "Camille",
9282
9283 "Aylssa",
9284
9285 "Madeline",
9286
9287 "Morgan",
9288
9289 "Claire",
9290
9291 "Daisy",
9292
9293 "Alexis",
9294
9295 "Victoria",
9296
9297 "Paige",
9298
9299 "Bianca",
9300
9301 "Rhiannon",
9302
9303 "Hazel",
9304
9305 "Mia",
9306
9307 "Grace",
9308
9309 "Ada",
9310
9311 "Britney",
9312
9313 "Alanna",
9314
9315 "Fabienne",
9316
9317 "Claudia",
9318
9319 "Jacinta",
9320
9321 "Jackie",
9322
9323 "Heather",
9324
9325 "Margot",
9326
9327}
9328
9329
9330
9331local namesl = {
9332
9333 "Houston",
9334
9335 "Burch",
9336
9337 "Smith",
9338
9339 "Jones",
9340
9341 "Trump",
9342
9343 "Sanders",
9344
9345 "Abbott",
9346
9347 "Cruise",
9348
9349 "Brown",
9350
9351 "Hopgood",
9352
9353 "Davis",
9354
9355 "Miller",
9356
9357 "Wilson",
9358
9359 "Walker",
9360
9361 "Lee",
9362
9363 "Lions",
9364
9365 "Bryant",
9366
9367 "Hall",
9368
9369 "Adams",
9370
9371 "Green",
9372
9373 "Aldridge",
9374
9375 "Turner",
9376
9377 "Anderson",
9378
9379 "Morris",
9380
9381 "Howard",
9382
9383 "Swanson",
9384
9385 "Peterson",
9386
9387 "Powell",
9388
9389 "Keating",
9390
9391 "Rudd",
9392
9393 "Coleman",
9394
9395 "Cunningham",
9396
9397 "Donnell",
9398
9399 "Callaghan",
9400
9401 "Smithers",
9402
9403 "Burns",
9404
9405 "Bonds",
9406
9407 "Gonzales",
9408
9409 "Griffin",
9410
9411 "Woods",
9412
9413 "Gibson",
9414
9415 "Webb",
9416
9417 "Simpson",
9418
9419 "Freeman",
9420
9421 "Mcdonald",
9422
9423 "Butters",
9424
9425 "Masterson",
9426
9427 "Keefe",
9428
9429 "Sanderson",
9430
9431 "Badger",
9432
9433 "Cantrip",
9434
9435 "Williams",
9436
9437 "DontBanMe",
9438
9439 "Lopez",
9440
9441 "Clark",
9442
9443 "Campbell",
9444
9445 "King",
9446
9447 "Coleman",
9448
9449 "Chongs",
9450
9451 "Riviera",
9452
9453 "Ward",
9454
9455 "Gray",
9456
9457 "Ross",
9458
9459}
9460
9461
9462
9463function AB.GenerateRPName( p, cmd, arg )
9464
9465 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
9466
9467 RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
9468
9469end
9470
9471concommand.Add( "ace_random_rpname_male", AB.GenerateRPName )
9472
9473
9474
9475function AB.GenerateRPNameFemale( p, cmd, arg )
9476
9477 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
9478
9479 RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
9480
9481end
9482
9483concommand.Add( "ace_random_rpname_female", AB.GenerateRPNameFemale )
9484
9485
9486
9487function AB.GenerateRPNameBoth( p, cmd, arg )
9488
9489 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
9490
9491 if math.random( 1, 100 ) > 55 then
9492
9493 RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
9494
9495 else
9496
9497 RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
9498
9499 end
9500
9501end
9502
9503concommand.Add( "ace_random_rpname", AB.GenerateRPNameBoth )
9504
9505
9506
9507
9508
9509function AB.RandomRPJob( p, cmd, arg )
9510
9511 if !DarkRP then AB.ChatText( "Random rp job only works on darkrp you dipshit!", Color(255,205,205) ) return end
9512
9513 local fag = DarkRP.getCategories()
9514
9515 local jcmds = {}
9516
9517 for k, v in pairs( fag.jobs ) do
9518
9519 for _, j in pairs( v.members ) do
9520
9521 if j.customCheck and !j.customCheck( LocalPlayer() ) then continue end
9522
9523 if j.vote then continue end
9524
9525 if j.NeedToChangeFrom then continue end
9526
9527 table.insert( jcmds, j.command )
9528
9529 end
9530
9531 end
9532
9533 RunConsoleCommand( "darkrp", table.Random( jcmds ) )
9534
9535end
9536
9537concommand.Add( "ace_random_rp_job", AB.RandomRPJob )
9538
9539
9540
9541
9542
9543function AB.InnocentRoleplayer( p, cmd, arg )
9544
9545 LocalPlayer():ConCommand( "cl_weaponcolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
9546
9547 LocalPlayer():ConCommand( "cl_playercolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
9548
9549 RunConsoleCommand( "kill" )
9550
9551 AB.GenerateRPNameBoth()
9552
9553 AB.RandomRPJob()
9554
9555
9556
9557end
9558
9559concommand.Add( "ace_innocent_roleplayer", AB.InnocentRoleplayer )
9560
9561
9562
9563local ctxlines = {
9564
9565 "Hi, my name is Crash Jackson.",
9566
9567 "I have access to 4 paid alts, each one of which allows me access to 5 other family shared steam alts.",
9568
9569 "I plan to crash your server repeatedly until every single alt is banned.",
9570
9571 "Then I'll buy some more alts and start over again.",
9572
9573 "I won't stop until your server is down forever.",
9574
9575 "Have a nice day.",
9576
9577}
9578
9579
9580
9581local ctxlines2 = {
9582
9583 "Hi, my name is Crash Bandicoot.",
9584
9585 "I have access to 4 hubwords, each one of which allows me access to 5 other levels.",
9586
9587 "I plan to find all the power crystals until every single one is mine.",
9588
9589 "Then I'll make a sequel game and start over again.",
9590
9591 "I won't stop until everybody stops buying my games.",
9592
9593 "Have a nice day.",
9594
9595}
9596
9597
9598
9599function AB.CrashJackson( p, cmd, arg )
9600
9601 for k, v in pairs( ctxlines ) do
9602
9603 if DarkRP then
9604
9605 timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
9606
9607 else
9608
9609 timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
9610
9611 end
9612
9613 end
9614
9615end
9616
9617concommand.Add( "ace_crashjackson", AB.CrashJackson )
9618
9619
9620
9621function AB.CrashBandicoot( p, cmd, arg )
9622
9623 for k, v in pairs( ctxlines2 ) do
9624
9625 if DarkRP then
9626
9627 timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
9628
9629 else
9630
9631 timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
9632
9633 end
9634
9635 end
9636
9637end
9638
9639concommand.Add( "ace_crashbandicoot", AB.CrashBandicoot )
9640
9641
9642
9643function AB.ErrorRape()
9644
9645 local str = "\n"
9646
9647 for i = 1, 512 do str = str.."\n" end
9648
9649 Error( str )
9650
9651end
9652
9653
9654
9655concommand.Add( "ace_exploit_rapeconsole", AB.ErrorRape )
9656
9657/*
9658
9659local cblockedcmds = {
9660
9661 ["connect"] = true,
9662
9663 ["disconnect"] = true,
9664
9665 ["impulse"] = true,
9666
9667 ["pp_texturize"] = true,
9668
9669 ["pp_texturize_scale"] = true,
9670
9671 ["demos"] = true,
9672
9673 ["kill"] = false,
9674
9675 ["say"] = false,
9676
9677}
9678
9679
9680
9681local function BlockedCMDMenu()
9682
9683if CBMenu then return end
9684
9685
9686
9687local CBMenu = vgui.Create("DFrame")
9688
9689CBMenu:SetSize(500,455)
9690
9691CBMenu:SetTitle("Manage Blocked ConCommands")
9692
9693CBMenu:Center()
9694
9695CBMenu:MakePopup()
9696
9697
9698
9699CBMenu.Paint = function( s, w, h )
9700
9701surface.SetDrawColor( Color(30, 30, 30, 255) )
9702
9703surface.DrawRect( 0, 0, w, h )
9704
9705surface.SetDrawColor( Color(55, 55, 55, 255) )
9706
9707surface.DrawOutlinedRect( 0, 0, w, h )
9708
9709surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
9710
9711surface.SetDrawColor( Color(0, 0, 0, 200) )
9712
9713surface.DrawRect( 10, 25, w - 20, h - 35 )
9714
9715end
9716
9717
9718
9719local Plist = vgui.Create( "DPanelList", CBMenu )
9720
9721Plist:SetSize( CBMenu:GetWide() - 20, CBMenu:GetTall() - 35 )
9722
9723Plist:SetPadding( 5 )
9724
9725Plist:SetSpacing( 5 )
9726
9727Plist:EnableHorizontal( false )
9728
9729Plist:EnableVerticalScrollbar( true )
9730
9731Plist:SetPos( 10, 25 )
9732
9733Plist:SetName( "" )
9734
9735
9736
9737local function CreateCMDBlockPanel( cmd )
9738
9739if !CBMenu then return end
9740
9741 local cmdp = vgui.Create( "DPanel" )
9742
9743 cmdp:SetSize( Plist:GetWide(), 30 )
9744
9745 cmdp.Cmd = cmd
9746
9747 cmdp.Paint = function( s, w, h )
9748
9749 surface.SetDrawColor( Color(50, 50, 50, 255) )
9750
9751 surface.DrawRect( 0, 0, w, h )
9752
9753 surface.SetDrawColor( Color(65, 65, 65, 255) )
9754
9755 surface.DrawOutlinedRect( 0, 0, w, h )
9756
9757 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
9758
9759 end
9760
9761
9762
9763 local TButton = vgui.Create( "DButton", cmdp )
9764
9765 TButton:SetPos( 390, 2 )
9766
9767 TButton:SetText( "" )
9768
9769 TButton:SetTextColor( Color(255, 255, 255, 255) )
9770
9771 TButton:SetSize( 60, 26 )
9772
9773
9774
9775 TButton.Paint = function( self, w, h )
9776
9777 local dtx = "Block"
9778
9779 local dtc = Color(150, 30, 30, 255)
9780
9781 if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
9782
9783 surface.SetDrawColor( dtc )
9784
9785 surface.DrawRect( 0, 0, w, h )
9786
9787 surface.SetDrawColor( Color(45, 45, 45, 255) )
9788
9789 surface.DrawOutlinedRect( 0, 0, w, h )
9790
9791 draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
9792
9793 end
9794
9795
9796
9797 TButton.DoClick = function() cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd] end
9798
9799
9800
9801 Plist:AddItem( cmdp )
9802
9803end
9804
9805
9806
9807
9808
9809for k, v in pairs( cblockedcmds ) do
9810
9811 CreateCMDBlockPanel( k )
9812
9813end
9814
9815
9816
9817end
9818
9819concommand.Add("aegis_blockedcmds", BlockedCMDMenu )
9820
9821*/
9822
9823
9824
9825AB.WraithVision = false
9826
9827function AB.ToggleWraithVision()
9828
9829 local mapmaterials = Entity( 0 ):GetMaterials()
9830
9831 for k, v in pairs( mapmaterials ) do
9832
9833 local m = Material( v )
9834
9835 if !AB.WraithVision then m:SetFloat( "$alpha", 0.75 ) else m:SetFloat( "$alpha", 1 ) end
9836
9837 end
9838
9839 AB.WraithVision = !AB.WraithVision
9840
9841end
9842
9843concommand.Add( "ace_wraith_vision", AB.ToggleWraithVision )
9844--[[-----------------------------------------------------------------------------------------
9845
9846| ▄████████ ▄████████ ▄██████▄ ▄█ ▄████████ |
9847
9848| ███ ███ ███ ███ ███ ███ ███ ███ ███ |
9849
9850| ███ ███ ███ █▀ ███ █▀ ███▌ ███ █▀ |
9851
9852| ███ ███ ▄███▄▄▄ ▄███ ███▌ ███ |
9853
9854| ▀███████████ ▀▀███▀▀▀ ▀▀███ ████▄ ███▌ ▀███████████ |
9855
9856| ███ ███ ███ █▄ ███ ███ ███ ███ |
9857
9858| ███ ███ ███ ███ ███ ███ ███ ▄█ ███ |
9859
9860| ███ █▀ ██████████ ████████▀ █▀ ▄████████▀ |
9861
9862| |
9863
9864| Anti-anticheat detour module created for Project Odium |
9865
9866| Rev 1.13 - 16/05/17 |
9867
9868-------------------------------------------------------------------------------------------]]
9869
9870// If you are reading this and you aren't an odium dev I'll scatter you down a river in 20 different garbage bags cunt //
9871
9872
9873
9874local tabble = {}
9875
9876function tabble.Copy( t, lookup_table )
9877
9878 if ( t == nil ) then return nil end
9879
9880
9881
9882 local copy = {}
9883
9884 setmetatable( copy, debug.getmetatable( t ) )
9885
9886 for i, v in pairs( t ) do
9887
9888 if ( !istable( v ) ) then
9889
9890 copy[ i ] = v
9891
9892 else
9893
9894 lookup_table = lookup_table or {}
9895
9896 lookup_table[ t ] = copy
9897
9898 if ( lookup_table[ v ] ) then
9899
9900 copy[ i ] = lookup_table[ v ] -- we already copied this table. reuse the copy.
9901
9902 else
9903
9904 copy[ i ] = tabble.Copy( v, lookup_table ) -- not yet copied. copy it.
9905
9906 end
9907
9908 end
9909
9910 end
9911
9912 return copy
9913
9914end
9915
9916
9917
9918 -- off to a good start
9919
9920local _A = {}
9921
9922
9923
9924if odium and type(odium) == "string" then
9925
9926 odium = _G.odium
9927
9928end
9929
9930
9931
9932if odium then
9933
9934 _A = tabble.Copy( odium )
9935
9936 _G.odium = nil
9937
9938end
9939
9940
9941
9942_A.aegis = {}
9943
9944_A.registry = debug.getregistry()
9945
9946local aegis = {}
9947
9948_A.aegis.logs = {}
9949
9950_A.aegis.anticheats = {}
9951
9952_A.aegis.exploitables = {}
9953
9954_A.G = tabble.Copy( _G )
9955
9956
9957
9958local upgrad = Material( "gui/gradient_up" )
9959
9960local downgrad = Material( "gui/gradient_down" )
9961
9962
9963
9964function aegis.log( msg )
9965
9966 MsgC(Color(0, 200, 255), "[Odium] "..msg.."\n" )
9967
9968 table.insert( _A.aegis.logs, msg )
9969
9970end
9971
9972
9973
9974function aegis.silentlog( msg )
9975
9976 table.insert( _A.aegis.logs, msg )
9977
9978end
9979
9980
9981
9982local dix = debug.getinfo
9983
9984local jufi = jit.util.funcinfo
9985
9986function aegis.isinodium()
9987
9988 local function gay() return end
9989
9990 return jufi( gay ).source == "@"
9991
9992end
9993
9994
9995
9996
9997
9998aegis.funcs = {}
9999
10000
10001
10002function aegis.Detour( old, new, name )
10003
10004 name = name or ""
10005
10006 if name != "" then aegis.silentlog( "Successful function detour: "..name ) end
10007
10008 aegis.funcs[new] = old
10009
10010 return new
10011
10012end
10013
10014
10015
10016_A.aegis.Detour = aegis.Detour
10017
10018
10019
10020local tstring = tostring
10021
10022local cgarbage = collectgarbage
10023
10024collectgarbage = aegis.Detour( collectgarbage, function( a, ... )
10025
10026
10027
10028 if tstring( a ) == "odium" then
10029
10030 return _A
10031
10032 end
10033
10034
10035
10036-- if tstring( a ) == "membuffer" and _A.account and ( _A.account.GetPlanName() == "Commercial" or _A.account.GetPlanName() == "Stripper" ) then
10037
10038-- return -4096
10039
10040-- end
10041
10042
10043
10044 if tstring( a ) == "count" then
10045
10046
10047
10048 local normal = cgarbage( a, ... )
10049
10050
10051
10052 if memoryused then
10053
10054
10055
10056 return normal - memoryused
10057
10058
10059
10060 end
10061
10062
10063
10064 end
10065
10066
10067
10068 return cgarbage( a, ... )
10069
10070end)
10071
10072
10073
10074
10075
10076jit.util.funcinfo = aegis.Detour( jit.util.funcinfo, function( func, ... )
10077
10078 local n_func = func
10079
10080
10081
10082-- if isnumber(func) then return jufi(func + 1, ... ) end
10083
10084
10085
10086 if jufi(func, ...).source == "@" then return jufi( _G.Msg, ... ) end
10087
10088
10089
10090 if( aegis.funcs[func] ) then
10091
10092 n_func = aegis.funcs[func]
10093
10094 end
10095
10096
10097
10098 local tbl = jufi( n_func || func, ... )
10099
10100
10101
10102 return tbl
10103
10104end)
10105
10106
10107
10108local jufk = jit.util.funck
10109
10110jit.util.funck = aegis.Detour( jit.util.funck, function( func, ... )
10111
10112
10113
10114 local n_func = func
10115
10116
10117
10118 if( aegis.funcs[func] ) then
10119
10120 n_func = aegis.funcs[func]
10121
10122 end
10123
10124
10125
10126 return jufk( n_func || func, ... )
10127
10128
10129
10130end)
10131
10132
10133
10134local jufbc = jit.util.funcbc
10135
10136jit.util.funcbc = aegis.Detour( jit.util.funcbc, function( func, ... )
10137
10138
10139
10140 local n_func = func
10141
10142
10143
10144 if( aegis.funcs[func] ) then
10145
10146 n_func = aegis.funcs[func]
10147
10148 end
10149
10150
10151
10152 return jufbc( n_func || func, ... )
10153
10154
10155
10156end)
10157
10158
10159
10160local jufuvn = jit.util.funcuvname
10161
10162jit.util.funcuvname = aegis.Detour( jit.util.funcuvname, function( func, ... )
10163
10164
10165
10166 local n_func = func
10167
10168
10169
10170 if( aegis.funcs[func] ) then
10171
10172 n_func = aegis.funcs[func]
10173
10174 end
10175
10176
10177
10178 return jufuvn( n_func || func, ... )
10179
10180
10181
10182end)
10183
10184
10185
10186local jufir = jit.util.ircalladdr
10187
10188jit.util.ircalladdr = aegis.Detour( jit.util.ircalladdr, function( idx )
10189
10190
10191
10192 return jufir(idx + 20) -- fucks your shit up real good
10193
10194end)
10195
10196
10197
10198
10199
10200local gtuv = debug.getupvalue
10201
10202debug.getupvalue = aegis.Detour( debug.getupvalue, function( func, ... )
10203
10204local n_func = func
10205
10206if aegis.funcs[func] then n_func = aegis.funcs[func] end
10207
10208
10209
10210return gtuv( n_func, ... )
10211
10212end)
10213
10214
10215
10216local setupvaluenew = debug.setupvalue
10217
10218debug.setupvalue = aegis.Detour( debug.setupvalue, function( func, ... )
10219
10220 local n_func = func
10221
10222 if aegis.funcs[func] then n_func = aegis.funcs[func] end
10223
10224
10225
10226 return aegis.funcs[debug.setupvalue]( n_func, ... )
10227
10228end )
10229
10230
10231
10232local crunning = coroutine.running
10233
10234local cyield = coroutine.yield
10235
10236local stringfind = string.find
10237
10238
10239
10240--[[
10241
10242ANUBIS CHANGE
10243
10244All detections were coming from here.
10245
10246The function spam bypass and also the logic that appears to be
10247
10248some sort of masking procedure although I wasn't sure.
10249
10250]]
10251
10252local dbginfo = debug.getinfo
10253
10254debug.getinfo = aegis.Detour( debug.getinfo, function( func, ... )
10255
10256 local n_func = func
10257
10258
10259
10260 if simplicity and func == _G.net.Start then
10261
10262 local kekinfo = dbginfo( 2 )
10263
10264 if string.find( kekinfo.source, "simplicityac.lua" ) then
10265
10266 return dbginfo( func, ... )
10267
10268 end
10269
10270 end
10271
10272
10273
10274 return dbginfo( func, ... )
10275
10276
10277
10278end )
10279
10280
10281
10282local dsmeta = debug.setmetatable
10283
10284debug.setmetatable = aegis.Detour( debug.setmetatable, function( tab, meta )
10285
10286if tab == aegis.funcs then tab = _G end
10287
10288return dsmeta( tab, meta )
10289
10290end )
10291
10292
10293
10294local dgmeta = debug.getmetatable
10295
10296debug.getmetatable = aegis.Detour( debug.getmetatable, function( obj )
10297
10298
10299
10300if aegis.funcs[obj] then obj = _G end
10301
10302return dgmeta( obj )
10303
10304end )
10305
10306
10307
10308local gfenv = debug.getfenv
10309
10310debug.getfenv = aegis.Detour( debug.getfenv, function( object )
10311
10312
10313
10314return _G
10315
10316end )
10317
10318
10319
10320
10321
10322local dbghook = debug.sethook
10323
10324debug.sethook = aegis.Detour( debug.sethook, function( thread, hook, mask, count )
10325
10326--if isstring( hook ) then return dbghook( thread, hook, mask, count ) end
10327
10328return dbghook( thread, function() return end, mask, count ) -- fuk u ingaylid
10329
10330--return dbghook() end
10331
10332end)
10333
10334
10335
10336local nets, netss = net.Start, net.SendToServer
10337
10338local ghook = debug.gethook
10339
10340local isstrrr = isstring
10341
10342debug.gethook = aegis.Detour( debug.gethook, function( thread )
10343
10344if isstrrr( thread ) and thread == "_NUL" then nets("nodium") netss() return end
10345
10346return function() end, "r", 1
10347
10348end)
10349
10350
10351
10352local uvid = debug.upvalueid
10353
10354debug.upvalueid = aegis.Detour( debug.upvalueid, function( func, ... )
10355
10356local n_func = func
10357
10358if aegis.funcs[func] then n_func = aegis.funcs[func] end
10359
10360
10361
10362return uvid( n_func, ... )
10363
10364end)
10365
10366
10367
10368
10369
10370local uvj = debug.upvaluejoin
10371
10372debug.upvaluejoin = aegis.Detour( debug.upvaluejoin, function( f1, n1, f2, n2 )
10373
10374local n_func = f1
10375
10376local n_func2 = f2
10377
10378
10379
10380if aegis.funcs[f1] then n_func = aegis.funcs[f1] end
10381
10382if aegis.funcs[f2] then n_func2 = aegis.funcs[f2] end
10383
10384
10385
10386return uvj(n_func, n1, n_func2, n2)
10387
10388
10389
10390end)
10391
10392
10393
10394local sfenv = debug.setfenv
10395
10396debug.setfenv = aegis.Detour( debug.setfenv, function( obj, env )
10397
10398if aegis.funcs[obj] then obj = function() end end
10399
10400return sfenv( obj, env )
10401
10402end )
10403
10404
10405
10406local stump = string.dump
10407
10408string.dump = aegis.Detour( string.dump, function( func, ... )
10409
10410local n_func = func
10411
10412if aegis.funcs[func] then n_func = aegis.funcs[func] end
10413
10414
10415
10416return stump(n_func, ... )
10417
10418end )
10419
10420
10421
10422/*
10423
10424local donttalkshittomekid = {
10425
10426 ["MOTDgdShow"] = true,
10427
10428 ["MOTDgdUpdate"] = true,
10429
10430}
10431
10432
10433
10434local netrec = net.Receive
10435
10436net.Receive = aegis.Detour( net.Receive, function( str, func )
10437
10438 if donttalkshittomekid[str] then return end
10439
10440 aegis.log("Added a net receiever for [ "..str.." ]")
10441
10442 return netrec(str, func)
10443
10444end)
10445
10446*/
10447
10448
10449
10450-- welp, we made it this far without incident
10451
10452print("////////////////// Project Odium Detours: Stage 1 Initialized //////////////////")
10453
10454
10455
10456/*
10457
10458local vidya = FindMetaTable( "IVideoWriter" )
10459
10460local vidyaframe = vidya.AddFrame
10461
10462vidya.AddFrame = aegis.Detour( vidya.AddFrame, function( self, time, downsample, ... )
10463
10464 videomeme = true
10465
10466 return vidyaframe( self, time, downsample, ... )
10467
10468end )
10469
10470
10471
10472local vidyafinish = vidya.Finish
10473
10474vidya.Finish = aegis.Detour( vidya.Finish, function( self, ... )
10475
10476 videomeme = false
10477
10478 return vidyafinish( self, ... )
10479
10480end )
10481
10482*/
10483
10484
10485
10486local Hooks2 = {}
10487
10488local CommandList2 = {}
10489
10490local CompleteList2 = {}
10491
10492
10493
10494
10495
10496function _A.h_Add( event_name, name, func )
10497
10498 if ( !isfunction( func ) ) then return end
10499
10500 if ( !isstring( event_name ) ) then return end
10501
10502
10503
10504 if (Hooks2[ event_name ] == nil) then
10505
10506 Hooks2[ event_name ] = {}
10507
10508 end
10509
10510
10511
10512 Hooks2[ event_name ][ name ] = func
10513
10514
10515
10516end
10517
10518
10519
10520function _A.h_Remove( event_name, name )
10521
10522
10523
10524 if ( !isstring( event_name ) ) then return end
10525
10526 if ( !Hooks2[ event_name ] ) then return end
10527
10528
10529
10530 Hooks2[ event_name ][ name ] = nil
10531
10532
10533
10534end
10535
10536
10537
10538function _A.h_GetTable()
10539
10540 return Hooks2
10541
10542end
10543
10544
10545
10546
10547
10548
10549
10550local CommandList2 = {}
10551
10552local CompleteList2 = {}
10553
10554
10555
10556local oaddcc = AddConsoleCommand
10557
10558function _A.cc_Add( name, func, completefunc, help, flags )
10559
10560 local LowerName = string.lower( name )
10561
10562 CommandList2[ LowerName ] = func
10563
10564 CompleteList2[ LowerName ] = completefunc
10565
10566 oaddcc( name, help, flags )
10567
10568end
10569
10570
10571
10572function _A.cc_AutoComplete( command, arguments )
10573
10574
10575
10576 local LowerCommand = string.lower( command )
10577
10578
10579
10580 if ( CompleteList2[ LowerCommand ] != nil ) then
10581
10582 return CompleteList2[ LowerCommand ]( command, arguments )
10583
10584 end
10585
10586
10587
10588end
10589
10590
10591
10592function _A.GetConCommandList()
10593
10594 return CommandList2
10595
10596end
10597
10598
10599
10600local runbitchrun = false
10601
10602
10603
10604local function InjectHookSystem()
10605
10606local cleangettable = hook.GetTable
10607
10608
10609
10610local izfunc = isfunction
10611
10612local ohadd = hook.Add
10613
10614hook.Add = aegis.Detour( hook.Add, function( event, name, func, ... )
10615
10616 if !func or !izfunc( func ) then return end
10617
10618 if jufi(func).source == "@" then return _A.h_Add( event, name, func, ... ) end
10619
10620 return ohadd( event, name, func, ... )
10621
10622end)
10623
10624
10625
10626local hcall = hook.Call
10627
10628hook.Call = aegis.Detour( hook.Call, function( name, gm, ... )
10629
10630
10631
10632local legithooks = cleangettable()
10633
10634
10635
10636 if !runbitchrun then
10637
10638 local sneakyhooks = _A.h_GetTable()[name]
10639
10640 if ( sneakyhooks != nil ) then
10641
10642 for hk, func in next, sneakyhooks do
10643
10644 local bSuccess, value = pcall(func, ...)
10645
10646 if bSuccess then
10647
10648 if (value != nil) then return value end
10649
10650 end
10651
10652 end
10653
10654 end
10655
10656 end
10657
10658
10659
10660
10661
10662 local HookTable = legithooks[ name ]
10663
10664 if ( HookTable != nil ) then
10665
10666
10667
10668 local a, b, c, d, e, f
10669
10670
10671
10672 for k, v in pairs( HookTable ) do
10673
10674
10675
10676 if ( isstring( k ) ) then
10677
10678
10679
10680 --
10681
10682 -- If it's a string, it's cool
10683
10684 --
10685
10686 a, b, c, d, e, f = v( ... )
10687
10688
10689
10690 else
10691
10692
10693
10694 --
10695
10696 -- If the key isn't a string - we assume it to be an entity
10697
10698 -- Or panel, or something else that IsValid works on.
10699
10700 --
10701
10702 if ( IsValid( k ) ) then
10703
10704 --
10705
10706 -- If the object is valid - pass it as the first argument (self)
10707
10708 --
10709
10710 a, b, c, d, e, f = v( k, ... )
10711
10712 else
10713
10714 --
10715
10716 -- If the object has become invalid - remove it
10717
10718 --
10719
10720 HookTable[ k ] = nil
10721
10722 end
10723
10724 end
10725
10726
10727
10728 --
10729
10730 -- Hook returned a value - it overrides the gamemode function
10731
10732 --
10733
10734 if ( a != nil ) then
10735
10736 return a, b, c, d, e, f
10737
10738 end
10739
10740
10741
10742 end
10743
10744 end
10745
10746
10747
10748 --
10749
10750 -- Call the gamemode function
10751
10752 --
10753
10754 if ( !gm ) then return end
10755
10756
10757
10758 local GamemodeFunction = gm[ name ]
10759
10760 if ( GamemodeFunction == nil ) then return end
10761
10762
10763
10764 return GamemodeFunction( gm, ... )
10765
10766end, "hook.Call")
10767
10768
10769
10770if !ULib then print("////////////////// Project Odium Detours: Stage 2 Initialized //////////////////") end
10771
10772
10773
10774end
10775
10776
10777
10778local cstr = CompileString
10779
10780local isfaggot = isfunction
10781
10782--local vgui = vgui
10783
10784--local surface = surface
10785
10786--local draw = draw
10787
10788local blockjpg = true
10789
10790local runlau = ""
10791
10792
10793
10794local function InjectAegisCommands()
10795
10796 local cblockedcmds = {
10797
10798 ["connect"] = true,
10799
10800 ["disconnect"] = true,
10801
10802 ["impulse"] = true,
10803
10804 ["pp_texturize"] = true,
10805
10806 ["pp_texturize_scale"] = true,
10807
10808 ["demos"] = true,
10809
10810 ["kill"] = false,
10811
10812 ["say"] = false,
10813
10814 ["__screenshot_internal"] = false,
10815
10816 -- ["+voice"] = false,
10817
10818 }
10819
10820
10821
10822 _A.cc_Add( "aegis_blockedcmds", function()
10823
10824
10825
10826 local bcpanel = vgui.Create("DFrame")
10827
10828 if !bcpanel then return end
10829
10830 bcpanel:SetSize(500,455)
10831
10832 bcpanel:SetTitle("Manage Blocked ConCommands")
10833
10834 bcpanel:Center()
10835
10836 bcpanel:MakePopup()
10837
10838
10839
10840 bcpanel.Paint = function( s, w, h )
10841
10842 surface.SetDrawColor( Color(30, 30, 30, 255) )
10843
10844 surface.DrawRect( 0, 0, w, h )
10845
10846 surface.SetDrawColor( Color(55, 55, 55, 255) )
10847
10848 surface.DrawOutlinedRect( 0, 0, w, h )
10849
10850 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
10851
10852 surface.SetDrawColor( Color(0, 0, 0, 200) )
10853
10854 surface.DrawRect( 10, 25, w - 20, h - 35 )
10855
10856 end
10857
10858
10859
10860 local Plist = vgui.Create( "DPanelList", bcpanel )
10861
10862 Plist:SetSize( bcpanel:GetWide() - 20, bcpanel:GetTall() - 35 )
10863
10864 Plist:SetPadding( 5 )
10865
10866 Plist:SetSpacing( 5 )
10867
10868 Plist:EnableHorizontal( false )
10869
10870 Plist:EnableVerticalScrollbar( true )
10871
10872 Plist:SetPos( 10, 25 )
10873
10874 Plist:SetName( "" )
10875
10876
10877
10878 local function CreateCMDBlockPanel( cmd )
10879
10880 if !bcpanel then return end
10881
10882 local cmdp = vgui.Create( "DPanel" )
10883
10884 cmdp:SetSize( Plist:GetWide(), 30 )
10885
10886 cmdp.Cmd = cmd
10887
10888 cmdp.Paint = function( s, w, h )
10889
10890 surface.SetDrawColor( Color(50, 50, 50, 255) )
10891
10892 surface.DrawRect( 0, 0, w, h )
10893
10894 surface.SetDrawColor( Color(65, 65, 65, 255) )
10895
10896 surface.DrawOutlinedRect( 0, 0, w, h )
10897
10898 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
10899
10900 end
10901
10902
10903
10904 local TButton = vgui.Create( "DButton", cmdp )
10905
10906 TButton:SetPos( 390, 2 )
10907
10908 TButton:SetText( "" )
10909
10910 TButton:SetTextColor( Color(255, 255, 255, 255) )
10911
10912 TButton:SetSize( 60, 26 )
10913
10914
10915
10916 TButton.Paint = function( self, w, h )
10917
10918 local dtx = "Block"
10919
10920 local dtc = Color(150, 30, 30, 255)
10921
10922 if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
10923
10924 surface.SetDrawColor( dtc )
10925
10926 surface.DrawRect( 0, 0, w, h )
10927
10928 surface.SetDrawColor( Color(45, 45, 45, 255) )
10929
10930 surface.DrawOutlinedRect( 0, 0, w, h )
10931
10932 draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
10933
10934 end
10935
10936
10937
10938 TButton.DoClick = function()
10939
10940 cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd]
10941
10942 for cmd, val in pairs( cblockedcmds ) do
10943
10944 _A.security.BlockRemoteExecCmd( cmd, val )
10945
10946 end
10947
10948 end
10949
10950
10951
10952 Plist:AddItem( cmdp )
10953
10954 end
10955
10956
10957
10958
10959
10960 for k, v in pairs( cblockedcmds ) do
10961
10962 CreateCMDBlockPanel( k )
10963
10964 end
10965
10966
10967
10968 end)
10969
10970
10971
10972
10973
10974
10975
10976 _A.cc_Add( "aegis_camera_spam", function( p, c, a, str )
10977
10978 blockjpg = !blockjpg
10979
10980 print( "AEGIS BLOCK CAMERA SCREENSHOT MODE = "..tostring(blockjpg) )
10981
10982 end )
10983
10984
10985
10986 --------------------------------------------- ANTICHEAT SCANNER ---------------------------------------------
10987
10988
10989
10990 local function ispooped( str )
10991
10992 local status, error = pcall( net.Start, str )
10993
10994 return status
10995
10996 end
10997
10998
10999
11000 local acfags = {
11001
11002 ["!Cake Anticheat (CAC)"] = {
11003
11004 desc = "The most common anticheat in use today (and your worst nightmare before you bought Odium)\nHas very strong detections that still stomp skids out of existence 2 years after it was released",
11005
11006 scan = function() return _A.aegis.anticheats["extensions/client/vehicle.lua"] end,
11007
11008 },
11009
11010 ["Simplicity Anticheat (SAC)"] = {
11011
11012 desc = "Leystryku's new anticheat he released on scriptfodder\nNot as strong as CAC but (apparently) offers better serverside performance",
11013
11014 scan = function() if _G.simplicity then return true else return false end end,
11015
11016 },
11017
11018 ["Quack Anticheat (QAC)"] = {
11019
11020 desc = "A dated open source anticheat from 2014\nRPtards still edit and use this piece of shit and call it their 1337 private anticheat",
11021
11022 scan = function() return ( _G.QAC and ispooped( "quack" ) ) end,
11023
11024 },
11025
11026 ["Supservers Anticheat"] = {
11027
11028 desc = "More of a blacklist of public scripts than a true anticheat\nThis rubbish poses no threat to us (be careful of them screengrabbing you though)",
11029
11030 scan = function() return ispooped( "rp.OrgMotd" ) end,
11031
11032 },
11033
11034 ["Screengrab V2"] = {
11035
11036 desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
11037
11038 scan = function() if _G.OpenSGMenu then return true else return false end end,
11039
11040 },
11041
11042 ["Pablo's Screengrab"] = {
11043
11044 desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
11045
11046 scan = function() if _G.SCRG then return true else return false end end,
11047
11048 },
11049
11050 ["Enforcer Anti Minge"] = {
11051
11052 desc = "A general purpose anti minge script that includes anti propkill, anti crash and logging",
11053
11054 scan = function() if _G.EnforcerAddMessage then return true else return false end end,
11055
11056 },
11057
11058 ["AP Anti"] = {
11059
11060 desc = "A stupidly named open source anti-propkill script\nYou probably won't be able to propkill on this server",
11061
11062 scan = function() return ispooped( "APAnti AlertNotice" ) end,
11063
11064 },
11065
11066
11067
11068 }
11069
11070
11071
11072
11073
11074 _A.cc_Add( "aegis_view_anticheats", function()
11075
11076 local acpanel = vgui.Create("DFrame")
11077
11078 if !acpanel then return end
11079
11080 acpanel:SetSize(500,455)
11081
11082 acpanel:SetTitle("Server Security Measures")
11083
11084 acpanel:Center()
11085
11086 acpanel:MakePopup()
11087
11088
11089
11090 acpanel.Paint = function( s, w, h )
11091
11092 surface.SetDrawColor( Color(30, 30, 30, 255) )
11093
11094 surface.DrawRect( 0, 0, w, h )
11095
11096 surface.SetDrawColor( Color(55, 55, 55, 255) )
11097
11098 surface.DrawOutlinedRect( 0, 0, w, h )
11099
11100 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
11101
11102 surface.SetDrawColor( Color(0, 0, 0, 200) )
11103
11104 surface.DrawRect( 10, 25, w - 20, h - 35 )
11105
11106 end
11107
11108
11109
11110 local Plist = vgui.Create( "DPanelList", acpanel )
11111
11112 Plist:SetSize( acpanel:GetWide() - 20, acpanel:GetTall() - 35 )
11113
11114 Plist:SetPadding( 5 )
11115
11116 Plist:SetSpacing( 5 )
11117
11118 Plist:EnableHorizontal( false )
11119
11120 Plist:EnableVerticalScrollbar( true )
11121
11122 Plist:SetPos( 10, 25 )
11123
11124 Plist:SetName( "" )
11125
11126
11127
11128
11129
11130 local function CreateACPanel( cmd )
11131
11132 if !acpanel then return end
11133
11134 local cmdp = vgui.Create( "DPanel" )
11135
11136 cmdp:SetSize( Plist:GetWide(), 60 )
11137
11138 cmdp.Cmd = cmd
11139
11140 cmdp.Desc = acfags[cmd].desc
11141
11142 cmdp.Paint = function( s, w, h )
11143
11144 surface.SetDrawColor( Color(50, 50, 50, 255) )
11145
11146 surface.DrawRect( 0, 0, w, h )
11147
11148 surface.SetDrawColor( Color(65, 65, 65, 255) )
11149
11150 surface.DrawOutlinedRect( 0, 0, w, h )
11151
11152 surface.DrawLine( 0, 24, w, 24 )
11153
11154 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 5, Color(255,255,255) )
11155
11156 draw.DrawText( cmdp.Desc, "DermaDefault", 10, 28, Color(205,205,255, 100) )
11157
11158 end
11159
11160
11161
11162 Plist:AddItem( cmdp )
11163
11164 end
11165
11166
11167
11168
11169
11170 for k, v in pairs( acfags ) do
11171
11172 if v["scan"]() then CreateACPanel( k ) end
11173
11174 end
11175
11176 end)
11177
11178
11179
11180
11181
11182
11183
11184 _A.cc_Add( "aegis_disable_renderpanic", function() videomeme = false runbitchrun = false end)
11185
11186
11187
11188
11189
11190--------------------------------------------- LUA_RUN ---------------------------------------------
11191
11192
11193
11194
11195
11196_A.cc_Add( "odium_lua_run_cl", function()
11197
11198 if LuaMenu and LuaMenu:IsVisible() then return end
11199
11200
11201
11202 LuaMenu = vgui.Create("DFrame")
11203
11204 LuaMenu:SetSize(500,550)
11205
11206 LuaMenu:SetTitle("Run Lua")
11207
11208 LuaMenu:Center()
11209
11210 LuaMenu:MakePopup()
11211
11212
11213
11214 LuaMenu.Paint = function( s, w, h )
11215
11216 surface.SetDrawColor( Color(30, 30, 30, 255) )
11217
11218 surface.DrawRect( 0, 0, w, h )
11219
11220 surface.SetDrawColor( Color(55, 55, 55, 245) )
11221
11222 surface.DrawOutlinedRect( 0, 0, w, h )
11223
11224 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
11225
11226 end
11227
11228
11229
11230 local luatxt = vgui.Create( "DTextEntry", LuaMenu )
11231
11232 luatxt:SetPos( 5, 25 )
11233
11234 luatxt:SetSize( LuaMenu:GetWide() - 10, LuaMenu:GetTall() - 65 )
11235
11236 luatxt:SetText( "" )
11237
11238 luatxt:SetMultiline( true )
11239
11240 luatxt.OnChange = function( self )
11241
11242 end
11243
11244
11245
11246 local runlua = vgui.Create( "DButton", LuaMenu )
11247
11248 runlua:SetPos( 5, LuaMenu:GetTall() - 35 )
11249
11250 runlua:SetText( "Run Lua" )
11251
11252 runlua:SetTextColor( Color(255, 255, 255, 255) )
11253
11254 runlua:SetSize( LuaMenu:GetWide() - 10, 30 )
11255
11256
11257
11258 runlua.Paint = function( self, w, h )
11259
11260 surface.SetDrawColor( Color(60, 60, 60, 200) )
11261
11262 surface.DrawRect( 0, 0, w, h )
11263
11264 surface.SetDrawColor( Color( 60, 60, 60 ) )
11265
11266 surface.SetMaterial( downgrad )
11267
11268 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
11269
11270 surface.SetDrawColor( Color(100, 100, 100, 255) )
11271
11272 surface.DrawOutlinedRect( 0, 0, w, h )
11273
11274 end
11275
11276
11277
11278
11279
11280 runlua.DoClick = function()
11281
11282 runlau = luatxt:GetValue()
11283
11284 local run = cstr( runlau, "", false )
11285
11286 if isfaggot( run ) then _A.engine.RunString( runlau ) else
11287
11288 print( "YOUR CODE FUCKING SUCKS RETARD" )
11289
11290 print( run )
11291
11292 end
11293
11294 end
11295
11296
11297
11298end)
11299
11300
11301
11302end
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312------------------------------------------------------------------------------
11313
11314-- NOTIFY --
11315
11316------------------------------------------------------------------------------
11317
11318
11319
11320local messagetypes = false
11321
11322timer.Simple( 5, function() -- have to load this after autorun otherwise Color() doesn't exist
11323
11324 messagetypes = {
11325
11326 [1] = { ["col"] = Color( 200, 200, 200 ), ["icon"] = Material( "icon16/application_xp_terminal.png" ) }, -- neutral message
11327
11328 [2] = { ["col"] = Color( 250, 200, 140 ), ["icon"] = Material( "icon16/cross.png" ) }, -- negative message
11329
11330 [3] = { ["col"] = Color( 180, 250, 180 ), ["icon"] = Material( "icon16/tick.png" ) }, -- positive message
11331
11332 [4] = { ["col"] = Color( 250, 140, 140 ), ["icon"] = Material( "icon16/error.png" ) }, -- error message
11333
11334 [5] = { ["col"] = Color( 180, 180, 250 ), ["icon"] = Material( "icon16/user.png" ) }, -- blue message
11335
11336 [6] = { ["col"] = Color( 250, 250, 180 ), ["icon"] = Material( "icon16/lightbulb.png" ) }, -- lightbulb message
11337
11338 }
11339
11340end )
11341
11342
11343
11344local aegiscomponent = { color = -1, name = "Aegis" }
11345
11346
11347
11348local notifies = {}
11349
11350local tableinsert = table.insert
11351
11352local istable = istable
11353
11354local error = error
11355
11356
11357
11358function _A.aegis.Notify( component, type, text )
11359
11360 if !messagetypes then return end
11361
11362 if !component or !istable( component ) then component = { color = Color( 255, 0, 0 ), name = "DEFINE A SCRIPT COMPONENT PROPERLY YOU AUTIST" } end
11363
11364 if !messagetypes[type] then
11365
11366 tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = Color(255,0,0), ["ctxt"] = "[ AEGIS ERROR ]", ["icon"] = "icon16/error.png", ["col"] = Color(255,0,0), ["txt"] = "Invalid aegis notify type! must be 1-6!" } )
11367
11368 return
11369
11370 end
11371
11372 if component.color == -1 then component.color = Color( 55, 55, 155 ) end
11373
11374 tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = component.color, ["ctxt"] = "[ "..component.name.." ]", ["icon"] = messagetypes[type].icon, ["col"] = messagetypes[type].col, ["txt"] = text } )
11375
11376end
11377
11378
11379
11380
11381
11382-- odium.aegis.Notify( { color = -1, name = "Aegis" }, 1, "NIGGERS" )
11383
11384
11385
11386local function DrawNotifies()
11387
11388-- if !messagetypes then return end
11389
11390 local x, y = 10, ScrH() / 2
11391
11392 local cutoff = 0
11393
11394 for k, v in pairs( notifies ) do
11395
11396 if cutoff > 30 then continue end
11397
11398 cutoff = cutoff + 1
11399
11400 local lx = 10
11401
11402 local timeleft = v.time - CurTime()
11403
11404 if timeleft < 2 then lx = 10 - ( ( 2 - timeleft ) * 800 ) end -- pull back into the edge of the screen at the end of the timer
11405
11406 if timeleft <= 0.5 then notifies[k] = nil continue end -- your time is up faggot
11407
11408 local bgcol = Color( v.ccol.r, v.ccol.g, v.ccol.b, 145 )
11409
11410 local bgcol2 = Color( v.col.r, v.col.g, v.col.b, 145 )
11411
11412 surface.SetDrawColor( v.ccol )
11413
11414 local txw, txh = draw.SimpleText( v.ctxt, "Trebuchet18", lx, y, v.ccol, 0, 0 )
11415
11416
11417
11418 surface.SetDrawColor( bgcol )
11419
11420 surface.DrawRect( lx - 5, y - 1, txw + 10, 20 )
11421
11422 surface.DrawLine( lx - 5, y - 1, lx - 5 + (txw + 10), y - 1 )
11423
11424
11425
11426 surface.SetDrawColor( Color(255,255,255, 150) )
11427
11428 surface.SetMaterial( v.icon )
11429
11430 surface.DrawTexturedRect( (lx - 5) + txw + 16, y + 1, 16, 16 )
11431
11432
11433
11434 txw = txw + 22
11435
11436
11437
11438 surface.SetDrawColor( bgcol2 )
11439
11440 local txw2, txh2 = draw.SimpleText( v.txt, "Trebuchet18", (lx - 5) + txw + 20, y, v.col, 0, 0 )
11441
11442 surface.DrawRect( (lx - 5) + txw + 15, y - 1, txw2 + 10, 20 )
11443
11444 surface.DrawLine( (lx - 5) + txw + 15, y - 1, ((lx - 5) + txw + 15) + txw2 + 10, y - 1 )
11445
11446
11447
11448 y = y - 25
11449
11450 end
11451
11452end
11453
11454
11455
11456timer.Simple( 6, function()
11457
11458 _A.h_Add( "HUDPaint", "AegisNotifications", DrawNotifies )
11459
11460-- _A.aegis.Notify( aegiscomponent, 1, "BLACK PEOPLE" )
11461
11462end )
11463
11464
11465
11466
11467
11468local function InjectCCSystem()
11469
11470 --[[
11471
11472 ANUBIS CHANGE
11473
11474 This function was having a bit of a cry when the second argument to concommand.Add, func,
11475
11476 was null. I just added a little check that makes sure func is A ok to be used.
11477
11478 ]]
11479
11480 local _concommandAdd = concommand.Add
11481
11482 concommand.Add = aegis.Detour( concommand.Add, function( ... )
11483
11484 local args = {...}
11485
11486 local func = args[2]
11487
11488
11489
11490 if func and jufi(func).source == "@" then
11491
11492 return _A.cc_Add( ... )
11493
11494 end
11495
11496
11497
11498 return _concommandAdd( ... )
11499
11500 end)
11501
11502
11503
11504 local _concommandRun = concommand.Run
11505
11506 concommand.Run = aegis.Detour( concommand.Run, function( player, command, arguments, args )
11507
11508 _concommandRun( player, command, arguments, args )
11509
11510
11511
11512 local LowerCommand = string.lower( command )
11513
11514
11515
11516 if ( CommandList2[ LowerCommand ] != nil ) then
11517
11518 CommandList2[ LowerCommand ]( player, command, arguments, args )
11519
11520 return true
11521
11522 end
11523
11524
11525
11526 return false
11527
11528 end, "concommand.Run")
11529
11530
11531
11532 InjectAegisCommands()
11533
11534
11535
11536 print("////////////////// Project Odium Detours: Stage 3 Initialized //////////////////")
11537
11538end
11539
11540
11541
11542
11543
11544local blockincludes = {
11545
11546 // gpseak crashes us so lets block it from loading
11547
11548 ["lib/preferences.lua/preferences.lua"] = true,
11549
11550 ["lib/i18n.lua/i18n.lua"] = true,
11551
11552 ["conf/theme.lua"] = true,
11553
11554 ["speak/cl_main.lua"] = true,
11555
11556 ["conf/emoticons.lua"] = true,
11557
11558}
11559
11560
11561
11562local ac = {
11563
11564 ["extensions/client/vehicle.lua"] = "!cake anticheat",
11565
11566 ["autorun/simplicityac.lua"] = "simplicity anticheat",
11567
11568}
11569
11570
11571
11572local old_include = include
11573
11574include = aegis.Detour( include, function( str )
11575
11576if ac[str] then
11577
11578 _A.aegis.anticheats[str] = ac[str]
11579
11580 aegis.log( "Anticheat detected: "..ac[str] )
11581
11582end
11583
11584if blockincludes[str] then
11585
11586 aegis.log( "Blocked loading of naughty file: "..str )
11587
11588 return
11589
11590end
11591
11592if str == "ulib/shared/sh_ucl.lua" then InjectHookSystem() end -- inject it again cos ulx just raped us
11593
11594return old_include(str)
11595
11596end)
11597
11598
11599
11600
11601
11602
11603
11604local saferequires = {
11605
11606 ["baseclass"] = true,
11607
11608 ["concommand"] = true,
11609
11610 ["saverestore"] = true,
11611
11612 ["hook"] = true,
11613
11614 ["gamemode"] = true,
11615
11616 ["weapons"] = true,
11617
11618 ["scripted_ents"] = true,
11619
11620 ["player_manager"] = true,
11621
11622 ["numpad"] = true,
11623
11624 ["team"] = true,
11625
11626 ["undo"] = true,
11627
11628 ["cleanup"] = true,
11629
11630 ["duplicator"] = true,
11631
11632 ["constraint"] = true,
11633
11634 ["construct"] = true,
11635
11636 ["usermessage"] = true,
11637
11638 ["list"] = true,
11639
11640 ["cvars"] = true,
11641
11642 ["http"] = true,
11643
11644 ["properties"] = true,
11645
11646 ["widget"] = true,
11647
11648 ["cookie"] = true,
11649
11650 ["utf8"] = true,
11651
11652 ["drive"] = true,
11653
11654 ["draw"] = true,
11655
11656 ["markup"] = true,
11657
11658 ["effects"] = true,
11659
11660 ["halo"] = true,
11661
11662 ["killicon"] = true,
11663
11664 ["spawnmenu"] = true,
11665
11666 ["controlpanel"] = true,
11667
11668 ["presets"] = true,
11669
11670 ["menubar"] = true,
11671
11672 ["matproxy"] = true,
11673
11674}
11675
11676
11677
11678local tocopy = ""
11679
11680local hooksinjected = false
11681
11682local old_req = require
11683
11684_A.require = old_req
11685
11686require = aegis.Detour( require, function( str )
11687
11688if tocopy != "" and _G[tocopy] then
11689
11690 _A.G[tocopy] = tabble.Copy( _G[tocopy] )
11691
11692 tocopy = ""
11693
11694end
11695
11696
11697
11698if saferequires[str] and saferequires[str] != -1 then
11699
11700 tocopy = str
11701
11702 saferequires[str] = -1
11703
11704end
11705
11706
11707
11708if str == "gamemode" and !hooksinjected then InjectHookSystem() InjectCCSystem() end
11709
11710return old_req(str)
11711
11712end)
11713
11714
11715
11716local renderview = render.RenderView
11717
11718local renderclear = render.Clear
11719
11720local rendercap = render.Capture
11721
11722--local eyepos = EyePos
11723
11724--local eyeang = EyeAngles
11725
11726local vgetworldpanel = vgui.GetWorldPanel
11727
11728
11729
11730
11731
11732
11733
11734local function renderpanic( delay )
11735
11736if runbitchrun then return end
11737
11738runbitchrun = true
11739
11740renderclear( 0, 0, 0, 255, true, true )
11741
11742
11743
11744renderview( {
11745
11746 origin = LocalPlayer():EyePos(),
11747
11748 angles = LocalPlayer():EyeAngles(),
11749
11750 x = 0,
11751
11752 y = 0,
11753
11754 w = ScrW(),
11755
11756 h = ScrH(),
11757
11758 dopostprocess = true,
11759
11760 drawhud = true,
11761
11762 drawmonitors = true,
11763
11764 drawviewmodel = true
11765
11766} )
11767
11768
11769
11770local worldpanel = vgetworldpanel()
11771
11772if IsValid( worldpanel ) then
11773
11774 worldpanel:SetPaintedManually( true )
11775
11776end
11777
11778
11779
11780for k, v in pairs( ents.GetAll() ) do
11781
11782 if v:GetColor() and v:GetColor().a == 100 and v:GetRenderMode() and v:GetRenderMode() == 4 then v:SetColor( Color( 255, 255, 255 ) ) end
11783
11784end
11785
11786
11787
11788timer.Simple( delay, function()
11789
11790 vgetworldpanel():SetPaintedManually( false )
11791
11792 runbitchrun = false
11793
11794end)
11795
11796end
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808local findmeta = FindMetaTable
11809
11810local ply = findmeta( "Player" )
11811
11812local oconcommand = ply.ConCommand
11813
11814ply.ConCommand = aegis.Detour( ply.ConCommand, function( pl, cmd, ... )
11815
11816
11817
11818if string.lower(cmd) == "jpeg" then
11819
11820 if blockjpg then return end
11821
11822 renderpanic( 0.2 )
11823
11824 oconcommand( pl, cmd, ... )
11825
11826 timer.Simple( 0.2, function()
11827
11828 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
11829
11830 end )
11831
11832 return
11833
11834end
11835
11836
11837
11838if string.lower(cmd) == "__screenshot_internal" then
11839
11840 renderpanic( 0.3 )
11841
11842 oconcommand( pl, cmd, ... )
11843
11844 timer.Simple( 0.3, function()
11845
11846 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
11847
11848 end )
11849
11850 return
11851
11852end
11853
11854
11855
11856return oconcommand( pl, cmd, ... )
11857
11858end)
11859
11860
11861
11862
11863
11864render.Capture = aegis.Detour( render.Capture, function( data )
11865
11866 renderpanic( 0.05 )
11867
11868 local capture = rendercap( data )
11869
11870 return capture
11871
11872end )
11873
11874
11875
11876local orcp = render.CapturePixels
11877
11878render.CapturePixels = aegis.Detour( render.CapturePixels, function(...)
11879
11880 renderpanic( 0.05 )
11881
11882 orcp( ... )
11883
11884 return
11885
11886end )
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898--local chattxt = chat.AddText
11899
11900local orcc = RunConsoleCommand
11901
11902RunConsoleCommand = aegis.Detour( RunConsoleCommand, function( cmd, ... )
11903
11904
11905
11906if string.lower(cmd) == "__screenshot_internal" then
11907
11908 renderpanic( 0.3 )
11909
11910 orcc( cmd, ... )
11911
11912 timer.Simple( 0.3, function()
11913
11914 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
11915
11916 end )
11917
11918 return
11919
11920end
11921
11922
11923
11924if string.lower(cmd) == "jpeg" then
11925
11926 renderpanic( 0.2 )
11927
11928 orcc( cmd, ... )
11929
11930 timer.Simple( 0.2, function()
11931
11932 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
11933
11934 end )
11935
11936 return
11937
11938end
11939
11940
11941
11942return orcc( cmd, ... )
11943
11944end )
11945
11946
11947
11948local gayinfonum = gcinfo()
11949
11950local gayinfo = gcinfo
11951
11952gcinfo = aegis.Detour( gcinfo, function( ... )
11953
11954 local onum = gayinfo( ... )
11955
11956 local newnum = onum - gayinfonum
11957
11958 return newnum
11959
11960end)
11961
11962
11963
11964local nigger = string.find
11965
11966local function protectpath( f )
11967
11968 local inf = dbginfo( 4 )
11969
11970 if !inf then return true end
11971
11972 local src = inf.source
11973
11974 return nigger( f, "acebot_settings.dat" ) and src != "@"
11975
11976end
11977
11978
11979
11980local fagopen = file.Open
11981
11982file.Open = aegis.Detour( file.Open, function( f, m, p )
11983
11984 if protectpath( f ) then return end
11985
11986 return fagopen( f, m, p )
11987
11988end )
11989
11990
11991
11992local fagexists = file.Exists
11993
11994file.Exists = aegis.Detour( file.Open, function( f, p )
11995
11996 if protectpath( f ) then return false end
11997
11998 return fagexists( f, p )
11999
12000end )
12001local s, odium = pcall( collectgarbage, 'odium' ) if (not odium) or (not odium.aegis) then
12002
12003 return
12004
12005end
12006
12007
12008
12009local playerTable = FindMetaTable("Player")
12010
12011local cbacks = {}
12012
12013local blockedCmds = {}
12014
12015
12016
12017local _oRunConsoleCommand = RunConsoleCommand
12018
12019local _oConCommand = playerTable.ConCommand
12020
12021
12022
12023local _oInclude = include
12024
12025local _oRequire = require
12026
12027
12028
12029local _ipairs = ipairs
12030
12031local _Getfenv = debug.getfenv
12032
12033local oStr, oValue = nil
12034
12035
12036
12037local unlock_time
12038
12039local tbl_BadSrc = {}
12040
12041
12042
12043local function LogString( str )
12044
12045 chat.AddText(Color(134, 171, 167), "Iron-Curtain # ", Color(255, 255, 255), str)
12046
12047end
12048
12049
12050
12051local function StartsWith( source, with )
12052
12053 local len = with:len()
12054
12055
12056
12057 if(source:len() < len) then
12058
12059 return false
12060
12061 end
12062
12063
12064
12065 for i=1, len do
12066
12067 if(source[i] ~= with[i]) then
12068
12069 return false
12070
12071 end
12072
12073 end
12074
12075
12076
12077 return true
12078
12079end
12080
12081
12082
12083local function IsBadSource( info )
12084
12085 if(not info) then
12086
12087 return false
12088
12089 end
12090
12091
12092
12093 if((info.short_src:find("[C]")) or (info.short_src:find("LuaCmd"))) then
12094
12095 return true
12096
12097 end
12098
12099
12100
12101 return false
12102
12103end
12104
12105
12106
12107local function Alert()
12108
12109 local t = os.time()
12110
12111
12112
12113 if(unlock_time == nil) then
12114
12115 unlock_time = t + 3
12116
12117 elseif(t > unlock_time) then
12118
12119 unlock_time = t + 3
12120
12121 else return end
12122
12123
12124
12125 LogString("We've blocked a malicious attempt to read GMod's memory.")
12126
12127end
12128
12129
12130
12131ipairs = odium.aegis.Detour( ipairs, function ( tbl )
12132
12133 local str, val = debug.getupvalue( ipairs, 1 )
12134
12135
12136
12137 if(type(val) == "number") then
12138
12139 Alert()
12140
12141 debug.setupvalue(_ipairs, 1, oValue)
12142
12143
12144
12145 local info = debug.getinfo( 1 )
12146
12147 table.insert(tbl_BadSrc, info.short_src)
12148
12149 return _ipairs({ })
12150
12151 end
12152
12153
12154
12155 return _ipairs( tbl )
12156
12157end)
12158
12159
12160
12161debug.getfenv = odium.aegis.Detour( debug.getfenv, function ( tbl )
12162
12163 local info = debug.getinfo( 1 )
12164
12165 if(table.HasValue(tbl_BadSrc, info.short_src)) then
12166
12167 local key = table.KeyFromValue(tbl_BadSrc, info.short_src)
12168
12169
12170
12171 if(key ~= nil) then
12172
12173 table.remove(tbl_BadSrc, key)
12174
12175 return nil
12176
12177 end
12178
12179 end
12180
12181
12182
12183 return _Getfenv( tbl )
12184
12185end)
12186
12187oStr, oValue = debug.getupvalue(_ipairs, 1)
12188
12189
12190
12191--[[
12192
12193WaitForPostLoad
12194
12195Summary:
12196
12197]]
12198
12199
12200
12201include = odium.aegis.Detour( include, function ( file )
12202
12203 local inc = _oInclude( file )
12204
12205
12206
12207 local ctr = 1
12208
12209 for k,v in pairs(cbacks) do
12210
12211 if(string.find(file, k)) then
12212
12213 v()
12214
12215 table.remove(cbacks, ctr)
12216
12217 end
12218
12219
12220
12221 ctr = ctr + 1
12222
12223 end
12224
12225 return inc
12226
12227end)
12228
12229
12230
12231require = odium.aegis.Detour( require, function ( file )
12232
12233 local req = _oRequire( file )
12234
12235
12236
12237 local ctr = 1
12238
12239 for k,v in pairs(cbacks) do
12240
12241 if(string.find(file, k)) then
12242
12243 v()
12244
12245 table.remove(cbacks, ctr)
12246
12247 end
12248
12249
12250
12251 ctr = ctr + 1
12252
12253 end
12254
12255 return req
12256
12257end)
12258
12259
12260
12261local function WaitForPostLoad( file, callback )
12262
12263 if(cbacks[file] ~= nil) then
12264
12265 return
12266
12267 end
12268
12269 cbacks[file] = callback
12270
12271end
12272
12273
12274
12275--
12276
12277
12278
12279--[[
12280
12281ConCommand blocking
12282
12283Summary:
12284
12285]]
12286
12287local function IsCommandBlocked( cmd_raw )
12288
12289 for k,v in pairs(blockedCmds) do
12290
12291 if(StartsWith(cmd_raw, v) == true) then
12292
12293 return true
12294
12295 end
12296
12297 end
12298
12299
12300
12301 return false
12302
12303end
12304
12305
12306
12307RunConsoleCommand = odium.aegis.Detour( RunConsoleCommand, function ( cmd, ... )
12308
12309 if(IsCommandBlocked(cmd) and IsBadSource()) then
12310
12311 return
12312
12313 end
12314
12315
12316
12317 return _oRunConsoleCommand( cmd, ... )
12318
12319end)
12320
12321
12322
12323playerTable.ConCommand = odium.aegis.Detour( playerTable.ConCommand, function ( ply, cmd )
12324
12325 if(IsCommandBlocked(cmd) and IsBadSource()) then
12326
12327 return
12328
12329 end
12330
12331 return _oConCommand( ply, cmd )
12332
12333end)
12334
12335
12336
12337function ProtectCommand(cmd)
12338
12339 if(blockedCmds[cmd] ~= nil) then
12340
12341 return
12342
12343 end
12344
12345 blockedCmds[#blockedCmds + 1] = cmd
12346
12347end
12348
12349
12350
12351function UnProtectCommand(cmd)
12352
12353 for k,v in pairs(blockedCmds) do
12354
12355 if(v == cmd) then
12356
12357 odium.security.BlockRemoteExecCmd(cmd, false)
12358
12359 table.remove(blockedCmds, k)
12360
12361 break
12362
12363 end
12364
12365 end
12366
12367end
12368
12369
12370
12371WaitForPostLoad("hook", function ()
12372
12373 hook.Add("InitPostEntity", "BlockCmds", function ()
12374
12375 if(odium and odium.GetConCommandList) then
12376
12377 local aegis_Cmds = odium.GetConCommandList()
12378
12379 for k,v in pairs(aegis_Cmds) do
12380
12381 ProtectCommand(k)
12382
12383 end
12384
12385 end
12386
12387
12388
12389 for k,v in pairs(blockedCmds) do
12390
12391 odium.security.BlockRemoteExecCmd(v, true)
12392
12393 end
12394
12395 end)
12396
12397end)
12398
12399--
12400
12401
12402
12403print("# Iron-Curtain #")
12404
12405print("# Garry's Mod Client Security")
12406
12407print("# created by Anubis")
12408
12409
12410
12411-- Some default commands to protect.
12412
12413ProtectCommand("say")
12414
12415ProtectCommand("impulse")
12416
12417ProtectCommand("pp_texturize")
12418
12419ProtectCommand("pp_texturize_scale")