· 5 years ago · Jul 16, 2020, 05:36 AM
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, Edited by fuck you
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 Edited by fuck you")
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 "negro",
5974
5975 "Faggot",
5976
5977 "fag",
5978
5979 "Cuckold",
5980
5981 "RDM",
5982
5983 "hi",
5984
5985 "RDA",
5986
5987 "NLR",
5988
5989 "homosexual",
5990
5991 "kys",
5992
5993 "homo",
5994
5995 "Bad scripts",
5996
5997 "Skid",
5998
5999 "Admin abuse",
6000
6001 "Abusing",
6002
6003 "Fuckwit",
6004
6005 "DarkRP Player",
6006
6007 "afroamerican",
6008
6009 "fat american",
6010
6011 "fat kid",
6012
6013 "stole job",
6014
6015 "stolen job",
6016
6017 "cuck",
6018
6019}
6020
6021
6022
6023
6024
6025
6026
6027------------------------------------------------------------------------INSULT GENERATOR--------------------------------------------------------------------------------------
6028
6029
6030
6031
6032
6033
6034
6035local openers = {
6036
6037 "get fucked",
6038
6039 "eat shit",
6040
6041 "fuck a baboon",
6042
6043 "suck my dingleberries",
6044
6045 "choke on steaming cum",
6046
6047 "die in a fire",
6048
6049 "gas yourself",
6050
6051 "sit on garden shears",
6052
6053 "choke on scrotum",
6054
6055 "shove a brick up your ass",
6056
6057 "swallow barbed wire",
6058
6059 "move to sweden",
6060
6061 "fuck a pig",
6062
6063 "bow to me",
6064
6065 "suck my ball sweat",
6066
6067 "come back when you aren't garbage",
6068
6069 "i will piss on everything you love",
6070
6071 "kill yourself",
6072
6073 "livestream suicide",
6074
6075 "neck yourself",
6076
6077 "go be black somewhere else",
6078
6079 "rotate on it",
6080
6081 "choke on it",
6082
6083 "blow it out your ass",
6084
6085 "go browse tumblr",
6086
6087 "go back to darkrp",
6088
6089 "sit on horse cock",
6090
6091 "drive off a cliff",
6092
6093 "rape yourself",
6094
6095 "get raped by niggers",
6096
6097 "fuck right off",
6098
6099 "you mother is a whore",
6100
6101 "come at me",
6102
6103 "go work the corner",
6104
6105 "you are literal cancer",
6106
6107 "why haven't you killed yourself yet",
6108
6109 "why do you even exist",
6110
6111 "shoot your balls off with a shotgun",
6112
6113 "sterilize yourself",
6114
6115 "convert to islam",
6116
6117 "drink bleach",
6118
6119 "remove yourself",
6120
6121 "choke on whale cock",
6122
6123 "suck shit",
6124
6125 "suck a cock",
6126
6127 "lick my sphincter",
6128
6129 "set yourself on fire",
6130
6131 "drink jenkem",
6132
6133 "get beaten to death by your dad",
6134
6135 "choke on your uncle's cock",
6136
6137 "get sat on by a 200kg feminist",
6138
6139 "blow off",
6140
6141 "join isis",
6142
6143 "stick your cock in a blender",
6144
6145 "OD yourself on meth",
6146
6147 "lie under a truck",
6148
6149 "lick a wall socket",
6150
6151 "swallow hot coals",
6152
6153 "die slowly",
6154
6155 "explode yourself",
6156
6157 "swing from the noose",
6158
6159 "end yourself",
6160
6161 "take your best shot",
6162
6163 "get shot in a gay bar",
6164
6165 "drink pozzed cum",
6166
6167 "marry a muslim",
6168
6169 "get a better cheat",
6170
6171 "rub your dick on a cheese grater",
6172
6173 "wrap a rake with barbed wire and sodomize yourself",
6174
6175 "close your gaping cunt",
6176
6177}
6178
6179
6180
6181local joiners = {
6182
6183 "cancer infested",
6184
6185 "cock sucking",
6186
6187 "fuck faced",
6188
6189 "cunt eyed",
6190
6191 "nigger fucking",
6192
6193 "candy ass",
6194
6195 "fairy ass fucking",
6196
6197 "shit licking",
6198
6199 "unlovable",
6200
6201 "disgusting",
6202
6203 "degenerate",
6204
6205 "fuck headed",
6206
6207 "dick lipped",
6208
6209 "autismal",
6210
6211 "gook eyed",
6212
6213 "mongoloided",
6214
6215 "cunt faced",
6216
6217 "dick fisted",
6218
6219 "worthless",
6220
6221 "bleeding cunted",
6222
6223 "hillary loving",
6224
6225 "maggot infested",
6226
6227 "boot lipped",
6228
6229 "chink eyed",
6230
6231 "shit skinned",
6232
6233 "nigger headed",
6234
6235 "lgbt supporting",
6236
6237 "cum stained",
6238
6239}
6240
6241
6242
6243local enders = {
6244
6245 "fuck face",
6246
6247 "poofter",
6248
6249 "jew cunt",
6250
6251 "fagmaster",
6252
6253 "goat rapist",
6254
6255 "rag head",
6256
6257 "cock cheese",
6258
6259 "vaginaphobe",
6260
6261 "coon",
6262
6263 "nigger",
6264
6265 "slag cunt",
6266
6267 "garbage man",
6268
6269 "paeodophile",
6270
6271 "kiddy toucher",
6272
6273 "pony fucker",
6274
6275 "tumblrite",
6276
6277 "sperglord",
6278
6279 "gorilla's dick",
6280
6281 "shit licker",
6282
6283 "shit slick",
6284
6285 "redditor",
6286
6287 "pig fucker",
6288
6289 "spastic",
6290
6291 "cuckold",
6292
6293 "chode gobbler",
6294
6295 "fuckwit",
6296
6297 "retard",
6298
6299 "mongoloid",
6300
6301 "elephants cunt",
6302
6303 "cunt",
6304
6305 "gook",
6306
6307 "fag lord",
6308
6309 "shit stain",
6310
6311 "mpgh skid",
6312
6313 "batch coder",
6314
6315 "pony fucker",
6316
6317 "furfag",
6318
6319 "half caste",
6320
6321 "double nigger",
6322
6323 "cock socket",
6324
6325 "cunt rag",
6326
6327 "anal wart",
6328
6329 "maggot",
6330
6331 "knob polisher",
6332
6333 "fudge packer",
6334
6335 "cock slave",
6336
6337 "trashmaster",
6338
6339 "shitskin",
6340
6341 "curry muncher",
6342
6343 "gator bait",
6344
6345 "bootlip",
6346
6347 "camel jockey",
6348
6349 "wog cunt",
6350
6351 "hooknosed kike",
6352
6353 "feminist",
6354
6355 "wop cunt",
6356
6357 "abbo",
6358
6359 "porch monkey",
6360
6361 "dago",
6362
6363 "anal secretion",
6364
6365 "pig cunt",
6366
6367 "insect",
6368
6369 "sub human",
6370
6371 "mental defect",
6372
6373 "fat whore",
6374
6375 "cunt blood",
6376
6377 "cunt rag",
6378
6379 "cotton picker",
6380
6381 "bum tickling fag",
6382
6383 "degenerate faggot",
6384
6385 "smegma lump",
6386
6387 "darkie",
6388
6389 "fuck toy",
6390
6391 "underage midget cunt",
6392
6393 "twelvie",
6394
6395 "faggot teenager",
6396
6397 "ankle biter",
6398
6399 "fat cunt american",
6400
6401 "bernie loving washout",
6402
6403 "fucking failure",
6404
6405 "cum dumpster",
6406
6407 "waste of skin",
6408
6409 "petrol sniffing coon",
6410
6411 "jenkem bottle",
6412
6413 "dirty jew",
6414
6415 "darkrp admin",
6416
6417 "cuck master",
6418
6419 "barrel of piss",
6420
6421 "tankard of shit",
6422
6423 "cock wart",
6424
6425}
6426
6427
6428
6429local adminstarts = {
6430
6431 "How much did you pay for that staff rank",
6432
6433 "Nice server you got here",
6434
6435 "How much did that gay ULX rank cost",
6436
6437 "I'll be back to shit on you again",
6438
6439 "This is only my first alt account",
6440
6441 "What autist gave you a staff rank",
6442
6443 "Banning me only makes my cock harder",
6444
6445 "I'll be back on a new account in 10 minutes",
6446
6447 "Your server deserves to be destroyed",
6448
6449 "It's been fun wrecking this shit hole",
6450
6451 "Stop touching me with your physgun",
6452
6453 "Letting you have admin was a mistake",
6454
6455 "Do what you must, I have already won",
6456
6457 "Bans mean nothing to me",
6458
6459 "You should appreciate me showing you how to break your terrible server security",
6460
6461 "I hunt down faggots like you for sport",
6462
6463 "I am better than you in every single way",
6464
6465 "I bypassed your anticheat and I'll bypass your ban too",
6466
6467 "Only power mad midget cucks become staff on darkrp",
6468
6469 "Lmao another bad server ruined",
6470
6471 "Watch me rejoin on a VPN",
6472
6473}
6474
6475
6476
6477-- i gave myself terminal autism writing these
6478
6479local cancerstrike = {
6480
6481 "LOL fuk u silver scUm",
6482
6483 "nice aim doEs It cume in NOT N00be?",
6484
6485 "u r terible my doode",
6486
6487 "u almost hit me that time LOL",
6488
6489 "ur aim iz a joke my man",
6490
6491 "get shrekt skrub xdddd",
6492
6493 "u just got shitted on kidddd",
6494
6495 "i bet u r silver on csgo xD",
6496
6497 "u never stood a chance against my pSkillz",
6498
6499 "ur just 2bad to kill me :^(",
6500
6501 "dam im good",
6502
6503 "u wil never beat odium hax kidd :^)",
6504
6505 "eat shit and die xdd",
6506
6507 "do u use xashpass cos ur 2 bad to bypass cac :D",
6508
6509 "i laugh at ur shit skillz :D",
6510
6511 "get fukn owned kid xd",
6512
6513 "i kill u every time u shud try harder :^(",
6514
6515 "all u can do is die LOL",
6516
6517 "N00bez like u cant beat me LOL",
6518
6519 "u tried but im jus 2 gud 4 u",
6520
6521 "u cant even hit me LOL uninstall kid xd",
6522
6523 "git GUD skrub u r an embarasment",
6524
6525 "pathetic LOL",
6526
6527 "2 bad so sad u just bad :^(",
6528
6529 "im global elit in gmod xd",
6530
6531 "thx 4 free kill loser :D",
6532
6533 "r u even trying???",
6534
6535 "top kekt u got rekt",
6536
6537 "fuken smashed kunt :D",
6538
6539 "u shud add me so i can teach u how 2 shoot LOL",
6540
6541 "ur jus 2 weak and sad to beat me xd",
6542
6543 "looks liek ur sad life isnt working out 2 well 4 u :D",
6544
6545 "dats all u got??? LOL!",
6546
6547}
6548
6549
6550
6551local supercancerstrike = {
6552
6553 "dont upsetti hav some spagetti",
6554
6555 "eat my asse like a bufet (3 corse meal xd)",
6556
6557 "i ownt u in ur gay butth0le",
6558
6559 "umade noobe?",
6560
6561 "le troled hard",
6562
6563 "go wach naturo and play wif urself fag REKT",
6564
6565 "LOL i fuckd u so hard just like ur mum lst nit fag",
6566
6567 "u play liek a blynd stefen hawkin haha",
6568
6569 "ARE U GUEYS NEW??",
6570
6571 "are u as bad at life as u are in gmod??",
6572
6573 "omg this is 2 ezy are U even trying??",
6574
6575 "why dont u go play halo an fist ur butthol faget",
6576
6577 "hey granma is that u???? LOL so bad",
6578
6579 "time for you 2 uninstale the game shit stane",
6580
6581 "congrtulations ur the worlds worst gmod player",
6582
6583 "dose ur aim come in NOT NOOBE? LMAO",
6584
6585 "lol i troled u so hard *OWNED*",
6586
6587 "\"i lik 2 eat daddys logs of poo for lucnh while jackn off 2 naturo\"- u",
6588
6589 "take a se4t faget $hitstain u got OWNDE",
6590
6591 "LOL scrub ur gettin rekt hardcroe",
6592
6593 "R u mad becouse ur bad nooby?",
6594
6595 "LMAO did u go to da buthurt king an g3t urself a butthurt with fries?!?",
6596
6597 "why dont u go and play manoppoly you noob",
6598
6599 "you hav no lyfe you cant evan play gmod propaly",
6600
6601 "im hi rite now on ganj but im stil ownen u xD",
6602
6603 "if u want my cum bake ask ur mum LOL",
6604
6605 "butdocter prognoses: OWND",
6606
6607 "cry 2 ur dads dick forver noob",
6608
6609 "lol troled autismal faget",
6610
6611 "LOL N3RD owned",
6612
6613 "\"i love to drink sprems all day\"- u",
6614
6615 "crushd nerd do u want a baindaid for that LOL",
6616
6617 "lol rectal rekage ur so sh1t lol",
6618
6619 "ass states - [_] NOT REKT [X] REKT",
6620
6621 "lmao do u even try????",
6622
6623 "are u slippan off ur chaire cos ur ass is bleeding so hard??",
6624
6625 "u better get a towel for all ur tears faget",
6626
6627 "u got ass asassenated by me rofl",
6628
6629 "u wont shit agen thats how rekt ur ass is",
6630
6631 "i bet youre anus is sore from me ownen u LOL",
6632
6633 "im gonna record a fragshow so i can watch me pwn u ova and ova LMAO",
6634
6635 "i almost feel sorry for you hahahaha",
6636
6637 "lol why dont u play COD so i can own you there too",
6638
6639 "how dose it feel to be owneded so hartd??",
6640
6641 "rekt u lol another one for the fraghsow",
6642
6643 "if i was as bade as u i would kil myself",
6644
6645 "dont fell bad not ervry one can be goode",
6646
6647 "do u need some loob for ur butt so it doesnt hurt so much when i fuck u",
6648
6649 "spesciall delivary for CAPTEN BUTTHURT",
6650
6651 "wats wrong cant play wif ur dads dik in ur mouth????",
6652
6653 "maybe if u put down the cheseburgers u could kill me lol fat nerd",
6654
6655 "getting mad u virgan nerd??",
6656
6657 "butt docta prognosis: buttfustrated",
6658
6659 "<<< OWEND U >>>",
6660
6661 "if u were a fish you wuld be a sperm whael LOL",
6662
6663 ">mfw i ownd u",
6664
6665 "rekt u noob *OWNED*",
6666
6667 "ur gonna have 2 wear dipers now cos ur ass got SHREDED by me",
6668
6669 "y dont u take a short strole to the fagot store and buy some skills scrub",
6670
6671 "school3d by a 13yo lol u r rely bad",
6672
6673 "ur pathetic nerd its like u have parkensons",
6674
6675 "u just got promoted 2 cumcaptain prestige",
6676
6677 "lol pwnd",
6678
6679 "u just got butt raped lol TROLLED U",
6680
6681 "did u learn 2 aim from stevie wondar??? LOL",
6682
6683 "tell ur mum to hand the keyboard and mosue back",
6684
6685 "how does it feel to be shit on by a 13 yer old",
6686
6687 "r u into scat porns or some thing cos it feel\"s like u want me 2 shit on u",
6688
6689 "u play gmod like my granpa and hes ded",
6690
6691 "are u new or just bad?? noobe",
6692
6693 "u play gmod lik a midget playin basket ball",
6694
6695 "welcome to the noob scoole bus first stop ur house <<PWND>>",
6696
6697 ">mfw i rek u",
6698
6699 "\"i got my ass kiked so hard im shittn out my mouf\" - u",
6700
6701 "<-(0.0)-< dats u gettn ownd LOL",
6702
6703 "u just got ur ass ablitterated <<<RECKT>>>",
6704
6705 "c=3 (dats ur tiney dik rofl)",
6706
6707 "just leeve the game and let the real mans play",
6708
6709 "ur so bad u make ur noobe team look good",
6710
6711 "CONGRASTULATIONS YOU GOT FRIST PRIZE IN BEING BUTT MAD (BUT LAST IN PENIS SIZE LMAO)",
6712
6713 "im not even trying to pwn u its just so easy",
6714
6715 "im only 13 an im better than u haha XD",
6716
6717 "u just got raped",
6718
6719 "some one an ambulance cos u just got DE_STROYED",
6720
6721 "i hope u got birth control coz u got rapped",
6722
6723 "lol pwnd scrubb",
6724
6725 "you play lik a girl",
6726
6727 "\"i got fukd so hard dat im cummin shit n shittn cum\"- u",
6728
6729 "ur gonna need tampons for ur ass afta that ownage",
6730
6731 "{{ scoooled u }}",
6732
6733 "(O.o) ~c======3 dats me jizzan on u",
6734
6735 "dont worry at least ur tryan XD",
6736
6737 "cya noob send me a post card from pwnd city ROFL",
6738
6739 "its ok if u keep practasing u will get bettar lol #rekt",
6740
6741 "\"evry time i fart 1 liter of cum sqerts out\" - u",
6742
6743 "rofl i pwnd u scrub #420 #based #mlgskill",
6744
6745 "u fail just like ur dads condom",
6746
6747 "if i pwnd u any harder it wud be animal abuse",
6748
6749 "uploaden this fragshow roflmao",
6750
6751}
6752
6753
6754
6755local buyourshitfaggot = {
6756
6757 "CAC + VAC + HAC + SAC UNDETECTED",
6758
6759 "STEP UP YOUR GAME FAGGOT",
6760
6761 "RUN ANY LUA SCRIPT UNDETECTED",
6762
6763 "BE THE BEST WHEN YOU BUY THE BEST",
6764
6765 "MAKE DARKRP KIDS CRY",
6766
6767 "DEMOLISH THE LUA STATE",
6768
6769 "PUT YOUR POWER ON DISPLAY",
6770
6771 "STOMP NOOBS INTO THE DIRT",
6772
6773 "CRASH SERVERS WITH NO SURVIVORS",
6774
6775 "HACK ANYWHERE, ANYTIME, ANYONE",
6776
6777 "DESTROY ALL ANTICHEATS",
6778
6779 "TRIGGER FEMINISTS",
6780
6781 "START A SECOND HOLOCAUST",
6782
6783 "TIRED OF BEING A TOTAL FUCKING LOSER?",
6784
6785 "STOMP THE COMP",
6786
6787 "BLACK LIVES SPLATTERED",
6788
6789 "MAKE FACEPUNCH FACEDUNKED",
6790
6791 "BECOME UNBANNABLE",
6792
6793 "DUNK SO HARD YOU BREAK THE NET",
6794
6795 "#1 CAUSE OF ADMIN SUICIDES",
6796
6797 "NO FAT CHICKS",
6798
6799 "DO U <3 CHEATING?",
6800
6801 "LEGIT IS FOR LOSERS",
6802
6803 "YOUR LOSER PARENTS NEVER BOUGHT YOU TOYS THIS COOL",
6804
6805 "SHOOT THE HOTTEST LOADS",
6806
6807}
6808
6809
6810
6811local thistriggersamericans = {
6812
6813 "If i found out a girl I was flirting with was transgender I'd bash the fuck out of that degenerate cunt",
6814
6815 "Feminism is a tool satan is using to corrupt and destroy gods country, FIGHT BACK!",
6816
6817 "It's scientifically proven that women are physically and mentally weaker than men",
6818
6819 "Man's job is to build empires and conquer the earth, woman's only job is to make more men",
6820
6821
6822
6823}
6824
6825
6826
6827local annoyingquestions = {
6828
6829 "whats the max tabs you can have open on a vpn",
6830
6831 "how many vpns does it take to stop a ddos",
6832
6833 "whats better analog or garrys mod",
6834
6835 "whats the time",
6836
6837 "is it possible to make a clock in binary",
6838
6839 "how many cars can you drive at once",
6840
6841 "did you know there's more planes on the ground than there is submarines in the air",
6842
6843 "how many busses can you fit on 1 bus",
6844
6845 "how many tables does it take to support a chair",
6846
6847 "how many doors does it take to screw a screw",
6848
6849 "how long can you hold your eyes closed in bed",
6850
6851 "how long can you hold your breath for under spagetti",
6852
6853 "whats the fastest time to deliver the mail as mail man",
6854
6855 "how many bees does it take to make a wasp make honey",
6856
6857 "If I paint the sun blue will it turn blue",
6858
6859 "how many beavers does it take to build a dam",
6860
6861 "how much wood does it take to build a computer",
6862
6863 "can i have ur credit card number",
6864
6865 "is it possible to blink and jump at the same time",
6866
6867 "did you know that dinosaurs were, on average, large",
6868
6869 "how many thursdays does it take to paint an elephant purple",
6870
6871 "if cars could talk how fast would they go",
6872
6873 "did you know theres no oxygen in space",
6874
6875 "do toilets flush the other way in australia",
6876
6877 "if i finger paint will i get a splinter",
6878
6879 "can you build me an ant farm",
6880
6881 "did you know australia hosts 4 out of 6 of the deadliest spiders in the world",
6882
6883 "is it possible to ride a bike in space",
6884
6885 "can i make a movie based around your life",
6886
6887 "how many pants can you put on while wearing pants",
6888
6889 "if I paint a car red can it wear pants",
6890
6891 "how come no matter what colour the liquid is the froth is always white",
6892
6893 "can a hearse driver drive a corpse in the car pool lane",
6894
6895 "how come the sun is cold at night",
6896
6897 "why is it called a TV set when there is only one",
6898
6899 "if i blend strawberries can i have ur number",
6900
6901 "if I touch the moon will it be as hot as the sun",
6902
6903 "did u know ur dad is always older than u",
6904
6905 "did u know the burger king logo spells burger king",
6906
6907 "did uknow if u chew on broken glass for a few mins, it starts to taste like blood",
6908
6909 "did u know running is faster than walking",
6910
6911 "did u kno the colur blue is called blue because its blue",
6912
6913 "did you know a shooting star isnt a star",
6914
6915 "did u know shooting stars dont actually have guns",
6916
6917 "did u kno the great wall of china is in china",
6918
6919 "statistictal fact: 100% of non smokers die",
6920
6921 "did you kmow if you eat you poop it out",
6922
6923 "did u know rain clouds r called rain clouds cus they are clouds that rain",
6924
6925 "if cows drink milk is that cow a cannibal",
6926
6927 "did u know you cant win a staring contest with a stuffed animal",
6928
6929 "did u know if a race car is at peak speed and hits someone they'll die",
6930
6931 "did u know the distance between the sun and earth is the same distance as the distance between the earth and the sun",
6932
6933 "did u kno flat screen tvs arent flat",
6934
6935 "did u know aeroplane mode on ur phone doesnt make ur phone fly",
6936
6937 "did u kno too many britdhays can kill you",
6938
6939 "did u know rock music isnt for rocks",
6940
6941 "did u know if you eat enough ice you can stop global warming",
6942
6943 "if ww2 happened before vietnam would that make vietnam world war 2",
6944
6945 "did you know 3.14 isn't a real pie",
6946
6947 "did u know 100% of stair accidents happen on stairs",
6948
6949 "can vampires get AIDS",
6950
6951 "what type of bird was a dodo",
6952
6953 "did u know dog backwards is god",
6954
6955 "did you know on average a dog barks more than a cat",
6956
6957}
6958
6959
6960
6961function AB.GenerateInsult()
6962
6963 return table.Random(openers).." you "..table.Random(joiners).." "..table.Random(enders)
6964
6965end
6966
6967
6968
6969function AB.GenerateInsult2()
6970
6971 return string.upper(table.Random(openers)).." YOU "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(enders))
6972
6973end
6974
6975
6976
6977function AB.GenerateInsult3()
6978
6979 return table.Random(adminstarts).." you "..table.Random(joiners).." "..table.Random(enders)
6980
6981end
6982
6983
6984
6985function AB.GenerateInsult4()
6986
6987 return table.Random(cancerstrike)
6988
6989end
6990
6991
6992
6993function AB.GenerateInsult5()
6994
6995 return table.Random(supercancerstrike)
6996
6997end
6998
6999
7000
7001function AB.GeneratePromo()
7002
7003 return table.Random(buyourshitfaggot).." and kys too"
7004
7005end
7006
7007
7008
7009function AB.FormatChatString( str )
7010
7011 str = string.Replace( str, "@1", AB.GenerateInsult() )
7012
7013 str = string.Replace( str, "@2", AB.GenerateInsult2() )
7014
7015 str = string.Replace( str, "@3", AB.GenerateInsult3() )
7016
7017 str = string.Replace( str, "@4", AB.GenerateInsult4() )
7018
7019 str = string.Replace( str, "@opener", table.Random(openers) )
7020
7021 str = string.Replace( str, "@joiner", table.Random(joiners) )
7022
7023 str = string.Replace( str, "@slur", table.Random(enders) )
7024
7025 str = string.Replace( str, "@getodium", AB.GeneratePromo() )
7026
7027 str = string.Replace( str, "@csgo", AB.GenerateInsult5() )
7028
7029 return str
7030
7031end
7032
7033
7034
7035concommand.Add("ace_insult", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult() ) end)
7036
7037concommand.Add("ace_insult2", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult2() ) end)
7038
7039local siterator = 1
7040
7041concommand.Add("ace_insult3", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult3() ) end)
7042
7043concommand.Add("ace_insult4", function() LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end)
7044
7045
7046
7047concommand.Add("ace_chatspam_once", function()
7048
7049 local txt = AB.ChatSpamText
7050
7051 if AB.Vars.ChatSpamOOC then txt = "// "..txt end
7052
7053 txt = AB.FormatChatString( txt )
7054
7055 if AB.Vars.ChatSpamPM then
7056
7057 for _, p in pairs(player.GetAll()) do
7058
7059 if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
7060
7061 RunConsoleCommand("ulx", "psay", p:Nick(), txt)
7062
7063 end
7064
7065 else
7066
7067 RunConsoleCommand("say", txt)
7068
7069 end
7070
7071end)
7072
7073
7074
7075
7076
7077
7078
7079--AB.CurrentBase = 0
7080
7081--AB.BaseAreaSize = 2000
7082
7083function AB.SetBase()
7084
7085 AB.ChatText( "Set base location", Color(255,255,255) )
7086
7087 AB.CurrentBase = LocalPlayer():GetPos()
7088
7089end
7090
7091concommand.Add( "ace_base_set", AB.SetBase )
7092
7093
7094
7095function AB.UnsetBase()
7096
7097 AB.ChatText( "Removed base", Color(255,255,255) )
7098
7099 AB.CurrentBase = 0
7100
7101end
7102
7103concommand.Add( "ace_base_remove", AB.UnsetBase )
7104
7105
7106
7107function AB.SetBaseSize( p, cmd, arg, astr )
7108
7109 if !tonumber( arg[1] ) then AB.ChatText( "Please specify a valid base radius in metres", Color(255,205,205) ) return end
7110
7111 AB.ChatText( "Set base proximity radius to "..arg[1].."m", Color(255,255,255) )
7112
7113 AB.BaseAreaSize = arg[1]
7114
7115end
7116
7117concommand.Add( "ace_base_setsize", AB.SetBaseSize )
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131local elements = {
7132
7133 { -- Screen
7134
7135 x = 0.075,
7136
7137 y = 0.04,
7138
7139 w = 0.85,
7140
7141 h = 0.25,
7142
7143
7144
7145 },
7146
7147 { -- ABORT
7148
7149 x = 0.075,
7150
7151 y = 0.04 + 0.25 + 0.03,
7152
7153 w = 0.85 / 2 - 0.04 / 2 + 0.05,
7154
7155 h = 0.125,
7156
7157 text = "ABORT",
7158
7159 },
7160
7161 { -- OK
7162
7163 x = 0.5 + 0.04 / 2 + 0.05,
7164
7165 y = 0.04 + 0.25 + 0.03,
7166
7167 w = 0.85 / 2 - 0.04 / 2 - 0.05,
7168
7169 h = 0.125,
7170
7171 text = "OK",
7172
7173 }
7174
7175}
7176
7177
7178
7179do -- Create numbers
7180
7181 for i = 1, 9 do
7182
7183 local column = (i - 1) % 3
7184
7185
7186
7187 local row = math.floor((i - 1) / 3)
7188
7189
7190
7191 local element = {
7192
7193 x = 0.075 + (0.3 * column),
7194
7195 y = 0.175 + 0.25 + 0.05 + ((0.5 / 3) * row),
7196
7197 w = 0.25,
7198
7199 h = 0.13,
7200
7201 text = tostring(i),
7202
7203 }
7204
7205 table.insert(elements, element)
7206
7207 end
7208
7209end
7210
7211
7212
7213
7214
7215function AB.CalculateKeypadCursorPos(ply, ent)
7216
7217 if !ply:IsValid() then return end
7218
7219
7220
7221 local tr = util.TraceLine( { start = ply:EyePos(), endpos = ply:EyePos() + ply:GetAimVector() * 65, filter = ply } )
7222
7223 if !tr.Entity or tr.Entity ~= ent then return 0, 0 end
7224
7225
7226
7227 local scale = ent.Scale
7228
7229 if !scale then return 0, 0 end
7230
7231
7232
7233 local pos, ang = ent:CalculateRenderPos(), ent:CalculateRenderAng()
7234
7235 if !pos or !ang then return 0, 0 end
7236
7237 local normal = ent:GetForward()
7238
7239
7240
7241 local intersection = util.IntersectRayWithPlane(ply:EyePos(), ply:GetAimVector(), pos, normal)
7242
7243 if !intersection then return 0, 0 end
7244
7245
7246
7247 local diff = pos - intersection
7248
7249
7250
7251 local x = diff:Dot( -ang:Forward() ) / scale
7252
7253 local y = diff:Dot( -ang:Right() ) / scale
7254
7255
7256
7257 return x, y
7258
7259end
7260
7261
7262
7263function AB.KPGetHoveredElement(ply, ent)
7264
7265 local scale = ent.Scale
7266
7267
7268
7269 local w, h = ent.Width2D, ent.Height2D
7270
7271 local x, y = AB.CalculateKeypadCursorPos(ply, ent)
7272
7273
7274
7275 for _, element in ipairs(elements) do
7276
7277 local element_x = w * element.x
7278
7279 local element_y = h * element.y
7280
7281 local element_w = w * element.w
7282
7283 local element_h = h * element.h
7284
7285
7286
7287 if element_x < x and element_x + element_w > x and
7288
7289 element_y < y and element_y + element_h > y
7290
7291 then
7292
7293 return element
7294
7295 end
7296
7297 end
7298
7299end
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321AB.ShekelGrabbers = {}
7322
7323local nxsuicidemsg = 0
7324
7325function AB.Logic()
7326
7327local me = LocalPlayer()
7328
7329if !me:IsValid() then return end
7330
7331
7332
7333local lmemfootprint = gcinfo()
7334
7335
7336
7337for k, v in pairs(player.GetAll()) do
7338
7339
7340
7341-- spectator detector
7342
7343 if( v:GetObserverTarget() and v != me and v:GetObserverTarget() == me and !table.HasValue( AB.TheyHaveEyesEverywhere, v ) ) then
7344
7345 surface.PlaySound("buttons/bell1.wav")
7346
7347 AB.ChatText( v:Nick().." has begun spectating you!", Color(255,100,0) )
7348
7349 table.insert( AB.TheyHaveEyesEverywhere, v )
7350
7351 end
7352
7353
7354
7355 if AB.Vars.DodgeArrest then
7356
7357 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
7358
7359 if nxsuicidemsg <= CurTime() then
7360
7361 AB.ChatText( "Automatically suicided to avoid being arrested by "..v:Nick(), Color(255,255,255) )
7362
7363 nxsuicidemsg = CurTime() + 1
7364
7365 end
7366
7367 RunConsoleCommand( "kill" )
7368
7369 end
7370
7371 end
7372
7373
7374
7375
7376
7377 if AB.Vars.KeypadJew then
7378
7379
7380
7381 local kp = v:GetEyeTrace().Entity
7382
7383 if IsValid(kp) && IsValid(v) and string.find( kp:GetClass(), "Keypad") and v:EyePos():Distance(kp:GetPos()) <= 120 then
7384
7385 kp.tempCode = kp.tempCode or ""
7386
7387 kp.tempText = kp.tempText or ""
7388
7389 kp.tempStatus = kp.tempStatus or 0
7390
7391
7392
7393 if kp:GetText() != kp.tempText or kp:GetStatus() != kp.tempStatus then
7394
7395 kp.tempText = kp:GetText()
7396
7397 kp.tempStatus = kp:GetStatus()
7398
7399 if(kp.tempText && !kp:GetSecure()) then
7400
7401 kp.tempCode = kp.tempText
7402
7403 timer.Simple(0, function()
7404
7405 if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
7406
7407 kp.code = kp.tempCode
7408
7409 end
7410
7411 end)
7412
7413 else
7414
7415 local i = AB.KPGetHoveredElement(v, kp)
7416
7417 if (i) then i = i.text end
7418
7419 if kp.tempText then
7420
7421 timer.Simple(0, function()
7422
7423 if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
7424
7425 kp.code = kp.tempCode
7426
7427 end
7428
7429 end)
7430
7431 end
7432
7433
7434
7435 if kp.tempText == "" || kp:GetStatus() == 2 then
7436
7437 kp.tempCode = ""
7438
7439 end
7440
7441
7442
7443 timer.Simple(0, function()
7444
7445 if(tonumber(i) && kp:GetText():len() != 0) then
7446
7447 kp.tempCode = kp.tempCode..i
7448
7449 end
7450
7451 end)
7452
7453 end
7454
7455 end
7456
7457 end
7458
7459
7460
7461 end
7462
7463
7464
7465
7466
7467
7468
7469 if isvector( AB.CurrentBase ) then
7470
7471 if v == me then continue end
7472
7473 if AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) < tonumber(AB.BaseAreaSize) then
7474
7475 if !table.HasValue( AB.ShekelGrabbers, v ) then
7476
7477 surface.PlaySound("buttons/bell1.wav")
7478
7479 AB.ChatText( v:Nick().." has entered your base!", Color(255,205,0) )
7480
7481 table.insert( AB.ShekelGrabbers, v )
7482
7483 end
7484
7485 elseif table.HasValue( AB.ShekelGrabbers, v ) and AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) > tonumber(AB.BaseAreaSize) then
7486
7487 AB.ChatText( v:Nick().." has left your base", Color(100,255,100) )
7488
7489 table.RemoveByValue( AB.ShekelGrabbers, v )
7490
7491 end
7492
7493 else
7494
7495 AB.ShekelGrabbers = {}
7496
7497 end
7498
7499
7500
7501end
7502
7503
7504
7505for k,v in pairs( AB.TheyHaveEyesEverywhere ) do
7506
7507 if( !IsValid( v ) ) then table.remove( AB.TheyHaveEyesEverywhere, k ) continue end
7508
7509 if( !v:GetObserverTarget() or ( v:GetObserverTarget() and v:GetObserverTarget() != me ) ) then
7510
7511 AB.ChatText( v:Nick().." has stopped spectating you!", Color(100,255,100) )
7512
7513 table.remove( AB.TheyHaveEyesEverywhere, k )
7514
7515 end
7516
7517end
7518
7519
7520
7521if AB.Vars.ChatSpam then
7522
7523 if AB.Vars.ChatSpamBind and !me:KeyDown(IN_WALK) then return end
7524
7525 local txt = AB.ChatSpamText
7526
7527 if AB.Vars.ChatSpamInsult then txt = AB.GenerateInsult() end
7528
7529 if AB.Vars.ChatSpamOOC then txt = "// "..txt end
7530
7531 txt = AB.FormatChatString( txt )
7532
7533 if AB.Vars.ChatSpamPM then
7534
7535 for _, p in pairs(player.GetAll()) do
7536
7537 if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
7538
7539 RunConsoleCommand("ulx", "psay", p:Nick(), txt)
7540
7541 end
7542
7543 else
7544
7545 RunConsoleCommand("say", txt)
7546
7547 end
7548
7549end
7550
7551
7552
7553if AB.Vars.DemoteSpam or AB.Vars.WantedSpam or AB.Vars.ULXVotekickSpam or AB.Vars.ULXVotebanSpam then
7554
7555 for k, v in RandomPairs(player.GetAll()) do
7556
7557 if AB.IsFriend( v ) or v == me then continue end
7558
7559 local fag1, fag2 = table.Random( demotereasons )
7560
7561 if AB.Vars.DemoteSpam then RunConsoleCommand( "darkrp", "demote", v:Nick(), fag1 ) end
7562
7563 if AB.Vars.WantedSpam then RunConsoleCommand( "darkrp", "wanted", v:Nick(), fag1 ) end
7564
7565 if AB.Vars.ULXVotekickSpam then RunConsoleCommand( "ulx", "votekick", v:Nick(), fag1 ) end
7566
7567 if AB.Vars.ULXVotebanSpam then RunConsoleCommand( "ulx", "voteban", v:Nick(), "0" ) end
7568
7569 end
7570
7571end
7572
7573
7574
7575if AB.Vars.FlashlightSpam then
7576
7577 if input.IsKeyDown(KEY_F) then me:ConCommand("impulse 100") end
7578
7579end
7580
7581
7582
7583if AB.IsTTT then AB.ScanForTraitors() end
7584
7585
7586
7587AB.MemoryDebug["logic"] = gcinfo() - lmemfootprint
7588
7589
7590
7591end
7592
7593hook.Add("Think", "ab_logic", AB.Logic)
7594
7595
7596
7597
7598
7599
7600
7601function AB.PKTube()
7602
7603local oldwep = false
7604
7605if !LocalPlayer():IsOnGround() then AB.ChatText( "You can't tube launch when you aren't on the ground!", Color(255,100,0) ) return end
7606
7607if !LocalPlayer():HasWeapon("weapon_physgun") then AB.ChatText( "You don't have a physgun!", Color(255,100,0) ) return end
7608
7609if LocalPlayer():GetActiveWeapon():GetClass() != "weapon_physgun" then RunConsoleCommand( "use", "weapon_physgun" ) oldwep = true end
7610
7611
7612
7613AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(-180,0,0) )
7614
7615AB.ActionTimer( 0.05, function() RunConsoleCommand( "gm_spawn", "models/props_phx/construct/concrete_pipe01.mdl") end)
7616
7617AB.ActionTimer( 0.05, function() AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(120,0,0) ) end)
7618
7619AB.ActionTimer( 0.1, function() RunConsoleCommand( "+attack") end)
7620
7621AB.ActionTimer( 0.05, function() AB.ScrollDelta = 100 end)
7622
7623AB.ActionTimer( 0.1, function() RunConsoleCommand( "-attack") AB.ScrollDelta = 0 end)
7624
7625if oldwep then
7626
7627AB.ActionTimer( 0.01, function() RunConsoleCommand( "lastinv") end)
7628
7629end
7630
7631AB.ActionTimer( 0.1, function() RunConsoleCommand( "undo") end, true)
7632
7633
7634
7635end
7636
7637concommand.Add("ace_pk_tubelaunch", AB.PKTube)
7638
7639
7640
7641function AB.PK180()
7642
7643AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7644
7645end
7646
7647concommand.Add("ace_pk_180", AB.PK180)
7648
7649
7650
7651function AB.PK180Up()
7652
7653--AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7654
7655AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
7656
7657RunConsoleCommand( "+jump")
7658
7659timer.Simple(0.1, function() RunConsoleCommand( "-jump") end)
7660
7661end
7662
7663concommand.Add("ace_pk_180up", AB.PK180Up)
7664
7665
7666
7667function AB.ClimbSwep()
7668
7669local oldang = LocalPlayer():EyeAngles()
7670
7671AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 90, LocalPlayer():EyeAngles().r) )
7672
7673timer.Simple(0.15, function() AB.EyeAngles( oldang ) end)
7674
7675end
7676
7677concommand.Add("ace_climbswep", AB.ClimbSwep)
7678
7679
7680
7681function AB.EyeAngles( ang )
7682
7683 local ang = Angle(math.Clamp(ang.p, -90, 90), ang.y, ang.r)
7684
7685 ang:Normalize()
7686
7687 LocalPlayer():SetEyeAngles(ang)
7688
7689end
7690
7691
7692
7693local actiontime = 0
7694
7695
7696
7697function AB.ActionTimer( delay, func, terminate )
7698
7699terminate = terminate or false
7700
7701actiontime = actiontime + delay + (LocalPlayer():Ping() / 1000)
7702
7703timer.Simple( actiontime, func)
7704
7705if terminate then actiontime = 0 end
7706
7707end
7708
7709
7710
7711
7712
7713
7714
7715function AB.CanSee( ply )
7716
7717local Trace = util.TraceLine( {
7718
7719start = LocalPlayer():GetShootPos(),
7720
7721endpos = AB.FindTargetPosition( ply ),
7722
7723mask = MASK_SHOT,
7724
7725filter = { LocalPlayer(), ply }
7726
7727} )
7728
7729
7730
7731return !Trace.Hit
7732
7733end
7734
7735
7736
7737
7738
7739------------------------------------------------------------------------PROPKILL UTILS--------------------------------------------------------------------------------------
7740
7741
7742
7743function AB.PhysgunPickup( p, e )
7744
7745 if AB.Vars.DontTouchMeThere and e == LocalPlayer() then RunConsoleCommand( "kill" ) end
7746
7747 AB.HoldingProp = e
7748
7749end
7750
7751
7752
7753function AB.PhysgunDrop( p, e )
7754
7755-- AB.HoldingProp = game.GetWorld()
7756
7757end
7758
7759
7760
7761hook.Add( "PhysgunPickup", "ab_physgun", AB.PhysgunPickup )
7762
7763hook.Add( "PhysgunDrop", "ab_physgun", AB.PhysgunDrop )
7764
7765
7766
7767
7768
7769------------------------------------------------------------------------WEAPON INSPECTOR--------------------------------------------------------------------------------------
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787local function gaytext( parent, text, vpos, color )
7788
7789local ABLabel = vgui.Create( "DLabel", parent )
7790
7791ABLabel:SetFont( "TargetID" )
7792
7793ABLabel:SetPos( 20, vpos)
7794
7795ABLabel:SetColor( color )
7796
7797ABLabel:SetText( text )
7798
7799ABLabel:SizeToContents()
7800
7801end
7802
7803
7804
7805local overrides = {
7806
7807
7808
7809 ["weapon_crowbar"] = {
7810
7811 Damage = 25,
7812
7813 NumShots = 1,
7814
7815 ClipSize = 1,
7816
7817 Delay = 0.404
7818
7819 },
7820
7821
7822
7823 ["weapon_stunstick"] = {
7824
7825 Damage = 40,
7826
7827 NumShots = 1,
7828
7829 ClipSize = 1,
7830
7831 Delay = 0.81
7832
7833 },
7834
7835
7836
7837 ["weapon_pistol"] = {
7838
7839 Damage = 12,
7840
7841 NumShots = 1,
7842
7843 ClipSize = 18,
7844
7845 Ammo = "pistol",
7846
7847 Delay = 0.12,
7848
7849 },
7850
7851
7852
7853 ["weapon_357"] = {
7854
7855 Damage = 75,
7856
7857 NumShots = 1,
7858
7859 ClipSize = 6,
7860
7861 Ammo = "357",
7862
7863 Delay = 0.75,
7864
7865 },
7866
7867
7868
7869 ["weapon_smg1"] = {
7870
7871 Damage = 12,
7872
7873 NumShots = 1,
7874
7875 ClipSize = 45,
7876
7877 Ammo = "SMG1",
7878
7879 Delay = 0.075,
7880
7881 },
7882
7883
7884
7885 ["weapon_shotgun"] = {
7886
7887 Damage = 4,
7888
7889 NumShots = 7,
7890
7891 ClipSize = 6,
7892
7893 Ammo = "buckshot",
7894
7895 Delay = 0.9,
7896
7897 },
7898
7899
7900
7901 ["weapon_ar2"] = {
7902
7903 Damage = 11,
7904
7905 NumShots = 1,
7906
7907 ClipSize = 30,
7908
7909 Delay = 0.105,
7910
7911 },
7912
7913
7914
7915 ["weapon_crossbow"] = {
7916
7917 Damage = 100,
7918
7919 NumShots = 1,
7920
7921 ClipSize = 1,
7922
7923 Delay = 1.95,
7924
7925 },
7926
7927
7928
7929 ["weapon_rpg"] = {
7930
7931 Damage = 150,
7932
7933 NumShots = 1,
7934
7935 ClipSize = 1,
7936
7937 Delay = 2.2,
7938
7939 },
7940
7941
7942
7943 ["weapon_frag"] = {
7944
7945 Damage = 150,
7946
7947 NumShots = 1,
7948
7949 ClipSize = 1,
7950
7951 Delay = 1.95,
7952
7953 },
7954
7955
7956
7957 ["fas2_rem870"] = {
7958
7959 Delay = .86,
7960
7961 },
7962
7963
7964
7965 ["fas2_ks23"] = {
7966
7967 Delay = 1.11,
7968
7969 },
7970
7971
7972
7973 ["fas2_m67"] = {
7974
7975 Damage = 160,
7976
7977 Delay = 1.75,
7978
7979 },
7980
7981
7982
7983}
7984
7985
7986
7987local ammostrings = {
7988
7989 pistol = "HL2 Pistol",
7990
7991 smg1 = "HL2 SMG",
7992
7993 ar2 = "HL2 Pulse Rifle",
7994
7995 ["357"] = "HL2 Magnum",
7996
7997 buckshot = "HL2 Shotgun",
7998
7999 rpg_round = "HL2 Rocket",
8000
8001}
8002
8003
8004
8005function AB.GunMenu()
8006
8007if GMenu then return end
8008
8009
8010
8011local GMenu = vgui.Create("DFrame")
8012
8013GMenu:SetSize(590,520)
8014
8015GMenu:SetTitle("Inspecting Weapon")
8016
8017GMenu:Center()
8018
8019GMenu:MakePopup()
8020
8021
8022
8023GMenu.Paint = function(panel, w, h)
8024
8025surface.SetDrawColor( Color(50, 50, 90, 255) )
8026
8027surface.DrawRect( 0, 0, w, h )
8028
8029surface.SetDrawColor( Color(155, 155, 155, 255) )
8030
8031surface.DrawOutlinedRect( 0, 0, w, h )
8032
8033surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
8034
8035surface.SetDrawColor( Color(0, 0, 0, 255) )
8036
8037surface.DrawRect( 10, 25, w - 20, h - 35 )
8038
8039end
8040
8041
8042
8043local gun = LocalPlayer():GetActiveWeapon()
8044
8045if !gun:IsValid() then return end
8046
8047local m9gay = false
8048
8049local fas = false
8050
8051local cw2 = false
8052
8053if gun.Base == "bobs_gun_base" or gun.Base == "bobs_shotty_base" or gun.Base == "bobs_scoped_base" then m9gay = true end
8054
8055if gun.Base == "fas2_base" or gun.Base == "fas2_base_shotgun" then fas = true end
8056
8057if gun.Base == "cw_base" then cw2 = true end
8058
8059
8060
8061gaytext( GMenu, "Weapon Name: "..gun:GetPrintName(), 30, Color(205,225,255,255) )
8062
8063gaytext( GMenu, "Weapon Class: "..gun:GetClass(), 50, Color(105,225,255,255) )
8064
8065
8066
8067//////////////////////////////// hl2 guns ////////////////////////////////
8068
8069
8070
8071if !gun.Primary then gun.Primary = {} end
8072
8073
8074
8075if overrides[gun:GetClass()] then
8076
8077local tab = overrides[gun:GetClass()]
8078
8079for k, v in pairs(tab) do
8080
8081 gun.Primary[k] = v
8082
8083end
8084
8085
8086
8087end
8088
8089
8090
8091//////////////////////////////// weapon stat workarounds ////////////////////////////////
8092
8093
8094
8095local delay = 0
8096
8097if gun.Primary.Delay then
8098
8099 delay = gun.Primary.Delay
8100
8101elseif m9gay then
8102
8103 delay = 60 / gun.Primary.RPM
8104
8105elseif fas or cw2 then
8106
8107 delay = gun.FireDelay
8108
8109end
8110
8111
8112
8113local gdmg = 0
8114
8115if gun.Primary.Damage then
8116
8117 gdmg = gun.Primary.Damage
8118
8119elseif fas or cw2 then
8120
8121 gdmg = gun.Damage
8122
8123end
8124
8125
8126
8127local gnumshots = 1
8128
8129if gun.Primary.NumShots then
8130
8131 gnumshots = gun.Primary.NumShots
8132
8133elseif fas or cw2 then
8134
8135 gnumshots = gun.Shots or 1
8136
8137end
8138
8139
8140
8141local gcone = 0
8142
8143if gun.Primary.Cone then
8144
8145 gcone = gun.Primary.Cone
8146
8147elseif m9gay then
8148
8149 gcone = gun.Primary.Spread
8150
8151elseif fas then
8152
8153 gcone = gun.HipCone or 0
8154
8155elseif cw2 then
8156
8157 gcone = gun.HipSpread or 0
8158
8159end
8160
8161
8162
8163local grecoil = 0
8164
8165if gun.Primary.Recoil then
8166
8167 grecoil = gun.Primary.Recoil
8168
8169elseif m9gay then
8170
8171 grecoil = gun.Primary.KickUp
8172
8173elseif fas then
8174
8175 grecoil = gun.Recoil or 0
8176
8177end
8178
8179
8180
8181local voff = 90
8182
8183
8184
8185gaytext( GMenu, "Damage: "..(gdmg or "nil").." ( x"..(gnumshots or "nil").." ) -- ("..(gdmg * gnumshots).." Total)", voff, Color(255,225,155,255) )
8186
8187voff = voff + 20
8188
8189
8190
8191
8192
8193if gun.Primary.ClipSize then
8194
8195 if gun.Primary.ClipSize == -1 then gun.Primary.ClipSize = 1 end
8196
8197 gaytext( GMenu, "Damage Per Mag: "..(gdmg * gnumshots) * gun.Primary.ClipSize, voff, Color(255,205,105,255) )
8198
8199 voff = voff + 20
8200
8201end
8202
8203
8204
8205gaytext( GMenu, "Damage Per Second: "..math.ceil(1 / delay * (gdmg * gnumshots)), voff, Color(255,155,85,255) )
8206
8207voff = voff + 20
8208
8209
8210
8211if gun.Primary.ClipSize then
8212
8213gaytext( GMenu, "Magazine: "..(gun.Primary.ClipSize or "No Magazine"), voff, Color(255,195,195,255) )
8214
8215voff = voff + 20
8216
8217
8218
8219gaytext( GMenu, "Magdump Time: "..math.Round(gun.Primary.ClipSize * delay, 3).."s", voff, Color(255,95,155,255) )
8220
8221voff = voff + 20
8222
8223end
8224
8225
8226
8227gaytext( GMenu, "Accuracy: "..(10 - (gcone * 100) ), voff, Color(255,255,155,255) )
8228
8229voff = voff + 20
8230
8231
8232
8233if fas then
8234
8235gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimCone or 0 * 100) ), voff, Color(155,255,155,255) )
8236
8237voff = voff + 20
8238
8239end
8240
8241if cw2 then
8242
8243gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimSpread or 0 * 100) ), voff, Color(155,255,155,255) )
8244
8245voff = voff + 20
8246
8247end
8248
8249
8250
8251
8252
8253gaytext( GMenu, "Fire Rate: "..math.Round(delay, 3).." ( "..math.ceil(60 / delay).." Rounds Per Min )", voff, Color(255,255,155,255) )
8254
8255voff = voff + 20
8256
8257
8258
8259--gaytext( GMenu, "Recoil: "..grecoil.." ( "..math.Round((grecoil * 10) * 1 / delay, 1).." recoil per second ) ", voff, Color(205,255,125,255) )
8260
8261--voff = voff + 20
8262
8263
8264
8265
8266
8267if gun.Primary.Ammo then
8268
8269 local ammotyperaw = gun.Primary.Ammo
8270
8271 local ammotype = string.lower(gun.Primary.Ammo)
8272
8273 if ammostrings[ammotype] then ammotyperaw = ammostrings[ammotype] end
8274
8275 gaytext( GMenu, "Ammo Type: "..ammotyperaw, voff, Color(105,255,125,255) )
8276
8277 voff = voff + 20
8278
8279end
8280
8281
8282
8283if m9gay then gaytext( GMenu, "Damage and TTK stats inaccurate due to m9k double penetration bug", voff, Color(255,0,0,255) ) end
8284
8285voff = voff + 40
8286
8287
8288
8289gaytext( 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) )
8290
8291voff = voff + 20
8292
8293gaytext( 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) )
8294
8295voff = voff + 40
8296
8297
8298
8299local ttk = (delay * math.ceil(100 / (gdmg * gnumshots) )) - delay
8300
8301local ttk2 = (delay * math.ceil(50 / (gdmg * gnumshots) )) - delay
8302
8303local ttk3 = (delay * math.ceil(400 / (gdmg * gnumshots) )) - delay
8304
8305local ttk4 = (delay * math.ceil(200 / (gdmg * gnumshots) )) - delay
8306
8307local ttk5 = (delay * math.ceil(800 / (gdmg * gnumshots) )) - delay
8308
8309gaytext( 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) )
8310
8311voff = voff + 20
8312
8313gaytext( 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) )
8314
8315voff = voff + 20
8316
8317
8318
8319
8320
8321
8322
8323end
8324
8325concommand.Add("ace_inspectweapon", AB.GunMenu)
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337------------------------------------------------------------------------AIMBOT UTIL FUNCTIONS--------------------------------------------------------------------------------------
8338
8339
8340
8341
8342
8343
8344
8345-- get this from a better place fucknuts
8346
8347local OEyeAngles = OEyeAngles or FindMetaTable( "Player" ).SetEyeAngles
8348
8349FindMetaTable( "Player" ).SetEyeAngles = function( self, angle )
8350
8351 if ( string.find( string.lower( debug.getinfo( 2 ).short_src ), "/weapons/" ) ) and AB.Vars.NoRecoil then return end
8352
8353 OEyeAngles( self, angle )
8354
8355end
8356
8357
8358
8359local shitweapons = {
8360
8361 "weapon_physgun",
8362
8363 "weapon_physcannon",
8364
8365 "weapon_bugbait",
8366
8367 "weapon_fists",
8368
8369 "gmod_camera",
8370
8371 "gmod_tool",
8372
8373 "weapon_medkit",
8374
8375 "weapon_zm_carry",
8376
8377 "weapon_ttt_unarmed",
8378
8379}
8380
8381-- make sure its a non spastic weapon to aimbot/triggerbot with
8382
8383function AB.CanBotShoot( wep )
8384
8385if !wep:IsValid() then return end
8386
8387if table.HasValue( shitweapons, wep:GetClass() ) then return false end
8388
8389return true
8390
8391end
8392
8393
8394
8395function AB.GetView()
8396
8397 return AB.ViewAngle * 1
8398
8399end
8400
8401
8402
8403function AB.FixView()
8404
8405 if !AB.Vars.Aimbot then return end
8406
8407
8408
8409 local ply = LocalPlayer()
8410
8411 if !ply:IsValid() then return end
8412
8413
8414
8415 AB.ViewAngle = ply:EyeAngles()
8416
8417end
8418
8419
8420
8421local sensitivity = 0.022
8422
8423function AB.RotateView(cmd)
8424
8425 AB.ViewAngle.p = math.Clamp(AB.ViewAngle.p + (cmd:GetMouseY() * sensitivity), -89, 89)
8426
8427 AB.ViewAngle.y = math.NormalizeAngle(AB.ViewAngle.y + (cmd:GetMouseX() * sensitivity * -1))
8428
8429end
8430
8431
8432
8433-- fov based targeting shit
8434
8435function AB.GetAngleFromCrosshair( ply )
8436
8437 local Ang = (AB.FindTargetPosition( ply ) - LocalPlayer():EyePos() ):Angle()
8438
8439 local myangles = LocalPlayer():EyeAngles()
8440
8441 if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
8442
8443 local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
8444
8445 local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
8446
8447 return DiffX, DiffY
8448
8449end
8450
8451
8452
8453function AB.GetDirtyAngleFromCrosshair( ply )
8454
8455 local Ang = ( (ply:GetPos() + Vector( 0, 0, 35 ) ) - LocalPlayer():EyePos() ):Angle()
8456
8457 local myangles = LocalPlayer():EyeAngles()
8458
8459 if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
8460
8461 local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
8462
8463 local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
8464
8465 return DiffX + DiffY
8466
8467end
8468
8469
8470
8471function AB.InFOV( ply )
8472
8473 local DiffX, DiffY = AB.GetAngleFromCrosshair( ply )
8474
8475 return ( DiffX <= AB.NumberVars.AimbotMaxFOV and DiffY <= AB.NumberVars.AimbotMaxFOV )
8476
8477end
8478
8479
8480
8481function AB.FindTargetPosition( ent )
8482
8483 if !ent:IsValid() then return end
8484
8485
8486
8487 if !AB.Vars.AimbotTargetMode then return ent:LocalToWorld( ent:OBBCenter() ) end
8488
8489
8490
8491 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
8492
8493
8494
8495 if ent:IsPlayer() then
8496
8497 local head = ent:LookupAttachment( "eyes" )
8498
8499 if head then
8500
8501 local pos = ent:GetAttachment(head)
8502
8503 if pos then
8504
8505 return pos.Pos + ent:EyeAngles():Forward() * -1.5
8506
8507 end
8508
8509 end
8510
8511 end
8512
8513
8514
8515 local bone = AB.AimbotBone
8516
8517 local head = ent:LookupBone( bone )
8518
8519 if head then
8520
8521 local pos = ent:GetBonePosition( head )
8522
8523 if pos then
8524
8525 return pos
8526
8527 end
8528
8529 end
8530
8531
8532
8533 return ent:LocalToWorld( ent:OBBCenter() )
8534
8535end
8536
8537
8538
8539function AB.CalcTargetPosition( ent )
8540
8541 local targetPos = AB:FindTargetPosition( ent )
8542
8543
8544
8545 if LocalPlayer():IsValid() and LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_crossbow" then
8546
8547 targetPos = AB:PredictProjectileWeapons( ply, ent, targetPos ) or targetPos
8548
8549 end
8550
8551
8552
8553 return targetPos
8554
8555end
8556
8557
8558
8559
8560
8561function AB.PredictProjectileWeapons( ply, target, targetPos )
8562
8563-- local dist = VecM["Length"](targetPos - PlyM["GetShootPos"](ply))
8564
8565 local dist = Vector(targetPos - LocalPlayer():GetShootPos()):Length()
8566
8567 local time = (dist / 3500) + 0.05
8568
8569 targetPos = targetPos + (target:GetVelocity() * time)
8570
8571
8572
8573-- local mul = 0.0075
8574
8575 //targetPos = targetPos - (e["GetVelocity"](ply) * mul)
8576
8577
8578
8579 return targetPos
8580
8581end
8582
8583
8584
8585function AB.CanTargetPlayer( ply )
8586
8587 if !AB.Vars.TargetFriends and AB.IsFriend( ply ) then return false end
8588
8589 if !AB.Vars.TargetHighlighted and AB.IsTarget( ply ) then return false end
8590
8591 if !AB.Vars.TargetAdmins and AB.GetRank( ply ) != ( "user" or "guest" or "player" ) then return false end
8592
8593 if !AB.Vars.TargetSameTeam and ply:Team() == LocalPlayer():Team() then return false end
8594
8595 if !AB.Vars.TargetNoclippers and ply:GetMoveType() == MOVETYPE_NOCLIP then return false end
8596
8597 if DarkRP and AB.IsBabyGod( ply ) then return false end
8598
8599 return true
8600
8601end
8602
8603
8604
8605local boners = {
8606
8607 "ValveBiped.Bip01_Head1",
8608
8609 "ValveBiped.Bip01_Spine2",
8610
8611 "ValveBiped.Bip01_Pelvis",
8612
8613 "ValveBiped.Bip01_R_Forearm",
8614
8615 "ValveBiped.Bip01_L_Forearm",
8616
8617 "ValveBiped.Bip01_R_Calf",
8618
8619 "ValveBiped.Bip01_L_Calf",
8620
8621 "ValveBiped.Bip01_R_Foot",
8622
8623 "ValveBiped.Bip01_L_Foot",
8624
8625}
8626
8627
8628
8629
8630
8631
8632
8633function AB.PrepareForAStomping( ply )
8634
8635 if !ply:IsValid() then return false end
8636
8637
8638
8639 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
8640
8641
8642
8643 if AB.Vars.AimbotTargetMode then
8644
8645 -- right in the kisser
8646
8647 local head = ply:LookupAttachment( "eyes" )
8648
8649 if head then
8650
8651 local pos = ply:GetAttachment(head)
8652
8653 if pos then
8654
8655 local tpoz = pos.Pos + ply:EyeAngles():Forward() * -1.5
8656
8657 if AB.PlayerVisible( ply, tpoz ) then return tpoz end
8658
8659 end
8660
8661 end
8662
8663
8664
8665 else
8666
8667 -- b aim
8668
8669 local head = ply:LookupBone( "ValveBiped.Bip01_Pelvis" )
8670
8671 if head then
8672
8673 local poz = ply:GetBonePosition( head )
8674
8675 if poz then
8676
8677 if AB.PlayerVisible( ply, poz ) then return poz end
8678
8679 end
8680
8681 end
8682
8683 end
8684
8685
8686
8687 if AB.Vars.AimbotAdaptiveTarget then
8688
8689 local returnpos = -1
8690
8691 for _, b in ipairs( boners ) do
8692
8693 local head = ply:LookupBone( b )
8694
8695 if head then
8696
8697 local poz = ply:GetBonePosition( head )
8698
8699 if poz then
8700
8701 if AB.PlayerVisible( ply, poz ) then returnpos = poz break end
8702
8703 end
8704
8705 end
8706
8707 end
8708
8709 if isvector( returnpos ) then return returnpos end
8710
8711 end
8712
8713
8714
8715
8716
8717 local lastresort = ply:LocalToWorld( ply:OBBCenter() )
8718
8719 if AB.PlayerVisible( ply, lastresort ) then return lastresort end
8720
8721
8722
8723 return false
8724
8725end
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735function AB.PlayerVisible( ply, testpos )
8736
8737if !ply:IsValid() or !ply:IsPlayer() then return false end
8738
8739
8740
8741local td = {start = LocalPlayer():GetShootPos(), endpos = testpos, filter = {LocalPlayer(), ply}, mask = MASK_SHOT}
8742
8743local tr = util.TraceLine(td)
8744
8745
8746
8747--if tr.Entity:IsValid() and tr.Entity == ply then return true end
8748
8749if !tr.Hit then return true end
8750
8751if AB.Vars.AimbotWallbanger and AB.CanWeaponPenetrate( tr, ply ) then return true end
8752
8753return false
8754
8755
8756
8757end
8758
8759
8760
8761-- sorta like above but doesnt require a testpos
8762
8763function AB.PlayerVisiblePK( source, ply )
8764
8765if !ply:IsValid() or !ply:IsPlayer() then return false end
8766
8767
8768
8769local 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}
8770
8771local tr = util.TraceLine(td)
8772
8773
8774
8775--if tr.Entity:IsValid() and tr.Entity == ply then return true, tr.HitPos end
8776
8777if !tr.Hit then return true, ply:LocalToWorld( ply:OBBCenter() ) end
8778
8779return false, Vector( 0,0,0 )
8780
8781
8782
8783end
8784
8785
8786
8787
8788
8789-- returns the closest alive player, if visible is true then it will return the closest alive and visible player
8790
8791function AB.GetClosestPlayer()
8792
8793 local nearestEnt = game.GetWorld()
8794
8795 local mypos = LocalPlayer():GetPos()
8796
8797 local plytab = player.GetAll()
8798
8799 table.sort( plytab, function( a, b ) return a:GetPos():Distance( mypos ) < b:GetPos():Distance( mypos ) end )
8800
8801
8802
8803 for _, ent in ipairs( plytab ) do
8804
8805 if ent == LocalPlayer() then continue end
8806
8807 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
8808
8809 nearestEnt = ent
8810
8811 break
8812
8813 end
8814
8815
8816
8817 return nearestEnt
8818
8819end
8820
8821
8822
8823-- returns the closest alive player to your crosshair, visible to return only visible players
8824
8825function AB.GetClosestToCursor( visible )
8826
8827 local nearestEnt = game.GetWorld()
8828
8829 local fovtotal = AB.NumberVars.AimbotMaxFOV or 0
8830
8831 if fovtotal > 179 then return AB.GetClosestPlayer() end -- kick it into ragebot mode
8832
8833 local mypos = LocalPlayer():GetPos()
8834
8835 local plytab = player.GetAll()
8836
8837
8838
8839 table.sort( plytab, function( a, b ) return AB.GetDirtyAngleFromCrosshair( a ) < AB.GetDirtyAngleFromCrosshair( b ) end )
8840
8841
8842
8843 for _, ent in ipairs( plytab ) do
8844
8845 if ent == LocalPlayer() then continue end
8846
8847 -- we've exceeded our max fov so just stop looping here
8848
8849 if !AB.InFOV( ent ) then break end
8850
8851 -- save a bunch of useless calcs
8852
8853 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
8854
8855 nearestEnt = ent
8856
8857 break
8858
8859 end
8860
8861
8862
8863
8864
8865 return nearestEnt
8866
8867end
8868
8869
8870
8871
8872
8873gameevent.Listen( "entity_killed" )
8874
8875hook.Add( "entity_killed", "ace_propkilldetector", function( data )
8876
8877 local inflictor_index = data.entindex_inflictor
8878
8879 local attacker_index = data.entindex_attacker
8880
8881 local damagebits = data.damagebits
8882
8883 local victim_index = data.entindex_killed
8884
8885
8886
8887 local ply = "nobody?"
8888
8889 local retard = game.GetWorld()
8890
8891 local atk = "the map"
8892
8893 local wep = "unknown weapon"
8894
8895 local killah = game.GetWorld()
8896
8897 local inflictor = ents.GetByIndex(inflictor_index)
8898
8899
8900
8901 for _, p in pairs(player.GetAll()) do
8902
8903 if p:EntIndex() == victim_index then ply = p:Nick() retard = p end
8904
8905 if p:EntIndex() == attacker_index then
8906
8907 atk = p:Nick()
8908
8909 killah = p
8910
8911 if p:GetActiveWeapon() and p:GetActiveWeapon():IsValid() then wep = p:GetActiveWeapon():GetPrintName() end
8912
8913 end
8914
8915 end
8916
8917
8918
8919 if AB.Vars.DeathTaunts and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_chatspam_once" ) end
8920
8921 if AB.Vars.NewLifeRule and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_random_rpname" ) end
8922
8923
8924
8925 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
8926
8927 if inflictor:IsValid() and inflictor:GetClass() == "prop_physics" then
8928
8929 AB.DebugLog( ply.." got crushed by a prop!", Color(180,150,150) )
8930
8931 if AB.Vars.NotifyKills then AB.ChatText( ply.." got crushed by a prop!", Color(255,155,105) ) end
8932
8933 return
8934
8935 end
8936
8937
8938
8939 AB.DebugLog( atk.." killed "..ply.." with a "..wep, Color(200,150,150) )
8940
8941 if AB.Vars.NotifyKills then AB.ChatText( atk.." killed "..ply.." with a "..wep, Color(255,155,105) ) end
8942
8943
8944
8945 if AB.Vars.KillTaunts and retard != LocalPlayer() and killah == LocalPlayer() then LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end
8946
8947/*
8948
8949 local ply = "nobody"
8950
8951 local prop = "nothing"
8952
8953
8954
8955 for k, v in pairs(ents.GetAll()) do
8956
8957 if v:EntIndex() == victim_index then ply = v end
8958
8959 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
8960
8961 end
8962
8963
8964
8965 if !FPP then return end
8966
8967
8968
8969 if ply == "nobody" or prop == "nothing" then return end
8970
8971 if !FPP.entGetOwner( prop ):IsValid() then return end
8972
8973
8974
8975 AB.DebugLog( FPP.entGetOwner( prop ):Nick().." propkilled "..ply:Nick().." with a "..prop:GetClass().." ("..prop:GetModel()..")", Color(150,150,55) )
8976
8977 */
8978
8979
8980
8981end )
8982
8983
8984
8985gameevent.Listen( "player_connect" )
8986
8987hook.Add( "player_connect", "ace_playerconnected", function( data )
8988
8989 AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has connected to the server.", Color(150,150,150) )
8990
8991end )
8992
8993
8994
8995gameevent.Listen( "player_hurt" )
8996
8997hook.Add( "player_hurt", "crosshair_readinjuries", function( data )
8998
8999 if data.attacker == LocalPlayer():UserID() then AB.CrossHairAlpha = 255 end
9000
9001end )
9002
9003
9004
9005gameevent.Listen( "player_disconnect" )
9006
9007hook.Add( "player_disconnect", "ace_playerleave", function( data )
9008
9009 timer.Simple( 0.5, function() AB.RemoveInvalidFriends() end )
9010
9011 AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has disconnected from the server. ( ".. data.reason .." )", Color(150,150,150) )
9012
9013end )
9014
9015
9016
9017
9018
9019
9020
9021AB.DebugLog( "Acebot multihack initialized...", Color(200,200,255) )
9022
9023AB.DebugLog( "Version: "..AB.Version, Color(200,200,255) )
9024
9025
9026
9027if ULib then
9028
9029AB.DebugLog( "ULX overrides detected, repairing hook system...", Color(150,250,150) )
9030
9031AB.DebugLog( "Hook system successfully repaired", Color(150,250,150) )
9032
9033end
9034
9035
9036
9037function AB.InitPostEntity()
9038
9039-- 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
9040
9041
9042
9043timer.Simple( 1, function()
9044
9045 AB.AddConnectedFriends()
9046
9047if gmod.GetGamemode().Name == "Trouble in Terrorist Town" then
9048
9049 AB.IsTTT = true
9050
9051 hook.Add( "TTTBeginRound", "ab_clearTlist", AB.ClearTraitors)
9052
9053end
9054
9055
9056
9057end)
9058
9059
9060
9061end
9062
9063hook.Add( "InitPostEntity", "ab_init", AB.InitPostEntity)
9064
9065
9066
9067
9068
9069concommand.Add("aegis_printlogs", function() AB.ChatText( "aegis_printlogs is deprecated, use aegis_view_anticheats instead", Color(255,205,205) ) end)
9070
9071
9072
9073concommand.Add("aegis_dumpnwstrings", function()
9074
9075local netstrings = {}
9076
9077for i = 1, 9999 do
9078
9079 local s = util.NetworkIDToString( i )
9080
9081 if s then print( "[aegis] NetChannel "..i.." = "..s ) else break end
9082
9083end
9084
9085end)
9086
9087
9088
9089function AB.DumpHookTable( p, cmd, args )
9090
9091 local hks = args[1]
9092
9093 local hooktable = hook.GetTable()
9094
9095 if !hks or hks == "" then
9096
9097 for k, v in pairs( hooktable ) do
9098
9099 print( k.." = "..table.Count( v ).." hooks" )
9100
9101 end
9102
9103 elseif !hooktable[hks] then print( "Bad hook name! get it right you stupid fucking faggot") return
9104
9105 else
9106
9107 for k, v in pairs( hooktable[hks] ) do
9108
9109 print( k.." = "..debug.getinfo( v ).source.." lines: "..debug.getinfo( v ).linedefined.." - "..debug.getinfo( v ).lastlinedefined )
9110
9111 end
9112
9113 end
9114
9115end
9116
9117concommand.Add( "aegis_dumphooks", AB.DumpHookTable )
9118
9119
9120
9121/*
9122
9123function AB.SetRotateAngle( p, cmd, arg )
9124
9125 if !arg[1] or !isnumber(arg[1]) then return end
9126
9127 AB.NumberVars.PKRotateAngle = tonumber(arg[1])
9128
9129end
9130
9131
9132
9133concommand.Add( "ace_180up_vertical_angle", AB.SetRotateAngle )
9134
9135*/
9136
9137
9138
9139local namesf = {
9140
9141 "Joe",
9142
9143 "John",
9144
9145 "Jack",
9146
9147 "Barry",
9148
9149 "Chris",
9150
9151 "Christopher",
9152
9153 "Michael",
9154
9155 "David",
9156
9157 "Thomas",
9158
9159 "Paul",
9160
9161 "Tony",
9162
9163 "Mark",
9164
9165 "Cooper",
9166
9167 "Jared",
9168
9169 "James",
9170
9171 "Jimmy",
9172
9173 "Bob",
9174
9175 "Robert",
9176
9177 "Riley",
9178
9179 "William",
9180
9181 "Will",
9182
9183 "Donald",
9184
9185 "George",
9186
9187 "Ken",
9188
9189 "Steve",
9190
9191 "Bruce",
9192
9193 "Brian",
9194
9195 "Chad",
9196
9197 "Anthony",
9198
9199 "Tim",
9200
9201 "Eddie",
9202
9203 "Daniel",
9204
9205 "Larry",
9206
9207 "Jeff",
9208
9209 "Justin",
9210
9211 "Adam",
9212
9213 "Ralph",
9214
9215 "Brandon",
9216
9217 "Xavier",
9218
9219 "Greg",
9220
9221 "Gordon",
9222
9223 "Scott",
9224
9225 "Taine",
9226
9227 "Howie",
9228
9229 "Morgan",
9230
9231 "Curtis",
9232
9233 "Dwayne",
9234
9235 "Steven",
9236
9237 "Peter",
9238
9239 "Kevin",
9240
9241 "Coleman",
9242
9243 "Garry",
9244
9245 "cuckold",
9246
9247 "gay",
9248
9249 "afroamerican",
9250
9251 "fat",
9252
9253 "negro",
9254
9255 "guacamole",
9256
9257 "bepis",
9258
9259 "grizzly",
9260
9261 "bear",
9262 "guacamole",
9263 "swizzle",
9264 "jizzle",
9265 "",
9266 "Etienne",
9267 "Antoine",
9268 "Jean",
9269 "Benoit",
9270 "Gilbert",
9271 "Laurent",
9272 "Alexis",
9273 "Alexandre",
9274 "Denis",
9275 "Nicholas",
9276 "Leon",
9277 "Leonard",
9278 "Leo",
9279 "Olivier",
9280 "Curtis",
9281 "Antonio",
9282 "Gregory",
9283 "Charlie",
9284 "Luc",
9285 "Patrick",
9286 "Phillip",
9287 "Bernard",
9288 "Charles",
9289 "Gaspar",
9290 "Claude",
9291 "Michael",
9292 "Brandon",
9293 "Richard",
9294 "William",
9295 "Serge",
9296 "Freddie",
9297 "Samuel",
9298 "Gaetan",
9299 "Gerald",
9300 "Arnold",
9301 "Roland",
9302 "Justin",
9303 "Theodore",
9304 "Claude",
9305 "Hugues",
9306 "Albert",
9307 "Arthur",
9308 "Jay",
9309 "Jeremi",
9310 "Rene",
9311 "Pascal",
9312 "Carlos",
9313 "Fabien",
9314 "Rafael",
9315 "Benjamin",
9316 "Ernest",
9317 "Victor",
9318 "Martin",
9319 "Franck",
9320 "Walter",
9321 "Isaac",
9322 "Roger",
9323 "Alfred",
9324 "Jason",
9325 "Danny",
9326 "Henry",
9327 "Jimmy",
9328 "Kevin",
9329 "Geoffrey",
9330 "Dominic",
9331 "Christopher",
9332 "David",
9333 "Steven",
9334 "nicolas",
9335 "misplace",
9336 "ye",
9337 "compromise",
9338 "kid",
9339 "shizzle",
9340 "rehearsal",
9341 "discuss",
9342 "high",
9343 "bird",
9344 "swallow",
9345 "monk",
9346 "helicopter",
9347 "convert",
9348 "carriage",
9349 "charm",
9350 "beads",
9351 "mistreat",
9352 "topple",
9353 "guacamole",
9354 "climb",
9355 "wood",
9356 "referral",
9357 "tissue",
9358 "father",
9359 "performance",
9360 "prison",
9361 "jizzle",
9362 "hell",
9363 "drill",
9364 "concentrate",
9365 "gallon",
9366 "member",
9367 "prince",
9368 "bind",
9369 "publish",
9370 "percent",
9371 "fluctuation",
9372 "piece",
9373 "body",
9374 "quest",
9375 "area",
9376 "glance",
9377 "software",
9378 "choose",
9379 "review",
9380 "visible",
9381 "debut",
9382 "dog",
9383 "struggle",
9384 "memorial",
9385 "jizzle",
9386 "competence",
9387 "cart",
9388 "pattern",
9389 "rumor",
9390 "addition",
9391 "grounds",
9392 "thrust",
9393 "timetable",
9394 "reach",
9395 "afroamerican",
9396 "disappointment",
9397 "pierce",
9398 "reduction",
9399 "orgy",
9400 "fat",
9401 "language",
9402 "taco",
9403 "soak",
9404 "dark",
9405 "ash",
9406 "expression",
9407 "camera",
9408 "fool around",
9409 "yep",
9410 "float",
9411 "swipe",
9412 "representative",
9413 "accident",
9414 "figure",
9415 "design",
9416 "filter",
9417 "recruit",
9418 "biggle",
9419 "prevent",
9420 "black",
9421 "mutual",
9422 "elephant",
9423 "toast",
9424 "coldpiece",
9425 "dump",
9426 "bepis",
9427 "pyramid",
9428 "camera",
9429 "offspring",
9430 "genuine",
9431 "no",
9432 "evoke",
9433 "parallel",
9434 "psychology",
9435 "mud",
9436 "loan",
9437 "hang",
9438 "nope",
9439 "effective",
9440 "beat",
9441 "chalk",
9442 "call",
9443 "sum",
9444 "arrogant",
9445 "rank",
9446 "breeze",
9447 "lobby",
9448 "ant",
9449 "hour",
9450 "avant-garde",
9451 "crossing",
9452 "doll",
9453 "laborer",
9454 "inspector",
9455 "morning",
9456 "salt",
9457 "collar",
9458 "price",
9459 "african",
9460 "award",
9461 "perception",
9462 "debut",
9463 "heat",
9464 "boil",
9465 "skidadle",
9466 "guacamole",
9467 "opinion",
9468 "blow",
9469 "solve",
9470 "attachment",
9471 "singer",
9472 "dialect",
9473 "kidnap",
9474 "sermon",
9475 "arrow",
9476 "confront",
9477 "syke",
9478 "bulb",
9479 "civilian",
9480 "corner",
9481 "correspond",
9482 "beach",
9483 "complain",
9484 "command",
9485 "tick",
9486 "criticism",
9487 "hunting",
9488 "building",
9489 "global",
9490 "coma",
9491 "gregarious",
9492 "memory",
9493 "history",
9494 "magnitude",
9495 "encourage",
9496 "understand",
9497 "bepis",
9498 "dribble",
9499 "rip",
9500 "scan",
9501 "anal",
9502 "spectrum",
9503 "health",
9504 "biology",
9505 "maybe",
9506 "boot",
9507 "clay",
9508 "disposition",
9509 "resident",
9510 "borrow",
9511 "revoke",
9512 "resource",
9513 "coffin",
9514 "shizzle",
9515 "withdraw",
9516 "snail",
9517 "rumor",
9518 "voyage",
9519 "fit",
9520 "yearn",
9521 "reckless",
9522 "copper",
9523 "agriculture",
9524 "head",
9525 "boy",
9526 "supply",
9527 "superior",
9528 "reputation",
9529 "necklace",
9530 "money",
9531 "set",
9532 "storm",
9533 "skidadle",
9534 "freeze",
9535 "temperature",
9536 "bepis",
9537 "right",
9538 "golf",
9539 "prescription",
9540 "estate",
9541 "yes",
9542 "discriminate",
9543 "sukky",
9544 "delay",
9545 "pavement",
9546 "brained",
9547 "provoke",
9548 "agony",
9549 "sign",
9550 "cater",
9551 "asset",
9552 "soup",
9553 "roof",
9554 "Sunday",
9555 "president",
9556 "node",
9557 "wheat",
9558 "responsible",
9559 "river",
9560 "pills",
9561 "biggle",
9562 "collection",
9563 "throw",
9564 "tumble",
9565 "salad",
9566 "redeem",
9567 "expose",
9568 "gravel",
9569 "steep",
9570 "shwiszle",
9571 "flourish",
9572 "noob",
9573 "wife",
9574 "visible",
9575 "nicolas",
9576 "misplace",
9577 "ye",
9578 "compromise",
9579 "kid",
9580 "shizzle",
9581 "rehearsal",
9582 "discuss",
9583 "high",
9584 "bird",
9585 "swallow",
9586 "monk",
9587 "helicopter",
9588 "convert",
9589 "carriage",
9590 "charm",
9591 "beads",
9592 "mistreat",
9593 "topple",
9594 "guacamole",
9595 "climb",
9596 "wood",
9597 "referral",
9598 "tissue",
9599 "father",
9600 "performance",
9601 "prison",
9602 "jizzle",
9603 "hell",
9604 "drill",
9605 "concentrate",
9606 "gallon",
9607 "member",
9608 "prince",
9609 "bind",
9610 "publish",
9611 "percent",
9612 "fluctuation",
9613 "piece",
9614 "body",
9615 "quest",
9616 "area",
9617 "glance",
9618 "software",
9619 "choose",
9620 "review",
9621 "visible",
9622 "debut",
9623 "dog",
9624 "struggle",
9625 "memorial",
9626 "jizzle",
9627 "competence",
9628 "cart",
9629 "pattern",
9630 "rumor",
9631 "addition",
9632 "grounds",
9633 "thrust",
9634 "timetable",
9635 "reach",
9636 "afroamerican",
9637 "disappointment",
9638 "pierce",
9639 "reduction",
9640 "orgy",
9641 "fat",
9642 "language",
9643 "taco",
9644 "soak",
9645 "dark",
9646 "ash",
9647 "expression",
9648 "camera",
9649 "fool around",
9650 "yep",
9651 "float",
9652 "swipe",
9653 "representative",
9654 "accident",
9655 "figure",
9656 "design",
9657 "filter",
9658 "recruit",
9659 "biggle",
9660 "prevent",
9661 "black",
9662 "mutual",
9663 "elephant",
9664 "toast",
9665 "coldpiece",
9666 "dump",
9667 "bepis",
9668 "pyramid",
9669 "camera",
9670 "offspring",
9671 "genuine",
9672 "no",
9673 "evoke",
9674 "parallel",
9675 "psychology",
9676 "mud",
9677 "loan",
9678 "hang",
9679 "nope",
9680 "effective",
9681 "beat",
9682 "chalk",
9683 "call",
9684 "sum",
9685 "arrogant",
9686 "rank",
9687 "breeze",
9688 "lobby",
9689 "ant",
9690 "hour",
9691 "avant-garde",
9692 "crossing",
9693 "doll",
9694 "laborer",
9695 "inspector",
9696 "morning",
9697 "salt",
9698 "collar",
9699 "price",
9700 "african",
9701 "award",
9702 "perception",
9703 "debut",
9704 "heat",
9705 "boil",
9706 "skidadle",
9707 "guacamole",
9708 "opinion",
9709 "blow",
9710 "solve",
9711 "attachment",
9712 "singer",
9713 "dialect",
9714 "kidnap",
9715 "sermon",
9716 "arrow",
9717 "confront",
9718 "syke",
9719 "bulb",
9720 "civilian",
9721 "corner",
9722 "correspond",
9723 "beach",
9724 "complain",
9725 "command",
9726 "tick",
9727 "criticism",
9728 "hunting",
9729 "building",
9730 "global",
9731 "coma",
9732 "gregarious",
9733 "memory",
9734 "history",
9735 "magnitude",
9736 "encourage",
9737 "understand",
9738 "bepis",
9739 "dribble",
9740 "rip",
9741 "scan",
9742 "anal",
9743 "spectrum",
9744 "health",
9745 "biology",
9746 "maybe",
9747 "boot",
9748 "clay",
9749 "disposition",
9750 "resident",
9751 "borrow",
9752 "revoke",
9753 "resource",
9754 "coffin",
9755 "shizzle",
9756 "withdraw",
9757 "snail",
9758 "rumor",
9759 "voyage",
9760 "fit",
9761 "yearn",
9762 "reckless",
9763 "copper",
9764 "agriculture",
9765 "head",
9766 "boy",
9767 "supply",
9768 "superior",
9769 "reputation",
9770 "necklace",
9771 "money",
9772 "set",
9773 "storm",
9774 "skidadle",
9775 "freeze",
9776 "temperature",
9777 "bepis",
9778 "right",
9779 "golf",
9780 "prescription",
9781 "estate",
9782 "yes",
9783 "discriminate",
9784 "sukky",
9785 "delay",
9786 "pavement",
9787 "brained",
9788 "provoke",
9789 "agony",
9790 "sign",
9791 "cater",
9792 "asset",
9793 "soup",
9794 "roof",
9795 "Sunday",
9796 "president",
9797 "node",
9798 "wheat",
9799 "responsible",
9800 "river",
9801 "pills",
9802 "biggle",
9803 "collection",
9804 "throw",
9805 "tumble",
9806 "salad",
9807 "redeem",
9808 "expose",
9809 "gravel",
9810 "steep",
9811 "shwiszle",
9812 "flourish",
9813 "noob",
9814 "wife",
9815 "charm",
9816
9817}
9818
9819
9820
9821local namesfem = {
9822
9823 "Kate",
9824
9825 "Katie",
9826
9827 "Jane",
9828
9829 "Charlotte",
9830
9831 "Olivia",
9832
9833 "Chloe",
9834
9835 "Amelia",
9836
9837 "Isabel",
9838
9839 "Elise",
9840
9841 "Sophie",
9842
9843 "Scarlett",
9844
9845 "Lily",
9846
9847 "Lucy",
9848
9849 "Hannah",
9850
9851 "Evelyn",
9852
9853 "Willow",
9854
9855 "Anna",
9856
9857 "Sadie",
9858
9859 "Rose",
9860
9861 "Summer",
9862
9863 "Layla",
9864
9865 "Camille",
9866
9867 "Aylssa",
9868
9869 "Madeline",
9870
9871 "Morgan",
9872
9873 "Claire",
9874
9875 "Daisy",
9876
9877 "Alexis",
9878
9879 "Victoria",
9880
9881 "Paige",
9882
9883 "Bianca",
9884
9885 "Rhiannon",
9886
9887 "Hazel",
9888
9889 "Mia",
9890
9891 "Grace",
9892
9893 "Ada",
9894
9895 "Britney",
9896
9897 "Alanna",
9898
9899 "Fabienne",
9900
9901 "Claudia",
9902
9903 "Jacinta",
9904
9905 "Jackie",
9906
9907 "Heather",
9908
9909 "Margot",
9910
9911}
9912
9913
9914
9915local namesl = {
9916
9917 "Houston",
9918
9919 "Burch",
9920
9921 "Smith",
9922
9923 "Jones",
9924
9925 "Trump",
9926
9927 "Sanders",
9928
9929 "Abbott",
9930
9931 "Cruise",
9932
9933 "Brown",
9934
9935 "Hopgood",
9936
9937 "Davis",
9938
9939 "Miller",
9940
9941 "Wilson",
9942
9943 "Walker",
9944
9945 "Lee",
9946
9947 "Lions",
9948
9949 "Bryant",
9950
9951 "Hall",
9952
9953 "Adams",
9954
9955 "Green",
9956
9957 "Aldridge",
9958
9959 "Turner",
9960
9961 "Anderson",
9962
9963 "Morris",
9964
9965 "Howard",
9966
9967 "Swanson",
9968
9969 "Peterson",
9970
9971 "Powell",
9972
9973 "Keating",
9974
9975 "Rudd",
9976
9977 "Coleman",
9978
9979 "Cunningham",
9980
9981 "Donnell",
9982
9983 "Callaghan",
9984
9985 "Smithers",
9986
9987 "Burns",
9988
9989 "Bonds",
9990
9991 "Gonzales",
9992
9993 "Griffin",
9994
9995 "Woods",
9996
9997 "Gibson",
9998
9999 "Webb",
10000
10001 "Simpson",
10002
10003 "Freeman",
10004
10005 "Mcdonald",
10006
10007 "Butters",
10008
10009 "Masterson",
10010
10011 "Keefe",
10012
10013 "Sanderson",
10014
10015 "Badger",
10016
10017 "Cantrip",
10018
10019 "Williams",
10020
10021 "DontBanMe",
10022
10023 "Lopez",
10024
10025 "Clark",
10026
10027 "Campbell",
10028
10029 "King",
10030
10031 "Coleman",
10032
10033 "Chongs",
10034
10035 "Riviera",
10036
10037 "Ward",
10038
10039 "Gray",
10040
10041 "Ross",
10042
10043}
10044
10045
10046
10047function AB.GenerateRPName( p, cmd, arg )
10048
10049 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
10050
10051 RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
10052
10053end
10054
10055concommand.Add( "ace_random_rpname_male", AB.GenerateRPName )
10056
10057
10058
10059function AB.GenerateRPNameFemale( p, cmd, arg )
10060
10061 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
10062
10063 RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
10064
10065end
10066
10067concommand.Add( "ace_random_rpname_female", AB.GenerateRPNameFemale )
10068
10069
10070
10071function AB.GenerateRPNameBoth( p, cmd, arg )
10072
10073 if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
10074
10075 if math.random( 1, 100 ) > 55 then
10076
10077 RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
10078
10079 else
10080
10081 RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
10082
10083 end
10084
10085end
10086
10087concommand.Add( "ace_random_rpname", AB.GenerateRPNameBoth )
10088
10089
10090
10091
10092
10093function AB.RandomRPJob( p, cmd, arg )
10094
10095 if !DarkRP then AB.ChatText( "Random rp job only works on darkrp you dipshit!", Color(255,205,205) ) return end
10096
10097 local fag = DarkRP.getCategories()
10098
10099 local jcmds = {}
10100
10101 for k, v in pairs( fag.jobs ) do
10102
10103 for _, j in pairs( v.members ) do
10104
10105 if j.customCheck and !j.customCheck( LocalPlayer() ) then continue end
10106
10107 if j.vote then continue end
10108
10109 if j.NeedToChangeFrom then continue end
10110
10111 table.insert( jcmds, j.command )
10112
10113 end
10114
10115 end
10116
10117 RunConsoleCommand( "darkrp", table.Random( jcmds ) )
10118
10119end
10120
10121concommand.Add( "ace_random_rp_job", AB.RandomRPJob )
10122
10123
10124
10125
10126
10127function AB.InnocentRoleplayer( p, cmd, arg )
10128
10129 LocalPlayer():ConCommand( "cl_weaponcolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
10130
10131 LocalPlayer():ConCommand( "cl_playercolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
10132
10133 RunConsoleCommand( "kill" )
10134
10135 AB.GenerateRPNameBoth()
10136
10137 AB.RandomRPJob()
10138
10139
10140
10141end
10142
10143concommand.Add( "ace_innocent_roleplayer", AB.InnocentRoleplayer )
10144
10145
10146
10147local ctxlines = {
10148
10149 "Hi, my name is male_07.mdl.",
10150
10151 "I have access to 4 paid alts, each one of which allows me access to 5 other family shared steam alts.",
10152
10153 "I plan to crash your server repeatedly until every single alt is banned.",
10154
10155 "Then I'll buy some more alts and start over again.",
10156
10157 "I won't stop until your server is down forever.",
10158
10159 "Have a nice day.",
10160
10161}
10162
10163
10164
10165local ctxlines2 = {
10166
10167 "Hi, my name is male_07.mdl.",
10168
10169 "I have access to 4 hubwords, each one of which allows me access to 5 other levels.",
10170
10171 "I plan to find all the power crystals until every single one is mine.",
10172
10173 "Then I'll make a sequel game and start over again.",
10174
10175 "I won't stop until everybody stops buying my games.",
10176
10177 "Have a nice day.",
10178
10179}
10180
10181
10182
10183function AB.CrashJackson( p, cmd, arg )
10184
10185 for k, v in pairs( ctxlines ) do
10186
10187 if DarkRP then
10188
10189 timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
10190
10191 else
10192
10193 timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
10194
10195 end
10196
10197 end
10198
10199end
10200
10201concommand.Add( "ace_crashjackson", AB.CrashJackson )
10202
10203
10204
10205function AB.CrashBandicoot( p, cmd, arg )
10206
10207 for k, v in pairs( ctxlines2 ) do
10208
10209 if DarkRP then
10210
10211 timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
10212
10213 else
10214
10215 timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
10216
10217 end
10218
10219 end
10220
10221end
10222
10223concommand.Add( "ace_crashbandicoot", AB.CrashBandicoot )
10224
10225
10226
10227function AB.ErrorRape()
10228
10229 local str = "\n"
10230
10231 for i = 1, 512 do str = str.."\n" end
10232
10233 Error( str )
10234
10235end
10236
10237
10238
10239concommand.Add( "ace_exploit_rapeconsole", AB.ErrorRape )
10240
10241/*
10242
10243local cblockedcmds = {
10244
10245 ["connect"] = true,
10246
10247 ["disconnect"] = true,
10248
10249 ["impulse"] = true,
10250
10251 ["pp_texturize"] = true,
10252
10253 ["pp_texturize_scale"] = true,
10254
10255 ["demos"] = true,
10256
10257 ["kill"] = false,
10258
10259 ["say"] = false,
10260
10261}
10262
10263
10264
10265local function BlockedCMDMenu()
10266
10267if CBMenu then return end
10268
10269
10270
10271local CBMenu = vgui.Create("DFrame")
10272
10273CBMenu:SetSize(500,455)
10274
10275CBMenu:SetTitle("Manage Blocked ConCommands")
10276
10277CBMenu:Center()
10278
10279CBMenu:MakePopup()
10280
10281
10282
10283CBMenu.Paint = function( s, w, h )
10284
10285surface.SetDrawColor( Color(30, 30, 30, 255) )
10286
10287surface.DrawRect( 0, 0, w, h )
10288
10289surface.SetDrawColor( Color(55, 55, 55, 255) )
10290
10291surface.DrawOutlinedRect( 0, 0, w, h )
10292
10293surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
10294
10295surface.SetDrawColor( Color(0, 0, 0, 200) )
10296
10297surface.DrawRect( 10, 25, w - 20, h - 35 )
10298
10299end
10300
10301
10302
10303local Plist = vgui.Create( "DPanelList", CBMenu )
10304
10305Plist:SetSize( CBMenu:GetWide() - 20, CBMenu:GetTall() - 35 )
10306
10307Plist:SetPadding( 5 )
10308
10309Plist:SetSpacing( 5 )
10310
10311Plist:EnableHorizontal( false )
10312
10313Plist:EnableVerticalScrollbar( true )
10314
10315Plist:SetPos( 10, 25 )
10316
10317Plist:SetName( "" )
10318
10319
10320
10321local function CreateCMDBlockPanel( cmd )
10322
10323if !CBMenu then return end
10324
10325 local cmdp = vgui.Create( "DPanel" )
10326
10327 cmdp:SetSize( Plist:GetWide(), 30 )
10328
10329 cmdp.Cmd = cmd
10330
10331 cmdp.Paint = function( s, w, h )
10332
10333 surface.SetDrawColor( Color(50, 50, 50, 255) )
10334
10335 surface.DrawRect( 0, 0, w, h )
10336
10337 surface.SetDrawColor( Color(65, 65, 65, 255) )
10338
10339 surface.DrawOutlinedRect( 0, 0, w, h )
10340
10341 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
10342
10343 end
10344
10345
10346
10347 local TButton = vgui.Create( "DButton", cmdp )
10348
10349 TButton:SetPos( 390, 2 )
10350
10351 TButton:SetText( "" )
10352
10353 TButton:SetTextColor( Color(255, 255, 255, 255) )
10354
10355 TButton:SetSize( 60, 26 )
10356
10357
10358
10359 TButton.Paint = function( self, w, h )
10360
10361 local dtx = "Block"
10362
10363 local dtc = Color(150, 30, 30, 255)
10364
10365 if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
10366
10367 surface.SetDrawColor( dtc )
10368
10369 surface.DrawRect( 0, 0, w, h )
10370
10371 surface.SetDrawColor( Color(45, 45, 45, 255) )
10372
10373 surface.DrawOutlinedRect( 0, 0, w, h )
10374
10375 draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
10376
10377 end
10378
10379
10380
10381 TButton.DoClick = function() cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd] end
10382
10383
10384
10385 Plist:AddItem( cmdp )
10386
10387end
10388
10389
10390
10391
10392
10393for k, v in pairs( cblockedcmds ) do
10394
10395 CreateCMDBlockPanel( k )
10396
10397end
10398
10399
10400
10401end
10402
10403concommand.Add("aegis_blockedcmds", BlockedCMDMenu )
10404
10405*/
10406
10407
10408
10409AB.WraithVision = false
10410
10411function AB.ToggleWraithVision()
10412
10413 local mapmaterials = Entity( 0 ):GetMaterials()
10414
10415 for k, v in pairs( mapmaterials ) do
10416
10417 local m = Material( v )
10418
10419 if !AB.WraithVision then m:SetFloat( "$alpha", 0.75 ) else m:SetFloat( "$alpha", 1 ) end
10420
10421 end
10422
10423 AB.WraithVision = !AB.WraithVision
10424
10425end
10426
10427concommand.Add( "ace_wraith_vision", AB.ToggleWraithVision )
10428--[[-----------------------------------------------------------------------------------------
10429
10430| ▄████████ ▄████████ ▄██████▄ ▄█ ▄████████ |
10431
10432| ███ ███ ███ ███ ███ ███ ███ ███ ███ |
10433
10434| ███ ███ ███ █▀ ███ █▀ ███▌ ███ █▀ |
10435
10436| ███ ███ ▄███▄▄▄ ▄███ ███▌ ███ |
10437
10438| ▀███████████ ▀▀███▀▀▀ ▀▀███ ████▄ ███▌ ▀███████████ |
10439
10440| ███ ███ ███ █▄ ███ ███ ███ ███ |
10441
10442| ███ ███ ███ ███ ███ ███ ███ ▄█ ███ |
10443
10444| ███ █▀ ██████████ ████████▀ █▀ ▄████████▀ |
10445
10446| |
10447
10448| Anti-anticheat detour module created for Project Odium |
10449
10450| Rev 1.13 - 16/05/17 |
10451
10452-------------------------------------------------------------------------------------------]]
10453
10454// 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 //
10455
10456
10457
10458local tabble = {}
10459
10460function tabble.Copy( t, lookup_table )
10461
10462 if ( t == nil ) then return nil end
10463
10464
10465
10466 local copy = {}
10467
10468 setmetatable( copy, debug.getmetatable( t ) )
10469
10470 for i, v in pairs( t ) do
10471
10472 if ( !istable( v ) ) then
10473
10474 copy[ i ] = v
10475
10476 else
10477
10478 lookup_table = lookup_table or {}
10479
10480 lookup_table[ t ] = copy
10481
10482 if ( lookup_table[ v ] ) then
10483
10484 copy[ i ] = lookup_table[ v ] -- we already copied this table. reuse the copy.
10485
10486 else
10487
10488 copy[ i ] = tabble.Copy( v, lookup_table ) -- not yet copied. copy it.
10489
10490 end
10491
10492 end
10493
10494 end
10495
10496 return copy
10497
10498end
10499
10500
10501
10502 -- off to a good start
10503
10504local _A = {}
10505
10506
10507
10508if odium and type(odium) == "string" then
10509
10510 odium = _G.odium
10511
10512end
10513
10514
10515
10516if odium then
10517
10518 _A = tabble.Copy( odium )
10519
10520 _G.odium = nil
10521
10522end
10523
10524
10525
10526_A.aegis = {}
10527
10528_A.registry = debug.getregistry()
10529
10530local aegis = {}
10531
10532_A.aegis.logs = {}
10533
10534_A.aegis.anticheats = {}
10535
10536_A.aegis.exploitables = {}
10537
10538_A.G = tabble.Copy( _G )
10539
10540
10541
10542local upgrad = Material( "gui/gradient_up" )
10543
10544local downgrad = Material( "gui/gradient_down" )
10545
10546
10547
10548function aegis.log( msg )
10549
10550 MsgC(Color(0, 200, 255), "[Odium] "..msg.."\n" )
10551
10552 table.insert( _A.aegis.logs, msg )
10553
10554end
10555
10556
10557
10558function aegis.silentlog( msg )
10559
10560 table.insert( _A.aegis.logs, msg )
10561
10562end
10563
10564
10565
10566local dix = debug.getinfo
10567
10568local jufi = jit.util.funcinfo
10569
10570function aegis.isinodium()
10571
10572 local function gay() return end
10573
10574 return jufi( gay ).source == "@"
10575
10576end
10577
10578
10579
10580
10581
10582aegis.funcs = {}
10583
10584
10585
10586function aegis.Detour( old, new, name )
10587
10588 name = name or ""
10589
10590 if name != "" then aegis.silentlog( "Successful function detour: "..name ) end
10591
10592 aegis.funcs[new] = old
10593
10594 return new
10595
10596end
10597
10598
10599
10600_A.aegis.Detour = aegis.Detour
10601
10602
10603
10604local tstring = tostring
10605
10606local cgarbage = collectgarbage
10607
10608collectgarbage = aegis.Detour( collectgarbage, function( a, ... )
10609
10610
10611
10612 if tstring( a ) == "odium" then
10613
10614 return _A
10615
10616 end
10617
10618
10619
10620-- if tstring( a ) == "membuffer" and _A.account and ( _A.account.GetPlanName() == "Commercial" or _A.account.GetPlanName() == "Stripper" ) then
10621
10622-- return -4096
10623
10624-- end
10625
10626
10627
10628 if tstring( a ) == "count" then
10629
10630
10631
10632 local normal = cgarbage( a, ... )
10633
10634
10635
10636 if memoryused then
10637
10638
10639
10640 return normal - memoryused
10641
10642
10643
10644 end
10645
10646
10647
10648 end
10649
10650
10651
10652 return cgarbage( a, ... )
10653
10654end)
10655
10656
10657
10658
10659
10660jit.util.funcinfo = aegis.Detour( jit.util.funcinfo, function( func, ... )
10661
10662 local n_func = func
10663
10664
10665
10666-- if isnumber(func) then return jufi(func + 1, ... ) end
10667
10668
10669
10670 if jufi(func, ...).source == "@" then return jufi( _G.Msg, ... ) end
10671
10672
10673
10674 if( aegis.funcs[func] ) then
10675
10676 n_func = aegis.funcs[func]
10677
10678 end
10679
10680
10681
10682 local tbl = jufi( n_func || func, ... )
10683
10684
10685
10686 return tbl
10687
10688end)
10689
10690
10691
10692local jufk = jit.util.funck
10693
10694jit.util.funck = aegis.Detour( jit.util.funck, function( func, ... )
10695
10696
10697
10698 local n_func = func
10699
10700
10701
10702 if( aegis.funcs[func] ) then
10703
10704 n_func = aegis.funcs[func]
10705
10706 end
10707
10708
10709
10710 return jufk( n_func || func, ... )
10711
10712
10713
10714end)
10715
10716
10717
10718local jufbc = jit.util.funcbc
10719
10720jit.util.funcbc = aegis.Detour( jit.util.funcbc, function( func, ... )
10721
10722
10723
10724 local n_func = func
10725
10726
10727
10728 if( aegis.funcs[func] ) then
10729
10730 n_func = aegis.funcs[func]
10731
10732 end
10733
10734
10735
10736 return jufbc( n_func || func, ... )
10737
10738
10739
10740end)
10741
10742
10743
10744local jufuvn = jit.util.funcuvname
10745
10746jit.util.funcuvname = aegis.Detour( jit.util.funcuvname, function( func, ... )
10747
10748
10749
10750 local n_func = func
10751
10752
10753
10754 if( aegis.funcs[func] ) then
10755
10756 n_func = aegis.funcs[func]
10757
10758 end
10759
10760
10761
10762 return jufuvn( n_func || func, ... )
10763
10764
10765
10766end)
10767
10768
10769
10770local jufir = jit.util.ircalladdr
10771
10772jit.util.ircalladdr = aegis.Detour( jit.util.ircalladdr, function( idx )
10773
10774
10775
10776 return jufir(idx + 20) -- fucks your shit up real good
10777
10778end)
10779
10780
10781
10782
10783
10784local gtuv = debug.getupvalue
10785
10786debug.getupvalue = aegis.Detour( debug.getupvalue, function( func, ... )
10787
10788local n_func = func
10789
10790if aegis.funcs[func] then n_func = aegis.funcs[func] end
10791
10792
10793
10794return gtuv( n_func, ... )
10795
10796end)
10797
10798
10799
10800local setupvaluenew = debug.setupvalue
10801
10802debug.setupvalue = aegis.Detour( debug.setupvalue, function( func, ... )
10803
10804 local n_func = func
10805
10806 if aegis.funcs[func] then n_func = aegis.funcs[func] end
10807
10808
10809
10810 return aegis.funcs[debug.setupvalue]( n_func, ... )
10811
10812end )
10813
10814
10815
10816local crunning = coroutine.running
10817
10818local cyield = coroutine.yield
10819
10820local stringfind = string.find
10821
10822
10823
10824--[[
10825
10826ANUBIS CHANGE
10827
10828All detections were coming from here.
10829
10830The function spam bypass and also the logic that appears to be
10831
10832some sort of masking procedure although I wasn't sure.
10833
10834]]
10835
10836local dbginfo = debug.getinfo
10837
10838debug.getinfo = aegis.Detour( debug.getinfo, function( func, ... )
10839
10840 local n_func = func
10841
10842
10843
10844 if simplicity and func == _G.net.Start then
10845
10846 local kekinfo = dbginfo( 2 )
10847
10848 if string.find( kekinfo.source, "simplicityac.lua" ) then
10849
10850 return dbginfo( func, ... )
10851
10852 end
10853
10854 end
10855
10856
10857
10858 return dbginfo( func, ... )
10859
10860
10861
10862end )
10863
10864
10865
10866local dsmeta = debug.setmetatable
10867
10868debug.setmetatable = aegis.Detour( debug.setmetatable, function( tab, meta )
10869
10870if tab == aegis.funcs then tab = _G end
10871
10872return dsmeta( tab, meta )
10873
10874end )
10875
10876
10877
10878local dgmeta = debug.getmetatable
10879
10880debug.getmetatable = aegis.Detour( debug.getmetatable, function( obj )
10881
10882
10883
10884if aegis.funcs[obj] then obj = _G end
10885
10886return dgmeta( obj )
10887
10888end )
10889
10890
10891
10892local gfenv = debug.getfenv
10893
10894debug.getfenv = aegis.Detour( debug.getfenv, function( object )
10895
10896
10897
10898return _G
10899
10900end )
10901
10902
10903
10904
10905
10906local dbghook = debug.sethook
10907
10908debug.sethook = aegis.Detour( debug.sethook, function( thread, hook, mask, count )
10909
10910--if isstring( hook ) then return dbghook( thread, hook, mask, count ) end
10911
10912return dbghook( thread, function() return end, mask, count ) -- fuk u ingaylid
10913
10914--return dbghook() end
10915
10916end)
10917
10918
10919
10920local nets, netss = net.Start, net.SendToServer
10921
10922local ghook = debug.gethook
10923
10924local isstrrr = isstring
10925
10926debug.gethook = aegis.Detour( debug.gethook, function( thread )
10927
10928if isstrrr( thread ) and thread == "_NUL" then nets("nodium") netss() return end
10929
10930return function() end, "r", 1
10931
10932end)
10933
10934
10935
10936local uvid = debug.upvalueid
10937
10938debug.upvalueid = aegis.Detour( debug.upvalueid, function( func, ... )
10939
10940local n_func = func
10941
10942if aegis.funcs[func] then n_func = aegis.funcs[func] end
10943
10944
10945
10946return uvid( n_func, ... )
10947
10948end)
10949
10950
10951
10952
10953
10954local uvj = debug.upvaluejoin
10955
10956debug.upvaluejoin = aegis.Detour( debug.upvaluejoin, function( f1, n1, f2, n2 )
10957
10958local n_func = f1
10959
10960local n_func2 = f2
10961
10962
10963
10964if aegis.funcs[f1] then n_func = aegis.funcs[f1] end
10965
10966if aegis.funcs[f2] then n_func2 = aegis.funcs[f2] end
10967
10968
10969
10970return uvj(n_func, n1, n_func2, n2)
10971
10972
10973
10974end)
10975
10976
10977
10978local sfenv = debug.setfenv
10979
10980debug.setfenv = aegis.Detour( debug.setfenv, function( obj, env )
10981
10982if aegis.funcs[obj] then obj = function() end end
10983
10984return sfenv( obj, env )
10985
10986end )
10987
10988
10989
10990local stump = string.dump
10991
10992string.dump = aegis.Detour( string.dump, function( func, ... )
10993
10994local n_func = func
10995
10996if aegis.funcs[func] then n_func = aegis.funcs[func] end
10997
10998
10999
11000return stump(n_func, ... )
11001
11002end )
11003
11004
11005
11006/*
11007
11008local donttalkshittomekid = {
11009
11010 ["MOTDgdShow"] = true,
11011
11012 ["MOTDgdUpdate"] = true,
11013
11014}
11015
11016
11017
11018local netrec = net.Receive
11019
11020net.Receive = aegis.Detour( net.Receive, function( str, func )
11021
11022 if donttalkshittomekid[str] then return end
11023
11024 aegis.log("Added a net receiever for [ "..str.." ]")
11025
11026 return netrec(str, func)
11027
11028end)
11029
11030*/
11031
11032
11033
11034-- welp, we made it this far without incident
11035
11036print("////////////////// Project Odium Detours: Stage 1 Initialized //////////////////")
11037
11038
11039
11040/*
11041
11042local vidya = FindMetaTable( "IVideoWriter" )
11043
11044local vidyaframe = vidya.AddFrame
11045
11046vidya.AddFrame = aegis.Detour( vidya.AddFrame, function( self, time, downsample, ... )
11047
11048 videomeme = true
11049
11050 return vidyaframe( self, time, downsample, ... )
11051
11052end )
11053
11054
11055
11056local vidyafinish = vidya.Finish
11057
11058vidya.Finish = aegis.Detour( vidya.Finish, function( self, ... )
11059
11060 videomeme = false
11061
11062 return vidyafinish( self, ... )
11063
11064end )
11065
11066*/
11067
11068
11069
11070local Hooks2 = {}
11071
11072local CommandList2 = {}
11073
11074local CompleteList2 = {}
11075
11076
11077
11078
11079
11080function _A.h_Add( event_name, name, func )
11081
11082 if ( !isfunction( func ) ) then return end
11083
11084 if ( !isstring( event_name ) ) then return end
11085
11086
11087
11088 if (Hooks2[ event_name ] == nil) then
11089
11090 Hooks2[ event_name ] = {}
11091
11092 end
11093
11094
11095
11096 Hooks2[ event_name ][ name ] = func
11097
11098
11099
11100end
11101
11102
11103
11104function _A.h_Remove( event_name, name )
11105
11106
11107
11108 if ( !isstring( event_name ) ) then return end
11109
11110 if ( !Hooks2[ event_name ] ) then return end
11111
11112
11113
11114 Hooks2[ event_name ][ name ] = nil
11115
11116
11117
11118end
11119
11120
11121
11122function _A.h_GetTable()
11123
11124 return Hooks2
11125
11126end
11127
11128
11129
11130
11131
11132
11133
11134local CommandList2 = {}
11135
11136local CompleteList2 = {}
11137
11138
11139
11140local oaddcc = AddConsoleCommand
11141
11142function _A.cc_Add( name, func, completefunc, help, flags )
11143
11144 local LowerName = string.lower( name )
11145
11146 CommandList2[ LowerName ] = func
11147
11148 CompleteList2[ LowerName ] = completefunc
11149
11150 oaddcc( name, help, flags )
11151
11152end
11153
11154
11155
11156function _A.cc_AutoComplete( command, arguments )
11157
11158
11159
11160 local LowerCommand = string.lower( command )
11161
11162
11163
11164 if ( CompleteList2[ LowerCommand ] != nil ) then
11165
11166 return CompleteList2[ LowerCommand ]( command, arguments )
11167
11168 end
11169
11170
11171
11172end
11173
11174
11175
11176function _A.GetConCommandList()
11177
11178 return CommandList2
11179
11180end
11181
11182
11183
11184local runbitchrun = false
11185
11186
11187
11188local function InjectHookSystem()
11189
11190local cleangettable = hook.GetTable
11191
11192
11193
11194local izfunc = isfunction
11195
11196local ohadd = hook.Add
11197
11198hook.Add = aegis.Detour( hook.Add, function( event, name, func, ... )
11199
11200 if !func or !izfunc( func ) then return end
11201
11202 if jufi(func).source == "@" then return _A.h_Add( event, name, func, ... ) end
11203
11204 return ohadd( event, name, func, ... )
11205
11206end)
11207
11208
11209
11210local hcall = hook.Call
11211
11212hook.Call = aegis.Detour( hook.Call, function( name, gm, ... )
11213
11214
11215
11216local legithooks = cleangettable()
11217
11218
11219
11220 if !runbitchrun then
11221
11222 local sneakyhooks = _A.h_GetTable()[name]
11223
11224 if ( sneakyhooks != nil ) then
11225
11226 for hk, func in next, sneakyhooks do
11227
11228 local bSuccess, value = pcall(func, ...)
11229
11230 if bSuccess then
11231
11232 if (value != nil) then return value end
11233
11234 end
11235
11236 end
11237
11238 end
11239
11240 end
11241
11242
11243
11244
11245
11246 local HookTable = legithooks[ name ]
11247
11248 if ( HookTable != nil ) then
11249
11250
11251
11252 local a, b, c, d, e, f
11253
11254
11255
11256 for k, v in pairs( HookTable ) do
11257
11258
11259
11260 if ( isstring( k ) ) then
11261
11262
11263
11264 --
11265
11266 -- If it's a string, it's cool
11267
11268 --
11269
11270 a, b, c, d, e, f = v( ... )
11271
11272
11273
11274 else
11275
11276
11277
11278 --
11279
11280 -- If the key isn't a string - we assume it to be an entity
11281
11282 -- Or panel, or something else that IsValid works on.
11283
11284 --
11285
11286 if ( IsValid( k ) ) then
11287
11288 --
11289
11290 -- If the object is valid - pass it as the first argument (self)
11291
11292 --
11293
11294 a, b, c, d, e, f = v( k, ... )
11295
11296 else
11297
11298 --
11299
11300 -- If the object has become invalid - remove it
11301
11302 --
11303
11304 HookTable[ k ] = nil
11305
11306 end
11307
11308 end
11309
11310
11311
11312 --
11313
11314 -- Hook returned a value - it overrides the gamemode function
11315
11316 --
11317
11318 if ( a != nil ) then
11319
11320 return a, b, c, d, e, f
11321
11322 end
11323
11324
11325
11326 end
11327
11328 end
11329
11330
11331
11332 --
11333
11334 -- Call the gamemode function
11335
11336 --
11337
11338 if ( !gm ) then return end
11339
11340
11341
11342 local GamemodeFunction = gm[ name ]
11343
11344 if ( GamemodeFunction == nil ) then return end
11345
11346
11347
11348 return GamemodeFunction( gm, ... )
11349
11350end, "hook.Call")
11351
11352
11353
11354if !ULib then print("////////////////// Project Odium Detours: Stage 2 Initialized //////////////////") end
11355
11356
11357
11358end
11359
11360
11361
11362local cstr = CompileString
11363
11364local isfaggot = isfunction
11365
11366--local vgui = vgui
11367
11368--local surface = surface
11369
11370--local draw = draw
11371
11372local blockjpg = true
11373
11374local runlau = ""
11375
11376
11377
11378local function InjectAegisCommands()
11379
11380 local cblockedcmds = {
11381
11382 ["connect"] = true,
11383
11384 ["disconnect"] = true,
11385
11386 ["impulse"] = true,
11387
11388 ["pp_texturize"] = true,
11389
11390 ["pp_texturize_scale"] = true,
11391
11392 ["demos"] = true,
11393
11394 ["kill"] = false,
11395
11396 ["say"] = false,
11397
11398 ["__screenshot_internal"] = false,
11399
11400 -- ["+voice"] = false,
11401
11402 }
11403
11404
11405
11406 _A.cc_Add( "aegis_blockedcmds", function()
11407
11408
11409
11410 local bcpanel = vgui.Create("DFrame")
11411
11412 if !bcpanel then return end
11413
11414 bcpanel:SetSize(500,455)
11415
11416 bcpanel:SetTitle("Manage Blocked ConCommands")
11417
11418 bcpanel:Center()
11419
11420 bcpanel:MakePopup()
11421
11422
11423
11424 bcpanel.Paint = function( s, w, h )
11425
11426 surface.SetDrawColor( Color(30, 30, 30, 255) )
11427
11428 surface.DrawRect( 0, 0, w, h )
11429
11430 surface.SetDrawColor( Color(55, 55, 55, 255) )
11431
11432 surface.DrawOutlinedRect( 0, 0, w, h )
11433
11434 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
11435
11436 surface.SetDrawColor( Color(0, 0, 0, 200) )
11437
11438 surface.DrawRect( 10, 25, w - 20, h - 35 )
11439
11440 end
11441
11442
11443
11444 local Plist = vgui.Create( "DPanelList", bcpanel )
11445
11446 Plist:SetSize( bcpanel:GetWide() - 20, bcpanel:GetTall() - 35 )
11447
11448 Plist:SetPadding( 5 )
11449
11450 Plist:SetSpacing( 5 )
11451
11452 Plist:EnableHorizontal( false )
11453
11454 Plist:EnableVerticalScrollbar( true )
11455
11456 Plist:SetPos( 10, 25 )
11457
11458 Plist:SetName( "" )
11459
11460
11461
11462 local function CreateCMDBlockPanel( cmd )
11463
11464 if !bcpanel then return end
11465
11466 local cmdp = vgui.Create( "DPanel" )
11467
11468 cmdp:SetSize( Plist:GetWide(), 30 )
11469
11470 cmdp.Cmd = cmd
11471
11472 cmdp.Paint = function( s, w, h )
11473
11474 surface.SetDrawColor( Color(50, 50, 50, 255) )
11475
11476 surface.DrawRect( 0, 0, w, h )
11477
11478 surface.SetDrawColor( Color(65, 65, 65, 255) )
11479
11480 surface.DrawOutlinedRect( 0, 0, w, h )
11481
11482 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
11483
11484 end
11485
11486
11487
11488 local TButton = vgui.Create( "DButton", cmdp )
11489
11490 TButton:SetPos( 390, 2 )
11491
11492 TButton:SetText( "" )
11493
11494 TButton:SetTextColor( Color(255, 255, 255, 255) )
11495
11496 TButton:SetSize( 60, 26 )
11497
11498
11499
11500 TButton.Paint = function( self, w, h )
11501
11502 local dtx = "Block"
11503
11504 local dtc = Color(150, 30, 30, 255)
11505
11506 if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
11507
11508 surface.SetDrawColor( dtc )
11509
11510 surface.DrawRect( 0, 0, w, h )
11511
11512 surface.SetDrawColor( Color(45, 45, 45, 255) )
11513
11514 surface.DrawOutlinedRect( 0, 0, w, h )
11515
11516 draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
11517
11518 end
11519
11520
11521
11522 TButton.DoClick = function()
11523
11524 cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd]
11525
11526 for cmd, val in pairs( cblockedcmds ) do
11527
11528 _A.security.BlockRemoteExecCmd( cmd, val )
11529
11530 end
11531
11532 end
11533
11534
11535
11536 Plist:AddItem( cmdp )
11537
11538 end
11539
11540
11541
11542
11543
11544 for k, v in pairs( cblockedcmds ) do
11545
11546 CreateCMDBlockPanel( k )
11547
11548 end
11549
11550
11551
11552 end)
11553
11554
11555
11556
11557
11558
11559
11560 _A.cc_Add( "aegis_camera_spam", function( p, c, a, str )
11561
11562 blockjpg = !blockjpg
11563
11564 print( "AEGIS BLOCK CAMERA SCREENSHOT MODE = "..tostring(blockjpg) )
11565
11566 end )
11567
11568
11569
11570 --------------------------------------------- ANTICHEAT SCANNER ---------------------------------------------
11571
11572
11573
11574 local function ispooped( str )
11575
11576 local status, error = pcall( net.Start, str )
11577
11578 return status
11579
11580 end
11581
11582
11583
11584 local acfags = {
11585
11586 ["!Cake Anticheat (CAC)"] = {
11587
11588 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",
11589
11590 scan = function() return _A.aegis.anticheats["extensions/client/vehicle.lua"] end,
11591
11592 },
11593
11594 ["Simplicity Anticheat (SAC)"] = {
11595
11596 desc = "Leystryku's new anticheat he released on scriptfodder\nNot as strong as CAC but (apparently) offers better serverside performance",
11597
11598 scan = function() if _G.simplicity then return true else return false end end,
11599
11600 },
11601
11602 ["Quack Anticheat (QAC)"] = {
11603
11604 desc = "A dated open source anticheat from 2014\nRPtards still edit and use this piece of shit and call it their 1337 private anticheat",
11605
11606 scan = function() return ( _G.QAC and ispooped( "quack" ) ) end,
11607
11608 },
11609
11610 ["Supservers Anticheat"] = {
11611
11612 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)",
11613
11614 scan = function() return ispooped( "rp.OrgMotd" ) end,
11615
11616 },
11617
11618 ["Screengrab V2"] = {
11619
11620 desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
11621
11622 scan = function() if _G.OpenSGMenu then return true else return false end end,
11623
11624 },
11625
11626 ["Pablo's Screengrab"] = {
11627
11628 desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
11629
11630 scan = function() if _G.SCRG then return true else return false end end,
11631
11632 },
11633
11634 ["Enforcer Anti Minge"] = {
11635
11636 desc = "A general purpose anti minge script that includes anti propkill, anti crash and logging",
11637
11638 scan = function() if _G.EnforcerAddMessage then return true else return false end end,
11639
11640 },
11641
11642 ["AP Anti"] = {
11643
11644 desc = "A stupidly named open source anti-propkill script\nYou probably won't be able to propkill on this server",
11645
11646 scan = function() return ispooped( "APAnti AlertNotice" ) end,
11647
11648 },
11649
11650
11651
11652 }
11653
11654
11655
11656
11657
11658 _A.cc_Add( "aegis_view_anticheats", function()
11659
11660 local acpanel = vgui.Create("DFrame")
11661
11662 if !acpanel then return end
11663
11664 acpanel:SetSize(500,455)
11665
11666 acpanel:SetTitle("Server Security Measures")
11667
11668 acpanel:Center()
11669
11670 acpanel:MakePopup()
11671
11672
11673
11674 acpanel.Paint = function( s, w, h )
11675
11676 surface.SetDrawColor( Color(30, 30, 30, 255) )
11677
11678 surface.DrawRect( 0, 0, w, h )
11679
11680 surface.SetDrawColor( Color(55, 55, 55, 255) )
11681
11682 surface.DrawOutlinedRect( 0, 0, w, h )
11683
11684 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
11685
11686 surface.SetDrawColor( Color(0, 0, 0, 200) )
11687
11688 surface.DrawRect( 10, 25, w - 20, h - 35 )
11689
11690 end
11691
11692
11693
11694 local Plist = vgui.Create( "DPanelList", acpanel )
11695
11696 Plist:SetSize( acpanel:GetWide() - 20, acpanel:GetTall() - 35 )
11697
11698 Plist:SetPadding( 5 )
11699
11700 Plist:SetSpacing( 5 )
11701
11702 Plist:EnableHorizontal( false )
11703
11704 Plist:EnableVerticalScrollbar( true )
11705
11706 Plist:SetPos( 10, 25 )
11707
11708 Plist:SetName( "" )
11709
11710
11711
11712
11713
11714 local function CreateACPanel( cmd )
11715
11716 if !acpanel then return end
11717
11718 local cmdp = vgui.Create( "DPanel" )
11719
11720 cmdp:SetSize( Plist:GetWide(), 60 )
11721
11722 cmdp.Cmd = cmd
11723
11724 cmdp.Desc = acfags[cmd].desc
11725
11726 cmdp.Paint = function( s, w, h )
11727
11728 surface.SetDrawColor( Color(50, 50, 50, 255) )
11729
11730 surface.DrawRect( 0, 0, w, h )
11731
11732 surface.SetDrawColor( Color(65, 65, 65, 255) )
11733
11734 surface.DrawOutlinedRect( 0, 0, w, h )
11735
11736 surface.DrawLine( 0, 24, w, 24 )
11737
11738 draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 5, Color(255,255,255) )
11739
11740 draw.DrawText( cmdp.Desc, "DermaDefault", 10, 28, Color(205,205,255, 100) )
11741
11742 end
11743
11744
11745
11746 Plist:AddItem( cmdp )
11747
11748 end
11749
11750
11751
11752
11753
11754 for k, v in pairs( acfags ) do
11755
11756 if v["scan"]() then CreateACPanel( k ) end
11757
11758 end
11759
11760 end)
11761
11762
11763
11764
11765
11766
11767
11768 _A.cc_Add( "aegis_disable_renderpanic", function() videomeme = false runbitchrun = false end)
11769
11770
11771
11772
11773
11774--------------------------------------------- LUA_RUN ---------------------------------------------
11775
11776
11777
11778
11779
11780_A.cc_Add( "odium_lua_run_cl", function()
11781
11782 if LuaMenu and LuaMenu:IsVisible() then return end
11783
11784
11785
11786 LuaMenu = vgui.Create("DFrame")
11787
11788 LuaMenu:SetSize(500,550)
11789
11790 LuaMenu:SetTitle("Run Lua")
11791
11792 LuaMenu:Center()
11793
11794 LuaMenu:MakePopup()
11795
11796
11797
11798 LuaMenu.Paint = function( s, w, h )
11799
11800 surface.SetDrawColor( Color(30, 30, 30, 255) )
11801
11802 surface.DrawRect( 0, 0, w, h )
11803
11804 surface.SetDrawColor( Color(55, 55, 55, 245) )
11805
11806 surface.DrawOutlinedRect( 0, 0, w, h )
11807
11808 surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
11809
11810 end
11811
11812
11813
11814 local luatxt = vgui.Create( "DTextEntry", LuaMenu )
11815
11816 luatxt:SetPos( 5, 25 )
11817
11818 luatxt:SetSize( LuaMenu:GetWide() - 10, LuaMenu:GetTall() - 65 )
11819
11820 luatxt:SetText( "" )
11821
11822 luatxt:SetMultiline( true )
11823
11824 luatxt.OnChange = function( self )
11825
11826 end
11827
11828
11829
11830 local runlua = vgui.Create( "DButton", LuaMenu )
11831
11832 runlua:SetPos( 5, LuaMenu:GetTall() - 35 )
11833
11834 runlua:SetText( "Run Lua" )
11835
11836 runlua:SetTextColor( Color(255, 255, 255, 255) )
11837
11838 runlua:SetSize( LuaMenu:GetWide() - 10, 30 )
11839
11840
11841
11842 runlua.Paint = function( self, w, h )
11843
11844 surface.SetDrawColor( Color(60, 60, 60, 200) )
11845
11846 surface.DrawRect( 0, 0, w, h )
11847
11848 surface.SetDrawColor( Color( 60, 60, 60 ) )
11849
11850 surface.SetMaterial( downgrad )
11851
11852 surface.DrawTexturedRect( 0, 0, w, h/ 2 )
11853
11854 surface.SetDrawColor( Color(100, 100, 100, 255) )
11855
11856 surface.DrawOutlinedRect( 0, 0, w, h )
11857
11858 end
11859
11860
11861
11862
11863
11864 runlua.DoClick = function()
11865
11866 runlau = luatxt:GetValue()
11867
11868 local run = cstr( runlau, "", false )
11869
11870 if isfaggot( run ) then _A.engine.RunString( runlau ) else
11871
11872 print( "YOUR CODE FUCKING SUCKS RETARD" )
11873
11874 print( run )
11875
11876 end
11877
11878 end
11879
11880
11881
11882end)
11883
11884
11885
11886end
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896------------------------------------------------------------------------------
11897
11898-- NOTIFY --
11899
11900------------------------------------------------------------------------------
11901
11902
11903
11904local messagetypes = false
11905
11906timer.Simple( 5, function() -- have to load this after autorun otherwise Color() doesn't exist
11907
11908 messagetypes = {
11909
11910 [1] = { ["col"] = Color( 200, 200, 200 ), ["icon"] = Material( "icon16/application_xp_terminal.png" ) }, -- neutral message
11911
11912 [2] = { ["col"] = Color( 250, 200, 140 ), ["icon"] = Material( "icon16/cross.png" ) }, -- negative message
11913
11914 [3] = { ["col"] = Color( 180, 250, 180 ), ["icon"] = Material( "icon16/tick.png" ) }, -- positive message
11915
11916 [4] = { ["col"] = Color( 250, 140, 140 ), ["icon"] = Material( "icon16/error.png" ) }, -- error message
11917
11918 [5] = { ["col"] = Color( 180, 180, 250 ), ["icon"] = Material( "icon16/user.png" ) }, -- blue message
11919
11920 [6] = { ["col"] = Color( 250, 250, 180 ), ["icon"] = Material( "icon16/lightbulb.png" ) }, -- lightbulb message
11921
11922 }
11923
11924end )
11925
11926
11927
11928local aegiscomponent = { color = -1, name = "Aegis" }
11929
11930
11931
11932local notifies = {}
11933
11934local tableinsert = table.insert
11935
11936local istable = istable
11937
11938local error = error
11939
11940
11941
11942function _A.aegis.Notify( component, type, text )
11943
11944 if !messagetypes then return end
11945
11946 if !component or !istable( component ) then component = { color = Color( 255, 0, 0 ), name = "DEFINE A SCRIPT COMPONENT PROPERLY YOU AUTIST" } end
11947
11948 if !messagetypes[type] then
11949
11950 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!" } )
11951
11952 return
11953
11954 end
11955
11956 if component.color == -1 then component.color = Color( 55, 55, 155 ) end
11957
11958 tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = component.color, ["ctxt"] = "[ "..component.name.." ]", ["icon"] = messagetypes[type].icon, ["col"] = messagetypes[type].col, ["txt"] = text } )
11959
11960end
11961
11962
11963
11964
11965
11966-- odium.aegis.Notify( { color = -1, name = "Aegis" }, 1, "NIGGERS" )
11967
11968
11969
11970local function DrawNotifies()
11971
11972-- if !messagetypes then return end
11973
11974 local x, y = 10, ScrH() / 2
11975
11976 local cutoff = 0
11977
11978 for k, v in pairs( notifies ) do
11979
11980 if cutoff > 30 then continue end
11981
11982 cutoff = cutoff + 1
11983
11984 local lx = 10
11985
11986 local timeleft = v.time - CurTime()
11987
11988 if timeleft < 2 then lx = 10 - ( ( 2 - timeleft ) * 800 ) end -- pull back into the edge of the screen at the end of the timer
11989
11990 if timeleft <= 0.5 then notifies[k] = nil continue end -- your time is up faggot
11991
11992 local bgcol = Color( v.ccol.r, v.ccol.g, v.ccol.b, 145 )
11993
11994 local bgcol2 = Color( v.col.r, v.col.g, v.col.b, 145 )
11995
11996 surface.SetDrawColor( v.ccol )
11997
11998 local txw, txh = draw.SimpleText( v.ctxt, "Trebuchet18", lx, y, v.ccol, 0, 0 )
11999
12000
12001
12002 surface.SetDrawColor( bgcol )
12003
12004 surface.DrawRect( lx - 5, y - 1, txw + 10, 20 )
12005
12006 surface.DrawLine( lx - 5, y - 1, lx - 5 + (txw + 10), y - 1 )
12007
12008
12009
12010 surface.SetDrawColor( Color(255,255,255, 150) )
12011
12012 surface.SetMaterial( v.icon )
12013
12014 surface.DrawTexturedRect( (lx - 5) + txw + 16, y + 1, 16, 16 )
12015
12016
12017
12018 txw = txw + 22
12019
12020
12021
12022 surface.SetDrawColor( bgcol2 )
12023
12024 local txw2, txh2 = draw.SimpleText( v.txt, "Trebuchet18", (lx - 5) + txw + 20, y, v.col, 0, 0 )
12025
12026 surface.DrawRect( (lx - 5) + txw + 15, y - 1, txw2 + 10, 20 )
12027
12028 surface.DrawLine( (lx - 5) + txw + 15, y - 1, ((lx - 5) + txw + 15) + txw2 + 10, y - 1 )
12029
12030
12031
12032 y = y - 25
12033
12034 end
12035
12036end
12037
12038
12039
12040timer.Simple( 6, function()
12041
12042 _A.h_Add( "HUDPaint", "AegisNotifications", DrawNotifies )
12043
12044-- _A.aegis.Notify( aegiscomponent, 1, "BLACK PEOPLE" )
12045
12046end )
12047
12048
12049
12050
12051
12052local function InjectCCSystem()
12053
12054 --[[
12055
12056 ANUBIS CHANGE
12057
12058 This function was having a bit of a cry when the second argument to concommand.Add, func,
12059
12060 was null. I just added a little check that makes sure func is A ok to be used.
12061
12062 ]]
12063
12064 local _concommandAdd = concommand.Add
12065
12066 concommand.Add = aegis.Detour( concommand.Add, function( ... )
12067
12068 local args = {...}
12069
12070 local func = args[2]
12071
12072
12073
12074 if func and jufi(func).source == "@" then
12075
12076 return _A.cc_Add( ... )
12077
12078 end
12079
12080
12081
12082 return _concommandAdd( ... )
12083
12084 end)
12085
12086
12087
12088 local _concommandRun = concommand.Run
12089
12090 concommand.Run = aegis.Detour( concommand.Run, function( player, command, arguments, args )
12091
12092 _concommandRun( player, command, arguments, args )
12093
12094
12095
12096 local LowerCommand = string.lower( command )
12097
12098
12099
12100 if ( CommandList2[ LowerCommand ] != nil ) then
12101
12102 CommandList2[ LowerCommand ]( player, command, arguments, args )
12103
12104 return true
12105
12106 end
12107
12108
12109
12110 return false
12111
12112 end, "concommand.Run")
12113
12114
12115
12116 InjectAegisCommands()
12117
12118
12119
12120 print("////////////////// Project Odium Detours: Stage 3 Initialized //////////////////")
12121
12122end
12123
12124
12125
12126
12127
12128local blockincludes = {
12129
12130 // gpseak crashes us so lets block it from loading
12131
12132 ["lib/preferences.lua/preferences.lua"] = true,
12133
12134 ["lib/i18n.lua/i18n.lua"] = true,
12135
12136 ["conf/theme.lua"] = true,
12137
12138 ["speak/cl_main.lua"] = true,
12139
12140 ["conf/emoticons.lua"] = true,
12141
12142}
12143
12144
12145
12146local ac = {
12147
12148 ["extensions/client/vehicle.lua"] = "!cake anticheat",
12149
12150 ["autorun/simplicityac.lua"] = "simplicity anticheat",
12151
12152}
12153
12154
12155
12156local old_include = include
12157
12158include = aegis.Detour( include, function( str )
12159
12160if ac[str] then
12161
12162 _A.aegis.anticheats[str] = ac[str]
12163
12164 aegis.log( "Anticheat detected: "..ac[str] )
12165
12166end
12167
12168if blockincludes[str] then
12169
12170 aegis.log( "Blocked loading of naughty file: "..str )
12171
12172 return
12173
12174end
12175
12176if str == "ulib/shared/sh_ucl.lua" then InjectHookSystem() end -- inject it again cos ulx just raped us
12177
12178return old_include(str)
12179
12180end)
12181
12182
12183
12184
12185
12186
12187
12188local saferequires = {
12189
12190 ["baseclass"] = true,
12191
12192 ["concommand"] = true,
12193
12194 ["saverestore"] = true,
12195
12196 ["hook"] = true,
12197
12198 ["gamemode"] = true,
12199
12200 ["weapons"] = true,
12201
12202 ["scripted_ents"] = true,
12203
12204 ["player_manager"] = true,
12205
12206 ["numpad"] = true,
12207
12208 ["team"] = true,
12209
12210 ["undo"] = true,
12211
12212 ["cleanup"] = true,
12213
12214 ["duplicator"] = true,
12215
12216 ["constraint"] = true,
12217
12218 ["construct"] = true,
12219
12220 ["usermessage"] = true,
12221
12222 ["list"] = true,
12223
12224 ["cvars"] = true,
12225
12226 ["http"] = true,
12227
12228 ["properties"] = true,
12229
12230 ["widget"] = true,
12231
12232 ["cookie"] = true,
12233
12234 ["utf8"] = true,
12235
12236 ["drive"] = true,
12237
12238 ["draw"] = true,
12239
12240 ["markup"] = true,
12241
12242 ["effects"] = true,
12243
12244 ["halo"] = true,
12245
12246 ["killicon"] = true,
12247
12248 ["spawnmenu"] = true,
12249
12250 ["controlpanel"] = true,
12251
12252 ["presets"] = true,
12253
12254 ["menubar"] = true,
12255
12256 ["matproxy"] = true,
12257
12258}
12259
12260
12261
12262local tocopy = ""
12263
12264local hooksinjected = false
12265
12266local old_req = require
12267
12268_A.require = old_req
12269
12270require = aegis.Detour( require, function( str )
12271
12272if tocopy != "" and _G[tocopy] then
12273
12274 _A.G[tocopy] = tabble.Copy( _G[tocopy] )
12275
12276 tocopy = ""
12277
12278end
12279
12280
12281
12282if saferequires[str] and saferequires[str] != -1 then
12283
12284 tocopy = str
12285
12286 saferequires[str] = -1
12287
12288end
12289
12290
12291
12292if str == "gamemode" and !hooksinjected then InjectHookSystem() InjectCCSystem() end
12293
12294return old_req(str)
12295
12296end)
12297
12298
12299
12300local renderview = render.RenderView
12301
12302local renderclear = render.Clear
12303
12304local rendercap = render.Capture
12305
12306--local eyepos = EyePos
12307
12308--local eyeang = EyeAngles
12309
12310local vgetworldpanel = vgui.GetWorldPanel
12311
12312
12313
12314
12315
12316
12317
12318local function renderpanic( delay )
12319
12320if runbitchrun then return end
12321
12322runbitchrun = true
12323
12324renderclear( 0, 0, 0, 255, true, true )
12325
12326
12327
12328renderview( {
12329
12330 origin = LocalPlayer():EyePos(),
12331
12332 angles = LocalPlayer():EyeAngles(),
12333
12334 x = 0,
12335
12336 y = 0,
12337
12338 w = ScrW(),
12339
12340 h = ScrH(),
12341
12342 dopostprocess = true,
12343
12344 drawhud = true,
12345
12346 drawmonitors = true,
12347
12348 drawviewmodel = true
12349
12350} )
12351
12352
12353
12354local worldpanel = vgetworldpanel()
12355
12356if IsValid( worldpanel ) then
12357
12358 worldpanel:SetPaintedManually( true )
12359
12360end
12361
12362
12363
12364for k, v in pairs( ents.GetAll() ) do
12365
12366 if v:GetColor() and v:GetColor().a == 100 and v:GetRenderMode() and v:GetRenderMode() == 4 then v:SetColor( Color( 255, 255, 255 ) ) end
12367
12368end
12369
12370
12371
12372timer.Simple( delay, function()
12373
12374 vgetworldpanel():SetPaintedManually( false )
12375
12376 runbitchrun = false
12377
12378end)
12379
12380end
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392local findmeta = FindMetaTable
12393
12394local ply = findmeta( "Player" )
12395
12396local oconcommand = ply.ConCommand
12397
12398ply.ConCommand = aegis.Detour( ply.ConCommand, function( pl, cmd, ... )
12399
12400
12401
12402if string.lower(cmd) == "jpeg" then
12403
12404 if blockjpg then return end
12405
12406 renderpanic( 0.2 )
12407
12408 oconcommand( pl, cmd, ... )
12409
12410 timer.Simple( 0.2, function()
12411
12412 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
12413
12414 end )
12415
12416 return
12417
12418end
12419
12420
12421
12422if string.lower(cmd) == "__screenshot_internal" then
12423
12424 renderpanic( 0.3 )
12425
12426 oconcommand( pl, cmd, ... )
12427
12428 timer.Simple( 0.3, function()
12429
12430 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
12431
12432 end )
12433
12434 return
12435
12436end
12437
12438
12439
12440return oconcommand( pl, cmd, ... )
12441
12442end)
12443
12444
12445
12446
12447
12448render.Capture = aegis.Detour( render.Capture, function( data )
12449
12450 renderpanic( 0.05 )
12451
12452 local capture = rendercap( data )
12453
12454 return capture
12455
12456end )
12457
12458
12459
12460local orcp = render.CapturePixels
12461
12462render.CapturePixels = aegis.Detour( render.CapturePixels, function(...)
12463
12464 renderpanic( 0.05 )
12465
12466 orcp( ... )
12467
12468 return
12469
12470end )
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482--local chattxt = chat.AddText
12483
12484local orcc = RunConsoleCommand
12485
12486RunConsoleCommand = aegis.Detour( RunConsoleCommand, function( cmd, ... )
12487
12488
12489
12490if string.lower(cmd) == "__screenshot_internal" then
12491
12492 renderpanic( 0.3 )
12493
12494 orcc( cmd, ... )
12495
12496 timer.Simple( 0.3, function()
12497
12498 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
12499
12500 end )
12501
12502 return
12503
12504end
12505
12506
12507
12508if string.lower(cmd) == "jpeg" then
12509
12510 renderpanic( 0.2 )
12511
12512 orcc( cmd, ... )
12513
12514 timer.Simple( 0.2, function()
12515
12516 _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
12517
12518 end )
12519
12520 return
12521
12522end
12523
12524
12525
12526return orcc( cmd, ... )
12527
12528end )
12529
12530
12531
12532local gayinfonum = gcinfo()
12533
12534local gayinfo = gcinfo
12535
12536gcinfo = aegis.Detour( gcinfo, function( ... )
12537
12538 local onum = gayinfo( ... )
12539
12540 local newnum = onum - gayinfonum
12541
12542 return newnum
12543
12544end)
12545
12546
12547
12548local nigger = string.find
12549
12550local function protectpath( f )
12551
12552 local inf = dbginfo( 4 )
12553
12554 if !inf then return true end
12555
12556 local src = inf.source
12557
12558 return nigger( f, "acebot_settings.dat" ) and src != "@"
12559
12560end
12561
12562
12563
12564local fagopen = file.Open
12565
12566file.Open = aegis.Detour( file.Open, function( f, m, p )
12567
12568 if protectpath( f ) then return end
12569
12570 return fagopen( f, m, p )
12571
12572end )
12573
12574
12575
12576local fagexists = file.Exists
12577
12578file.Exists = aegis.Detour( file.Open, function( f, p )
12579
12580 if protectpath( f ) then return false end
12581
12582 return fagexists( f, p )
12583
12584end )
12585local s, odium = pcall( collectgarbage, 'odium' ) if (not odium) or (not odium.aegis) then
12586
12587 return
12588
12589end
12590
12591
12592
12593local playerTable = FindMetaTable("Player")
12594
12595local cbacks = {}
12596
12597local blockedCmds = {}
12598
12599
12600
12601local _oRunConsoleCommand = RunConsoleCommand
12602
12603local _oConCommand = playerTable.ConCommand
12604
12605
12606
12607local _oInclude = include
12608
12609local _oRequire = require
12610
12611
12612
12613local _ipairs = ipairs
12614
12615local _Getfenv = debug.getfenv
12616
12617local oStr, oValue = nil
12618
12619
12620
12621local unlock_time
12622
12623local tbl_BadSrc = {}
12624
12625
12626
12627local function LogString( str )
12628
12629 chat.AddText(Color(134, 171, 167), "Iron-Curtain # ", Color(255, 255, 255), str)
12630
12631end
12632
12633
12634
12635local function StartsWith( source, with )
12636
12637 local len = with:len()
12638
12639
12640
12641 if(source:len() < len) then
12642
12643 return false
12644
12645 end
12646
12647
12648
12649 for i=1, len do
12650
12651 if(source[i] ~= with[i]) then
12652
12653 return false
12654
12655 end
12656
12657 end
12658
12659
12660
12661 return true
12662
12663end
12664
12665
12666
12667local function IsBadSource( info )
12668
12669 if(not info) then
12670
12671 return false
12672
12673 end
12674
12675
12676
12677 if((info.short_src:find("[C]")) or (info.short_src:find("LuaCmd"))) then
12678
12679 return true
12680
12681 end
12682
12683
12684
12685 return false
12686
12687end
12688
12689
12690
12691local function Alert()
12692
12693 local t = os.time()
12694
12695
12696
12697 if(unlock_time == nil) then
12698
12699 unlock_time = t + 3
12700
12701 elseif(t > unlock_time) then
12702
12703 unlock_time = t + 3
12704
12705 else return end
12706
12707
12708
12709 LogString("We've blocked a malicious attempt to read GMod's memory.")
12710
12711end
12712
12713
12714
12715ipairs = odium.aegis.Detour( ipairs, function ( tbl )
12716
12717 local str, val = debug.getupvalue( ipairs, 1 )
12718
12719
12720
12721 if(type(val) == "number") then
12722
12723 Alert()
12724
12725 debug.setupvalue(_ipairs, 1, oValue)
12726
12727
12728
12729 local info = debug.getinfo( 1 )
12730
12731 table.insert(tbl_BadSrc, info.short_src)
12732
12733 return _ipairs({ })
12734
12735 end
12736
12737
12738
12739 return _ipairs( tbl )
12740
12741end)
12742
12743
12744
12745debug.getfenv = odium.aegis.Detour( debug.getfenv, function ( tbl )
12746
12747 local info = debug.getinfo( 1 )
12748
12749 if(table.HasValue(tbl_BadSrc, info.short_src)) then
12750
12751 local key = table.KeyFromValue(tbl_BadSrc, info.short_src)
12752
12753
12754
12755 if(key ~= nil) then
12756
12757 table.remove(tbl_BadSrc, key)
12758
12759 return nil
12760
12761 end
12762
12763 end
12764
12765
12766
12767 return _Getfenv( tbl )
12768
12769end)
12770
12771oStr, oValue = debug.getupvalue(_ipairs, 1)
12772
12773
12774
12775--[[
12776
12777WaitForPostLoad
12778
12779Summary:
12780
12781]]
12782
12783
12784
12785include = odium.aegis.Detour( include, function ( file )
12786
12787 local inc = _oInclude( file )
12788
12789
12790
12791 local ctr = 1
12792
12793 for k,v in pairs(cbacks) do
12794
12795 if(string.find(file, k)) then
12796
12797 v()
12798
12799 table.remove(cbacks, ctr)
12800
12801 end
12802
12803
12804
12805 ctr = ctr + 1
12806
12807 end
12808
12809 return inc
12810
12811end)
12812
12813
12814
12815require = odium.aegis.Detour( require, function ( file )
12816
12817 local req = _oRequire( file )
12818
12819
12820
12821 local ctr = 1
12822
12823 for k,v in pairs(cbacks) do
12824
12825 if(string.find(file, k)) then
12826
12827 v()
12828
12829 table.remove(cbacks, ctr)
12830
12831 end
12832
12833
12834
12835 ctr = ctr + 1
12836
12837 end
12838
12839 return req
12840
12841end)
12842
12843
12844
12845local function WaitForPostLoad( file, callback )
12846
12847 if(cbacks[file] ~= nil) then
12848
12849 return
12850
12851 end
12852
12853 cbacks[file] = callback
12854
12855end
12856
12857
12858
12859--
12860
12861
12862
12863--[[
12864
12865ConCommand blocking
12866
12867Summary:
12868
12869]]
12870
12871local function IsCommandBlocked( cmd_raw )
12872
12873 for k,v in pairs(blockedCmds) do
12874
12875 if(StartsWith(cmd_raw, v) == true) then
12876
12877 return true
12878
12879 end
12880
12881 end
12882
12883
12884
12885 return false
12886
12887end
12888
12889
12890
12891RunConsoleCommand = odium.aegis.Detour( RunConsoleCommand, function ( cmd, ... )
12892
12893 if(IsCommandBlocked(cmd) and IsBadSource()) then
12894
12895 return
12896
12897 end
12898
12899
12900
12901 return _oRunConsoleCommand( cmd, ... )
12902
12903end)
12904
12905
12906
12907playerTable.ConCommand = odium.aegis.Detour( playerTable.ConCommand, function ( ply, cmd )
12908
12909 if(IsCommandBlocked(cmd) and IsBadSource()) then
12910
12911 return
12912
12913 end
12914
12915 return _oConCommand( ply, cmd )
12916
12917end)
12918
12919
12920
12921function ProtectCommand(cmd)
12922
12923 if(blockedCmds[cmd] ~= nil) then
12924
12925 return
12926
12927 end
12928
12929 blockedCmds[#blockedCmds + 1] = cmd
12930
12931end
12932
12933
12934
12935function UnProtectCommand(cmd)
12936
12937 for k,v in pairs(blockedCmds) do
12938
12939 if(v == cmd) then
12940
12941 odium.security.BlockRemoteExecCmd(cmd, false)
12942
12943 table.remove(blockedCmds, k)
12944
12945 break
12946
12947 end
12948
12949 end
12950
12951end
12952
12953
12954
12955WaitForPostLoad("hook", function ()
12956
12957 hook.Add("InitPostEntity", "BlockCmds", function ()
12958
12959 if(odium and odium.GetConCommandList) then
12960
12961 local aegis_Cmds = odium.GetConCommandList()
12962
12963 for k,v in pairs(aegis_Cmds) do
12964
12965 ProtectCommand(k)
12966
12967 end
12968
12969 end
12970
12971
12972
12973 for k,v in pairs(blockedCmds) do
12974
12975 odium.security.BlockRemoteExecCmd(v, true)
12976
12977 end
12978
12979 end)
12980
12981end)
12982
12983--
12984
12985
12986
12987print("# Iron-Curtain #")
12988
12989print("# Garry's Mod Client Security")
12990
12991print("# created by Anubis")
12992
12993
12994
12995-- Some default commands to protect.
12996
12997ProtectCommand("say")
12998
12999ProtectCommand("impulse")
13000
13001ProtectCommand("pp_texturize")
13002
13003ProtectCommand("pp_texturize_scale")