· 8 years ago · Dec 31, 2017, 08:32 PM
1/*
2
3
4 Interesting functions/ideas
5
6 -----------------------------------
7
8 gcinfo() - Get Lua memory usage in KB
9 AngRand() - Generates a random pitch, yaw, & roll -90 to 90 & -180 to 180
10 JoinServer( ip ) - menu state only
11 HSVToColor( RealTime() * 120 % 360, 1, 1 ) - Rainbow! ~ I forgot who gave me this, but thanks.
12
13 -------------------------------------
14
15 Potential APIs to integrate
16
17 -------------------------------------
18
19 http://tambal.azurewebsites.net/joke/random - A nice joke generator API output: {"joke":"joke string"}
20
21
22*/
23
24if _G.snixzz then chat.AddText( Color( 255, 0, 0 ), "\n\n\n\n\nsnixzz3 cannot be reloaded! Reconnect then re-load it." ) return end
25if game.SinglePlayer() then chat.AddText( Color( 255, 0, 0 ), "\n\n\n\n\nsnixzz3 will not load in singleplayer!" ) return end
26
27local snixzz = {}
28
29snixzz.IsDev = function( ply ) return ply:SteamID64() == "76561198040553376" end -- I am not proud of myself.
30
31if string.find( GetHostName(), "SidewaysGaming.net" ) && !snixzz.IsDev( LocalPlayer() ) then chat.AddText( Color( 255, 0, 0 ), "\n\n\n\n\nsnixzz3 will not load on the developer's servers!" ) return end
32
33snixzz.Panic = false
34
35snixzz.DataFolder = "snixzz3_beta"
36
37snixzz.Info = {
38 ["Version"] = "build 1.3.6b",
39 ["Updated"] = "8/3/17",
40 ["Size"] = "157kb",
41 ["Lines"] = "6,495",
42}
43
44// Data cache
45snixzz.Cache = {}
46snixzz.ConsoleHistory = {}
47snixzz.ChatCache = {}
48snixzz.ChatHistory = {}
49
50local G = table.Copy( _G )
51local _R = G.debug.getregistry()
52local hookGetTableCopy = G.table.Copy( hook.GetTable() )
53
54local EntM = G.FindMetaTable( "Entity" )
55local MatM = G.FindMetaTable( "IMaterial" )
56
57-- Gamemode checks
58snixzz.IsTTT = G.GAMEMODE.Name == "Trouble in Terrorist Town"
59snixzz.IsDarkRP = ( -- Wow look at all these garbage DarkRP renames.
60G.GAMEMODE.Name == "DarkRP" or G.GAMEMODE.Name == "MethRP" or
61G.GAMEMODE.Name == "The Purge" or G.GAMEMODE.Name == "starwarsrp" or
62G.GAMEMODE.Name == "KingdomRP" or G.GAMEMODE.Name == "MilitaryRP" or
63G.GAMEMODE.Name == "SlaveRP" or G.GAMEMODE.Name == "1942RP" or
64G.GAMEMODE.Name == "ZombieRP" or G.GAMEMODE.Name == "SchoolRP" or
65G.GAMEMODE.Name == "PrisonRP" or G.GAMEMODE.Name == "HaloRP" or
66G.GAMEMODE.Name == "PonyRP" or G.GAMEMODE.Name == "MexicanBorderRPP" or G.GAMEMODE.Name == "HogwartsRP" -- end my suffering. what the fuck is this shit.
67)
68snixzz.IsSandbox = G.GAMEMODE.Name == "Sandbox"
69snixzz.IsMurder = G.GAMEMODE.Name == "Murder"
70snixzz.IsProphunt = G.GAMEMODE.Name == "Prop Hunt" or G.GAMEMODE.Name == "Prophunt"
71
72snixzz.Detours = {
73 ["net.Start"] = {
74 ["checksaum"] = true,
75 ["checksum"] = true,
76 ["gcontrolled_vars"] = true,
77 ["controlled_vars"] = true,
78 ["quack"] = true,
79 ["leyac_cmd"] = true, -- old but blocks old versions
80 },
81 ["Commands"] = {
82 "GetTheTime",
83 },
84}
85
86snixzz["Spoof"] = {
87 ["sv_allowcslua"] = 0,
88 ["sv_cheats"] = 0,
89 ["host_timescale"] = 1,
90 ["host_framerate"] = 0,
91}
92
93// Aimbot vars nd shit
94snixzz.Target = nil
95snixzz.Typing = false
96snixzz.Locked = false
97
98snixzz.Bools = {
99
100 -- Load settings
101 ["load_unhooked"] = false,
102
103 -- Aimbot & view settings
104 ["aim_toggle"] = false,
105 ["aim_autoshoot"] = true,
106 ["aim_silent"] = true,
107 ["aim_psilent"] = false,
108 ["aim_anti"] = false,
109 ["aim_badshots"] = false,
110 ["aim_nospread"] = true,
111 ["aim_norecoil"] = true,
112 ["aim_prediction"] = true,
113 ["aim_antiantiaim"] = false,
114 ["aim_checkfov"] = false,
115 ["aim_ignorelos"] = false,
116 ["aim_ignoresteam"] = true,
117 ["aim_ignoreadmins"] = false,
118 ["aim_ignorebots"] = false,
119 ["aim_ignoreteam"] = false,
120 ["aim_ignorefriends"] = true,
121 ["aim_ignoretraitors"] = false,
122 ["aim_onlytraitors"] = false,
123 ["aim_holdtarget"] = false,
124
125 -- ESP settings
126 ["esp_enabled"] = true,
127 ["esp_name"] = true,
128 ["esp_health_text"] = true,
129 ["esp_health_bar"] = true,
130 ["esp_chams"] = true,
131 ["esp_chams_weapon"] = true,
132 ["esp_weapon"] = true,
133 ["esp_box"] = true,
134 ["esp_crosshair"] = false,
135 ["esp_crosshair_box"] = false,
136 ["esp_laser"] = true,
137 ["esp_nohands"] = true,
138 ["esp_status"] = true,
139 ["esp_list"] = true,
140 ["esp_snaplines"] = false,
141 ["esp_distance"] = false,
142 ["esp_dynamiclight"] = false,
143 ["esp_wireweapon"] = false,
144 ["esp_aimpos"] = false,
145 ["esp_asus_walls"] = false,
146 ["esp_bullet_trace"] = false,
147 ["esp_hitbox"] = false,
148 ["esp_rainbow"] = false,
149
150 ["misc_bhop"] = true,
151 ["misc_triggerbot"] = false,
152 ["misc_triggerbot_nospread"] = true,
153 ["misc_thirdperson"] = false,
154 ["misc_traitor_finder"] = false,
155 ["misc_murder_finder"] = false,
156 ["misc_prophunt_finder"] = false,
157 ["misc_chat_spam"] = false,
158 ["misc_autostrafe"] = false,
159 ["misc_rapidfire"] = false,
160 ["misc_autoreload"] = false, -- todo
161 ["misc_csnoclip"] = false,
162 ["misc_exploits_prophunt"] = true,
163
164}
165
166snixzz.Vars = {
167
168 -- Aimbot Vars
169 ["aim_distance"] = 2147483647,
170 ["aim_fov"] = 180,
171 ["aim_offset"] = 0,
172 ["aim_method"] = "Hitbox",
173 ["aim_anti_method"] = "Classic",
174 ["aim_hitbox"] = "Head",
175 ["aim_bone"] = "Head",
176 ["aim_target_method"] = "Distance",
177 ["aim_prediction_method"] = "Engine Velocity",
178 ["aim_anti_spin_speed"] = 10,
179 ["aim_target_type"] = "Players",
180
181 -- ESP Vars
182 ["esp_distance"] = 3000,
183 ["esp_chams_material"] = "Solid",
184 ["esp_asus_alpha"] = 0.95,
185 ["esp_box_width"] = 1.5,
186 ["esp_fov"] = 90,
187 ["esp_laser_attachment"] = "Iron Sights",
188 ["esp_type"] = "Players",
189
190 -- Misc Vars
191 ["speedhack_speed"] = 3.5,
192 ["speedhack_type"] = "pSpeed",
193
194 ["misc_triggerbot_method"] = "Hitbox",
195 ["misc_triggerbot_type"] = "Players",
196 ["misc_menucolor"] = Color( 99, 99, 99, 163 ),
197 ["misc_menucolor2"] = Color( 0, 221, 225, 145 ),
198 ["misc_lasercolor"] = Color( 255, 0, 0, 255 ),
199 ["misc_thirdperson_distance"] = 90,
200 ["misc_csnoclip_speed"] = 10,
201
202 ["misc_chat_spam_method"] = "Advertise",
203 ["misc_chat_spam_message"] = "Visit www.snixzz.net to download the best Garry's Mod Multi-Hack of 2017", -- TODO: add menu for dis
204
205}
206
207snixzz.Binds = {
208 ["+aimbot"] = KEY_F,
209 ["+menu"] = KEY_INSERT,
210 ["+speedhack"] = KEY_B,
211 ["+triggerbot"] = KEY_G,
212 ["chat"] = KEY_T,
213}
214
215snixzz.Entities = {}
216snixzz.Friends = {}
217
218snixzz.BadEntities = {
219
220 ["env_sprite"] = true,
221 ["player"] = true,
222 ["prop_physics"] = true,
223 ["prop_door_rotating"] = true,
224 ["prop_dynamic"] = true,
225 ["viewmodel"] = true,
226 ["weapon_physgun"] = true,
227 ["weapon_physcannon"] = true,
228 ["keys"] = true,
229 ["pocket"] = true,
230 ["gmod_tool"] = true,
231 ["physgun_beam"] = true,
232 ["func_door_rotating"] = true,
233 ["func_breakable_surf"] = true,
234 ["worldspawn"] = true,
235 ["func_door"] = true,
236 ["class C_Sun"] = true,
237 ["func_useableladder"] = true,
238 ["class C_BaseEntity"] = true,
239 ["class C_PlayerResource"] = true,
240 ["class C_GMODGameRulesProxy"] = true,
241 ["class C_WaterLODControl"] = true,
242 ["class C_ShadowControl"] = true,
243 ["class C_EnvTonemapController"] = true,
244 ["class C_PhysPropClientside"] = true,
245 ["class C_HL2MPRagdoll"] = true,
246 ["class C_BaseFlex"] = true,
247 ["class C_ParticleSystem"] = true,
248 ["class C_RopeKeyframe"] = true,
249 ["env_skypaint"] = true,
250 ["manipulate_bone"] = true,
251
252}
253
254snixzz.Keys = {
255 [1] = { Name = "A", Key = KEY_A },
256 [2] = { Name = "B", Key = KEY_B },
257 [3] = { Name = "C", Key = KEY_C },
258 [4] = { Name = "D", Key = KEY_D },
259 [5] = { Name = "E", Key = KEY_E },
260 [6] = { Name = "F", Key = KEY_F },
261 [7] = { Name = "G", Key = KEY_G },
262 [8] = { Name = "H", Key = KEY_H },
263 [9] = { Name = "I", Key = KEY_I },
264 [10] = { Name = "J", Key = KEY_J },
265 [11] = { Name = "K", Key = KEY_K },
266 [12] = { Name = "L", Key = KEY_L },
267 [13] = { Name = "M", Key = KEY_M },
268 [14] = { Name = "N", Key = KEY_N },
269 [15] = { Name = "O", Key = KEY_O },
270 [16] = { Name = "P", Key = KEY_P },
271 [17] = { Name = "Q", Key = KEY_Q },
272 [18] = { Name = "R", Key = KEY_R },
273 [19] = { Name = "S", Key = KEY_S },
274 [20] = { Name = "T", Key = KEY_T },
275 [21] = { Name = "U", Key = KEY_U },
276 [22] = { Name = "V", Key = KEY_V },
277 [23] = { Name = "W", Key = KEY_W },
278 [24] = { Name = "X", Key = KEY_X },
279 [25] = { Name = "Y", Key = KEY_Y },
280 [26] = { Name = "Z", Key = KEY_Z },
281 [27] = { Name = "SPACE", Key = KEY_SPACE },
282 [28] = { Name = "TAB", Key = KEY_TAB },
283 [29] = { Name = "Left Shift", Key = KEY_LSHIFT },
284 [30] = { Name = "Right Shift", Key = KEY_RSHIFT },
285 [31] = { Name = "Left Alt", Key = KEY_LALT },
286 [32] = { Name = "Right Alt", Key = KEY_RALT },
287 [33] = { Name = "Delete", Key = KEY_DELETE },
288 [34] = { Name = ".", Key = KEY_PERIOD },
289 [35] = { Name = "/", Key = KEY_SLASH },
290 [36] = { Name = "[", Key = KEY_LBRACKET },
291 [37] = { Name = ";", Key = KEY_SEMICOLON },
292 [38] = { Name = "'", Key = KEY_APOSTROPHE },
293 [39] = { Name = ",", Key = KEY_COMMA },
294 [40] = { Name = "Insert", Key = KEY_INSERT },
295 /*[41] = { Name = "Middle Mouse", Key = MOUSE_MIDDLE },
296 [42] = { Name = "Left Mouse", Key = MOUSE_LEFT },
297 [43] = { Name = "Right Mouse", Key = MOUSE_RIGHT },
298 [44] = { Name = "Mouse 4", Key = MOUSE_4 },
299 [45] = { Name = "Mouse 5", Key = MOUSE_5 },
300 [46] = { Name = "Mouse First", Key = MOUSE_FIRST },
301 [46] = { Name = "Mouse Last", Key = MOUSE_LAST },
302 [46] = { Name = "Mouse Wheel Up", Key = MOUSE_WHEEL_UP },
303 [46] = { Name = "Mouse Wheel Down", Key = MOUSE_WHEEL_DOWN },*/
304}
305
306snixzz.DefaultConfig = G.file.Read( snixzz.DataFolder .. "/defaultconfig.txt", "DATA" ) or "default"
307
308// nospread shit
309snixzz.RecoilBackup = {}
310snixzz.Bullets = {}
311
312snixzz.BadWeapons = {
313 ["gmod_tool"] = true,
314 ["gmod_camera"] = true,
315 ["weapon_physgun"] = true,
316 ["weapon_crowbar"] = true,
317 ["keys"] = true,
318 ["pocket"] = true,
319}
320
321snixzz["Colors"] = {
322 ["White"] = Color( 255, 255, 255, 255 ),
323 ["Black"] = Color( 0, 0, 0, 255 ),
324 ["Green"] = Color( 0, 255, 0, 255 ),
325 ["Red"] = Color( 255, 0, 0, 255 ),
326 ["DarkRed"] = Color( 200, 50, 50, 255 ),
327 ["Cyan"] = Color( 0, 255, 255, 255 ),
328 ["Purple"] = Color( 255, 0, 255 ),
329}
330
331snixzz.AdminGroups = {
332 ["trialmod"] = true,
333 ["tmod"] = true,
334 ["trial-mod"] = true,
335 ["trialmoderator"] = true,
336 ["t-mod"] = true,
337 ["mod"] = true,
338 ["moderator"] = true,
339 ["operator"] = true,
340 ["vipmod"] = true,
341 ["vipmoderator"] = true,
342 ["admin"] = true,
343 ["vipadmin"] = true,
344 ["head-admin"] = true,
345 ["headadmin"] = true,
346 ["manager"] = true,
347 ["developer"] = true,
348 ["dev"] = true,
349 ["superadmin"] = true,
350 ["sadmin"] = true,
351 ["super"] = true,
352 ["vipsuperadmin"] = true, -- i cry
353 ["owner"] = true,
354 ["root_user"] = true,
355 ["vipowner"] = true, -- wouldn't be surprised it
356 ["doubleadmin"] = true, -- what the fuck is this
357}
358
359G.surface.CreateFont( "snixzz_status", { font = "coolvetica", size = 20, antialias = true } ) -- HudHintTextLarge
360G.surface.CreateFont( "snixzz_logo", { size = 25, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
361G.surface.CreateFont( "snixzz_logo_small", { size = 13, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
362G.surface.CreateFont( "ESPFont", { size = 14, weight = 200, antialias = false, shadow = true, font = "Arial" } )
363
364/* General notification/display functions */
365
366local sound
367function snixzz.Sound( Error )
368
369 if Error then
370
371 sound = G.Sound( "/HL1/fvox/buzz.wav" )
372
373 else
374
375 sound = G.Sound( "/buttons/button17.wav" )
376
377 end
378
379 local createSound = G.CreateSound( G.LocalPlayer(), sound )
380 createSound:Play()
381
382end
383
384function snixzz.AddToConsole( str )
385
386 if snixzz.ConsoleOpen && snixzz.cHistory && str != nil then
387
388 snixzz.cHistory:AddLine( str )
389
390 snixzz.cHistory:PerformLayout()
391 snixzz.cHistory.VBar:SetScroll( snixzz.cHistory.VBar.CanvasSize )
392
393 end
394
395 G.table.insert( snixzz.ConsoleHistory, str )
396
397end
398
399function snixzz.Message( col, text )
400
401 G.MsgC( snixzz.Colors.Cyan, "[snixzz3]: " )
402 G.MsgC( col, text .. "\n" )
403
404 snixzz.AddToConsole( text )
405
406end
407
408function snixzz.Chat( col, text, bool )
409
410 G.chat.AddText(
411
412 col, "[snixzz3]: ",
413 color_white, text
414
415 )
416
417 if !bool then
418
419 snixzz.AddToConsole( text )
420
421 end
422
423end
424
425function snixzz.ACNotify( text )
426
427 snixzz.Chat( snixzz.Colors.Red, text )
428
429 snixzz.logEvent( "anticheat", text )
430 snixzz.Sound( Error )
431
432end
433
434function snixzz.Debug( text )
435
436 snixzz.AddToConsole( text )
437
438 snixzz.logEvent( "Debug", text )
439
440end
441
442function snixzz.LogDetour( text )
443
444 snixzz.AddToConsole( text )
445
446 snixzz.logEvent( "Detour", text )
447
448end
449
450/* Detour function */
451function snixzz.Detour( Old, New )
452
453 snixzz.Detours[New] = Old
454 snixzz.AddToConsole( "Detouring function " .. G.tostring( Old ) .. "." )
455
456 return New
457end
458
459/* Module Loading */
460snixzz.Functions = {}
461snixzz.LoadedModules = {}
462
463function snixzz.IsInstalled( mod )
464
465 return G.file.Exists( "lua/bin/gmcl_" .. mod .. "_win32.dll", "GAME" )
466
467end
468
469-- ghetto module-less loading
470function snixzz.LoadModules()
471
472 -- Attempt to load modules
473 if G.system.IsWindows() then
474
475 --if snixzz.IsInstalled( "bsendpacket" ) then G.require( "bSendPacket" ) snixzz.LoadedModules["bSendPacket"] = true end
476 if snixzz.IsInstalled( "snixzz2" ) then G.require( "snixzz2" ) snixzz.LoadedModules["snixzz2"] = true end
477
478 end
479
480 -- Check & notify if the module successfully loaded
481 /*if bSendPacket != nil or !G.system.IsWindows() then
482
483 bSendPacket = true
484
485 snixzz.AddToConsole( "Successfully loaded module 'gmcl_bSendPacket_win32.dll'" )
486
487 else
488
489 bSendPacket = nil
490
491 snixzz.Chat( snixzz.Colors.Red, "Unable to load module 'gmcl_bSendPacket_win32.dll', disabling module features." )
492
493 end*/
494
495 if _G.NHTable != nil or !G.system.IsWindows() then
496
497 snixzz.Functions.PredictSpread = _G.NHTable.ZeroSpread
498 snixzz.Functions.LocalPlayer = _G.NHTable.SetLPIndex
499 snixzz.Functions.ConCommand = _G.NHTable.ClientCMD
500 snixzz.Functions.SetViewAngles = _G.NHTable.SetViewAngles
501 snixzz.Functions.NoDraw = _G.NHTable.NoDraw
502 snixzz.Functions.IsDormant = _G.NHTable.IsDormant
503 snixzz.Functions.IsVisible = _G.NHTable.IsVisible
504
505 -- C++ IsVisible func
506 snixzz.IsVisible = function( v, pos )
507
508 /*if snixzz.Bools["aim_antiantiaim"] then
509
510 snixzz.FixAngle( v )
511
512 end*/
513
514 return snixzz.Functions.IsVisible( G.LocalPlayer():GetShootPos(), pos, v:EntIndex() )
515 end
516
517 snixzz.AddToConsole( "Successfully loaded module 'gmcl_snixzz2_win32.dll'" )
518
519 _G.NHTable = nil
520
521 else
522
523 snixzz.Functions.PredictSpread = function( cmd, ang, vec ) return ang end
524 snixzz.Functions.LocalPlayer = G.LocalPlayer()
525 snixzz.Functions.ConCommand = function( cmd ) G.LocalPlayer():ConCommand( cmd ) end
526 snixzz.Functions.NoDraw = function( mat, bool ) end
527 snixzz.Functions.SetViewAngles = function( cmd, ang ) cmd:SetViewAngles( ang ) end
528 snixzz.Functions.IsDormant = function( index ) return false end
529
530 -- Lua IsVisible func
531 snixzz.Functions.IsVisible = function( shootpos, pos, v ) return false end
532
533 snixzz.IsVisible = function( v, pos )
534
535 /*if snixzz.Bools["aim_antiantiaim"] then
536
537 snixzz.FixAngle( v )
538
539 end*/
540
541 local traceTab = { start = G.LocalPlayer():GetShootPos(), endpos = pos, mask = MASK_SHOT, filter = function( entity ) return !entity:IsPlayer() end }
542 local trace = G.util.TraceLine( traceTab )
543 return !trace.Hit
544
545 end
546
547 snixzz.Chat( snixzz.Colors.Red, "Unable to load module 'gmcl_snixzz2_win32.dll', disabling module features." )
548
549 end
550
551end
552
553/*
554
555 VIP/Advertisement System/Stats
556 Fuck you, I put a lot of work into this & got like 1 $5 donation, which doesn't even cover 1% of the hosting costs.
557
558 This system is constantly being worked on.
559 I like tracking stats, there's really no reason for it I just enjoy seeing who's actually using my work.
560
561*/
562
563snixzz.Membership = "nil"
564
565function snixzz.Login( ply )
566
567 gui.EnableScreenClicker( true )
568
569 snixzz.loadFrame = G.vgui.Create( "DFrame" )
570 snixzz.loadFrame:SetTitle( "Logging in as '" .. ply:SteamID64() .. "'" )
571 snixzz.loadFrame:SetSize( 250, 50 )
572 snixzz.loadFrame:Center()
573 snixzz.loadFrame:ShowCloseButton( false )
574 snixzz.loadFrame:SetBackgroundBlur( true )
575 snixzz.loadFrame:SetDraggable( false )
576
577 snixzz.loadFrame.Paint = function( self )
578
579 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 100 ) )
580 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
581 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
582 end
583
584 snixzz.loadProgress = G.vgui.Create( "DProgress", snixzz.loadFrame )
585 snixzz.loadProgress:SetPos( 5, 22.5 )
586 snixzz.loadProgress:SetSize( snixzz.loadFrame:GetWide() - 10, snixzz.loadFrame:GetTall() - 27.5 )
587 snixzz.loadProgress:SetFraction( 0.1 )
588
589 local oSystem = "Unknown"
590 local oIP = "Unknown"
591
592 if system.IsWindows() then oSystem = "Windows" elseif system.IsLinux() then oSystem = "Linux" elseif system.IsOSX() then oSystem = "OSX" else oSystem = "Unknon" end
593
594 snixzz.loadProgress:SetFraction( 0.2 )
595
596 snixzz.loadFrame:SetTitle( "Connecting to login server" )
597
598 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/register.php?steamid=" .. ply:SteamID64() .. "&os=" .. oSystem, -- stop spamming this faggots
599
600 function( body )
601
602 snixzz.loadFrame:SetTitle( "Connected, getting user info." )
603
604 if body == "Error: Banned" then
605
606 snixzz.Ban( ply, "ip" )
607
608 return
609
610 end
611
612 local tab = util.JSONToTable( body )
613
614 if istable( tab ) then
615
616 if tab.group == "dev" then
617
618 snixzz.Membership = "dev"
619
620 elseif tab.group == "vip" then
621
622 snixzz.Membership = "vip"
623
624 elseif tab.group == "user" then
625
626 snixzz.Membership = "user"
627
628 elseif tab.group == "banned" then
629
630 snixzz.Membership = "banned"
631 snixzz.Banned = true
632
633 elseif body == "Error: Invalid SteamID64" then
634
635 snixzz.Chat( Color( 255, 0, 0 ), "There was a problem with your login ID, if you believe this is an error contact 0xymoron @ http://steamcommunity.com/id/sidewaysgamingdotnet/" )
636
637 snixzz.Membership = "user"
638
639 else
640
641 snixzz.Chat( Color( 255, 0, 0 ), "Failed to fetch user data from login server, running as guest." )
642
643 snixzz.Membership = "guest"
644
645 end
646
647 snixzz.loadProgress:SetFraction( 0.3 )
648
649 snixzz.LoadCheat()
650
651 elseif string.find( body, "Error: " ) then
652
653 snixzz.Chat( Color( 255, 255, 0 ), "\n\n\n\nFailed to load, please see below for reason." )
654 snixzz.Chat( Color( 255, 0, 0 ), body )
655
656 if snixzz.loadFrame then snixzz.loadFrame:Close() gui.EnableScreenClicker( false ) end
657
658 return
659
660 else
661
662 snixzz.loadFrame:SetTitle( "Received bad login info." )
663
664 snixzz.Membership = "guest"
665
666 snixzz.Chat( Color( 255, 0, 0 ), "Received bad login response, running as guest." )
667
668 snixzz.LoadCheat()
669
670 end
671
672 end,
673
674 function( error )
675
676 snixzz.loadFrame:SetTitle( "Failed to connect to login server." )
677
678 snixzz.Membership = "guest"
679
680 snixzz.LoadCheat( true )
681
682 end
683
684 )
685
686end
687
688function snixzz.IsVIP()
689
690 return snixzz.Membership == "vip" or snixzz.Membership == "dev"
691
692end
693
694function snixzz.Stats( ply, loading, func )
695
696 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/stats.php?steamid=" .. ply:SteamID64() .. "&load=" .. tostring( loading ),
697
698 function( body )
699
700 if loading && snixzz.loadProgress then
701
702 snixzz.loadProgress:SetFraction( 0.7 )
703
704 end
705
706 if !string.find( body, "Error:" ) then
707
708 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/stats/totalruns.txt",
709
710 function( statsbody )
711
712 if loading && snixzz.loadProgress then
713
714 snixzz.loadProgress:SetFraction( 0.8 )
715
716 func()
717
718 end
719
720 snixzz.AddToConsole( "Successfully posted stats, snixzz3 has now been ran " .. string.Comma( statsbody ) .. " times." )
721
722 end,
723
724 function( error )
725
726 snixzz.Chat( Color( 255, 0, 0 ), "Failed to receive stats." )
727
728 if loading && snixzz.loadProgress then
729
730 snixzz.loadProgress:SetFraction( 0.8 )
731
732 func()
733
734 end
735
736 end
737
738 )
739
740 else
741
742 snixzz.Chat( Color( 255, 0, 0 ), "Failed to post stats. (" .. body .. ")" )
743
744 end
745
746 end,
747
748 function( error )
749
750 snixzz.Chat( Color( 255, 0, 0 ), "Failed to post stats." )
751
752 end
753
754 )
755
756end
757
758function snixzz.OpenMOTDgdAd( bool )
759
760 local frame = vgui.Create( "DFrame" )
761 frame:SetTitle( "snixzz3 [MOTDgd.com] Advertisement | Consider donating to remove ads." )
762 frame:SetSize( ScrW() - 5, ScrH() - 80 )
763 frame:SetPos( 5, 5 )
764 frame:MakePopup()
765 frame:ShowCloseButton( false )
766 frame:SetDraggable( false )
767
768 frame.Paint = function( self )
769
770 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 150 ) )
771 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
772 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
773
774 end
775
776 local html = vgui.Create( "HTML", frame )
777 html:SetSize( frame:GetWide() - 5, frame:GetTall() - 60 )
778 html:Dock( FILL )
779 //html:OpenURL( "-snip-" )
780
781 local close = vgui.Create( "DButton" )
782 close:SetSize( ScrW() - 10, 60 )
783 close:SetPos( 5, ScrH() - 65 )
784 close:SetText( "Consider donating ($5 minimum) @ snixzz.net for VIP to remove ads!" )
785 close:SetTextColor( color_white )
786 close:SetFont( "CloseCaption_Bold" )
787 close:SetEnabled( false )
788
789 close.Paint = function( self )
790
791 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(),
792 self:GetDisabled() == true && Color( 168, 62, 62, 255 ) or self:GetDisabled() == false && Color( 62, 168, 62, 255 )
793 )
794
795 end
796
797 close.DoClick = function( self ) frame:Close() self:Remove() end
798
799 timer.Simple( 20, function()
800
801 close:SetEnabled( true )
802 close:SetText( "Close" )
803 frame:ShowCloseButton( true )
804
805 if bool then
806
807 snixzz.LoadAllFunctions()
808
809 end
810
811 end )
812
813end
814
815snixzz.ACStatus = { -- this is outdated
816 ["CAC"] = "DETECTED",
817 ["LeyAC"] = "DETECTED",
818 ["TAC v4"] = "UNDETECTED",
819 ["HERP-AC"] = "BYPASSED",
820 ["TAC v2"] = "BYPASSED",
821 ["QAC"] = "BYPASSED",
822 ["VAC"] = "UNDETECTED", -- Shut up, it does exist. it's a tiny blacklist.
823 ["GAC"] = "UNDETECTED",
824 ["Kevlar"] = "UNDETECTED",
825 ["Daz's AC"] = "UNDETECTED",
826 ["GModZ AC"] = "UNDETECTED",
827 ["VBAC"] = "UNDETECTED",
828 ["DivinityRP AC"] = "BYPASSED",
829}
830
831/*
832 Logging system
833*/
834snixzz.NoLog = { -- Types of logs to not save in data/
835 ["Setting"] = true,
836 ["Load"] = true,
837 ["Detours"] = true,
838 ["Config"] = true,
839 ["Info"] = true,
840 ["debug"] = true,
841 ["Timer"] = true,
842 ["Hook"] = true,
843 ["Main"] = true,
844}
845
846snixzz.Lines = {}
847function snixzz.logEvent( Type, str )
848
849 G.table.insert( snixzz.Lines, str )
850 if snixzz.LogTab then
851 snixzz.LogTab:AddLine( str )
852 end
853
854 if !snixzz.NoLog[Type] then
855 local logFile = "[" .. G.os.date() .. "] " .. str .. "\n"
856 G.file.Append( snixzz.DataFolder .. "/logs/" .. Type .. ".txt", logFile )
857 end
858
859end
860
861/* Anti-Cheat bypass functions */
862-- This is all really outdated. TODO: Update thhis
863snixzz.Backup = {}
864function snixzz.AntiCheats()
865
866 -- HERP-AC c+p shitty ac
867 if _G.CheckVars then
868
869 snixzz.ACNoitfy( "function CheckVars exists, detouring the scan." )
870
871 _G.CheckVars = snixzz.Detour( _G.CheckVars, function()
872
873 snixzz.Chat( Color( 50, 255, 50 ), "HERP-AC attempted to scan cvars, stopping that..." )
874
875 end )
876
877 end
878
879 -- Tyler's Anti-Cheat v2 (shameless bypass of my own anti-cheat)
880 if _G.RunCheck then
881
882 snixzz.ACNoitfy( "function RunCheck exists, detouring." )
883
884 _G.RunCheck = snixzz.Detour( _G.RunCheck, function()
885
886 snixzz.Chat( Color( 50, 255, 50 ), "TAC attempted to run a check, returning no information." )
887
888 end )
889
890 end
891
892 -- Some shitty PERP anti-cheat
893 G.concommand.Remove( "0_u_found" )
894 G.concommand.Add( "0_u_found", function()
895
896 snixzz.ACNoitfy( "anti-cheat concommand 0_u_found blocked" )
897
898 end )
899
900 G.hook.Remove( "InitPostEntity", "detrp" )
901
902 -- Anti-cheat current detection status
903 /*for k, v in G.pairs( snixzz.ACStatus ) do
904
905 G.MsgC( Color( 255, 150, 0 ), "[snixzz3]: " )
906 G.MsgC( Color( 255, 255, 255 ), k .. ": " )
907
908 if v == "DETECTED" then
909
910 G.MsgC( Color( 255, 0, 0 ), v .. "\n" )
911
912 elseif v == "BYPASSED" then
913
914 G.MsgC( Color( 255, 255, 0 ), v .. "\n" )
915
916 elseif v == "UNDETECTED" then
917
918 G.MsgC( Color( 0, 255, 0 ), v .. "\n" )
919
920 end
921
922 end*/
923
924 G.hook.Remove( "OnGamemodeLoaded", "___scan_g_init" )
925 G.hook.GetTable()["OnGamemodeLoaded"]["___scan_g_init"] = function() end
926
927end
928
929-- TODO: Add runstring section to menu
930local compiledString
931function snixzz.RunString( str )
932
933 compiledString = G.CompileString( str, "[C]", false )
934
935 if G.type( compiledString ) == "string" then
936
937 snixzz.Chat( Color( 0, 255, 255 ), "Failed to run Lua. '" .. str .. "'" )
938
939 return
940 end
941
942 compiledString()
943
944end
945
946local Name
947snixzz.Hooks = {}
948function snixzz.AddHook( Type, Func )
949
950 Name = G.tostring( Func )
951 snixzz.AddToConsole( "Adding unsecure hook '" .. Name .. "'" )
952 snixzz.Hooks[Type] = Name
953
954 return G.hook.Add( Type, Name, Func )
955end
956
957snixzz.TimerCache = {}
958function snixzz.RegisterTimer( delay, rep, func )
959
960 Name = G.tostring( func )
961 snixzz.AddToConsole( "Adding timer " .. Name .. " with delay '" .. G.tostring( delay ) .. "'" )
962 G.table.insert( snixzz.TimerCache, Name )
963
964 return G.timer.Create( Name, delay, rep, func )
965end
966
967/*
968
969 Settings & Menu backend.
970 Config system recycled from hake v2
971 Re-wrote a bit of it.
972
973*/
974
975function snixzz.CreateOption( dtype, parent, oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec, func )
976
977 local addx, addy = 3, 3.5
978
979 if dtype == "Checkbox" then
980 dtype = "DCheckBoxLabel"
981 local text, bool, x, y = oText, oBool, xPos, yPos
982 local checkbox = G.vgui.Create( dtype, parent )
983 checkbox:SetText( text )
984 checkbox:SetPos( x + addx, y + addy )
985 checkbox:SizeToContents()
986 checkbox:SetTextColor( G.color_white )
987 checkbox:SetChecked( snixzz.Bools[bool] )
988 checkbox.OnChange = function( check )
989 snixzz.Bools[bool] = checkbox:GetChecked()
990 end
991
992 elseif dtype == "Slider" then
993 dtype = "DNumSlider"
994 local text, var, min, max, wide, x, y, Dec = oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec
995 local slider = G.vgui.Create( dtype, parent )
996 slider:SetPos( x + addx, y + addy )
997 slider:SetWide( wide )
998 slider:SetText( text )
999 slider:SetMin( min )
1000 slider:SetMax( max )
1001 slider:SetDecimals( Dec )
1002 slider:SetValue( snixzz.Vars[var] )
1003 slider.OnValueChanged = function( p, v )
1004 snixzz.Vars[var] = v
1005 end
1006
1007 elseif dtype == "Label" then
1008 dtype = "DLabel"
1009 local text, x, y = oText, oBool, xPos
1010 local label = G.vgui.Create( dtype, parent )
1011 label:SetPos( x, y )
1012 label:SetText( text )
1013 label:SizeToContents()
1014 label:SetTextColor( G.color_white )
1015
1016 end
1017
1018end
1019
1020function snixzz.ConfigExists( cfg )
1021
1022 if G.file.Exists( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) then
1023
1024 return true
1025
1026 else
1027
1028 return false
1029
1030 end
1031end
1032
1033function snixzz.SaveConfig( cfg )
1034
1035 local save = {}
1036 save.Vars = snixzz.Vars
1037 save.Bools = snixzz.Bools
1038 save.Binds = snixzz.Binds
1039 save.Entities = snixzz.Entities
1040 save.Friends = snixzz.Friends
1041 cfg = G.string.gsub( cfg, " ", "_" )
1042
1043 if !snixzz.ConfigExists( cfg ) then
1044
1045 G.table.insert( snixzz.Configs, cfg )
1046 G.file.Write( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
1047 snixzz.Chat( snixzz.Colors.Green, "Created config " .. cfg .. "!" )
1048
1049 snixzz.LoadConfig( cfg )
1050
1051 else
1052
1053 snixzz.Chat( snixzz.Colors.Red, "Config " .. cfg .. " already exists!" )
1054
1055 end
1056
1057end
1058
1059function snixzz.UpdateConfig()
1060
1061 local cfg = snixzz.CurrentConfig
1062
1063 if cfg != "default" then
1064
1065 if snixzz.ConfigExists( cfg ) then
1066
1067 local save = {}
1068 save.Vars = snixzz.Vars
1069 save.Bools = snixzz.Bools
1070 save.Binds = snixzz.Binds
1071 save.Entities = snixzz.Entities
1072 save.Friends = snixzz.Friends
1073 G.file.Write( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
1074 snixzz.Chat( snixzz.Colors.Green, "Updated '" .. cfg .. "' with current settings" )
1075
1076 else
1077
1078 snixzz.Chat( snixzz.Colors.Red, "Config " .. cfg .. " wasn't found!" )
1079
1080 end
1081
1082 else
1083
1084 snixzz.Chat( snixzz.Colors.Red, "You can't modify 'default' config!" )
1085
1086 end
1087
1088end
1089
1090function snixzz.LoadConfig( cfg, bool )
1091
1092 cfg = G.string.lower( cfg )
1093
1094 if snixzz.CurrentConfig != cfg then
1095
1096 if snixzz.ConfigExists( cfg ) then
1097
1098 local ToRead = G.util.JSONToTable( G.file.Read( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) )
1099 snixzz.Vars = ToRead.Vars
1100 snixzz.Bools = ToRead.Bools
1101 snixzz.Binds = ToRead.Binds
1102 snixzz.Entities = ToRead.Entities
1103 snixzz.Friends = ToRead.Friends
1104 snixzz.CurrentConfig = cfg
1105
1106 if !bool then -- ignore chat on first load
1107 snixzz.Chat( snixzz.Colors.Green, "Loaded config '" .. cfg .. "'" )
1108 end
1109
1110 else
1111
1112 snixzz.LoadConfig( "default" )
1113 snixzz.CurrentConfig = "default"
1114 snixzz.Chat( Color( 255, 0, 0 ), "Invalid config file! '" .. cfg .. "' Loading default!" )
1115
1116 end
1117
1118 else
1119
1120 snixzz.Chat( snixzz.Colors.Red, "Config " .. cfg .. " is already loaded!" )
1121
1122 end
1123
1124end
1125
1126function snixzz.DeleteConfig( cfg )
1127
1128 cfg = G.string.lower( cfg )
1129
1130 if cfg != snixzz.DefaultConfig then
1131
1132 if G.file.Exists( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) then
1133
1134 G.file.Delete( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt" )
1135 snixzz.Chat( snixzz.Colors["DarkRed"], "Deleted config '" .. cfg .. "'" )
1136
1137 else
1138
1139 snixzz.Chat( Color( 255, 0, 0 ), "Unable to find config " .. cfg "!" )
1140
1141 end
1142
1143 else
1144
1145 snixzz.Chat( snixzz.Colors["Red"], "You cannot delete the default config!" )
1146
1147 end
1148end
1149
1150function snixzz.RenameConfig( Old, New )
1151
1152 New = G.string.gsub( New, " ", "_" )
1153 New = G.string.lower( New )
1154
1155 if Old != snixzz.DefaultConfig then
1156
1157 if !snixzz.ConfigExists( New ) then
1158
1159 local OldConfig = G.file.Read( snixzz.DataFolder .. "/configs/" .. Old .. ".txt", "DATA" )
1160
1161 if snixzz.ConfigExists( Old ) then
1162
1163 G.file.Delete( snixzz.DataFolder .. "/configs/" .. Old .. ".txt", "DATA" )
1164
1165 end
1166
1167 G.file.Write( snixzz.DataFolder .. "/configs/" .. New .. ".txt", OldConfig )
1168 snixzz.Chat( snixzz.Colors["DarkRed"], "Renamed " .. Old .. " to " .. New .. "." )
1169
1170 else
1171
1172 snixzz.Chat( Color( 255, 0, 0 ), "Config " .. New .. " already exists! Pick a different name." )
1173
1174 end
1175
1176 else
1177
1178 snixzz.Chat( snixzz.Colors["Red"], "You cannot rename the default config!" )
1179
1180 end
1181
1182end
1183
1184function snixzz.SetDefaultConfig( cfg )
1185
1186 if cfg != snixzz.DefaultConfig then
1187
1188 if snixzz.ConfigExists( cfg ) then
1189
1190 snixzz.DefaultConfig = cfg
1191 G.file.Write( snixzz.DataFolder .. "/defaultconfig.txt", snixzz.DefaultConfig )
1192 snixzz.Chat( Color( 255, 255, 0 ), "Set '" .. cfg .. "' as the default config." )
1193
1194 else
1195
1196 snixzz.Chat( Color( 255, 0, 0 ), "'" .. cfg .. "' is not a valid config!" )
1197
1198 end
1199
1200 else
1201
1202 snixzz.Chat( Color( 255, 0, 0 ), "'" .. cfg .. "' is already the default config!" )
1203
1204 end
1205
1206end
1207
1208function snixzz.BindKey( Bind, Key, bool )
1209
1210 -- Console binding, ignore checks.
1211 if bool then
1212
1213 if G[Key] then
1214
1215 if snixzz.Binds[Bind] then
1216
1217 snixzz.Binds[Bind] = G[Key]
1218 snixzz.Chat( snixzz.Colors.Green, "Bound " .. Bind .. " to " .. Key .. "!" )
1219
1220 else
1221
1222 snixzz.Chat( snixzz.Colors.Red, "'" .. Bind .. "' is an unknown command!" )
1223
1224 end
1225
1226 else
1227
1228 snixzz.Chat( snixzz.Colors.Red, "'" .. Key .. "' is an unknown key!" )
1229
1230 end
1231
1232 return
1233
1234 end
1235
1236 if snixzz.Binds[Bind] then
1237
1238 for _, v in G.pairs( snixzz.Keys ) do
1239
1240 if Key == v.Name then
1241
1242 snixzz.Binds[Bind] = v.Key
1243 snixzz.Chat( snixzz.Colors.Green, "Bound " .. Bind .. " to " .. Key .. "!" )
1244
1245 end
1246
1247 end
1248
1249 end
1250
1251end
1252
1253-- TODO: use this somewhere
1254function snixzz.Unbind( Bind )
1255
1256 if snixzz.Binds[Bind] then
1257
1258 snixzz.Binds[Bind] = KEY_NONE
1259 snixzz.Chat( snixzz.Colors.Green, "Unbound " .. Bind .. "!" )
1260
1261 else
1262
1263 snixzz.Chat( snixzz.Colors.Red, "Failed to find command '" .. Bind .. "'" )
1264
1265 end
1266
1267end
1268
1269function snixzz.GetConfigs()
1270
1271 local files = G.file.Find( snixzz.DataFolder .. "/configs/*.txt", "DATA")
1272
1273 for k, v in G.pairs( files ) do
1274
1275 files[k] = G.string.Replace( v, ".txt", "" )
1276
1277 end
1278
1279 return files
1280end
1281
1282-- Update all configs to work with the newest version of the cheat.
1283snixzz.UpdatedCfgs = {}
1284function snixzz.UpdateAllConfigs() -- Update outdated configs to the new version.
1285
1286 for _, cfg in G.next, snixzz.Configs do
1287
1288 if snixzz.ConfigExists( cfg ) then
1289
1290 local json = G.util.JSONToTable( G.file.Read( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) )
1291
1292 -- Check Binds
1293 for k, v in G.next, snixzz.Binds do
1294
1295 if json.Binds[k] == nil then
1296
1297 json.Binds[k] = v
1298
1299 snixzz.Message( snixzz.Colors.White, "Added bind '" .. k .. "' to config '" .. cfg .. "'" )
1300
1301 if !snixzz.UpdatedCfgs[cfg] then snixzz.UpdatedCfgs[cfg] = true end
1302
1303 end
1304
1305 end
1306
1307 -- Check Bools
1308 for k, v in G.next, snixzz.Bools do
1309
1310 if json.Bools[k] == nil then
1311
1312 json.Bools[k] = v
1313
1314 snixzz.Message( snixzz.Colors.White, "Added bool '" .. k .. "' to config '" .. cfg .. "'" )
1315
1316 if !snixzz.UpdatedCfgs[cfg] then snixzz.UpdatedCfgs[cfg] = true end
1317
1318 end
1319
1320 end
1321
1322 -- Check Vars
1323 for k, v in G.next, snixzz.Vars do
1324
1325 if json.Vars[k] == nil then
1326
1327 json.Vars[k] = v
1328
1329 snixzz.Message( snixzz.Colors.White, "Added var '" .. k .. "' to config '" .. cfg .. "'" )
1330
1331 if !snixzz.UpdatedCfgs[cfg] then snixzz.UpdatedCfgs[cfg] = true end
1332
1333 end
1334
1335 end
1336
1337 if snixzz.UpdatedCfgs[cfg] then
1338
1339 G.file.Write( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", G.util.TableToJSON( json ) )
1340
1341 snixzz.Chat( snixzz.Colors.Green, "Successfully updated config '" .. cfg .. "' with the newest settings." )
1342
1343 end
1344
1345 end
1346
1347 end
1348
1349end
1350
1351/*
1352
1353 filesystem
1354
1355*/
1356
1357snixzz.DataFiles = {
1358 "defaultconfig.txt",
1359 "logs/Main.txt",
1360 "logs/AntiCheat.txt",
1361 "logs/Detour.txt",
1362 "logs/Debug.txt",
1363}
1364snixzz.DataFolders = {
1365 "configs",
1366 "logs",
1367}
1368
1369function snixzz.FileSystem()
1370
1371 if !G.file.IsDir( snixzz.DataFolder, "DATA" ) then
1372
1373 G.file.CreateDir( snixzz.DataFolder )
1374 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "' main data folder." )
1375
1376 end
1377
1378 for k, v in G.next, snixzz.DataFolders do
1379
1380 if !G.file.IsDir( snixzz.DataFolder .. "/" .. v, "DATA" ) then
1381
1382 G.file.CreateDir( snixzz.DataFolder .. "/" .. v )
1383 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "/" .. v .. "' data folder." )
1384
1385 end
1386
1387 end
1388
1389 for k, v in G.next, snixzz.DataFiles do
1390
1391 if !G.file.Exists( snixzz.DataFolder .. "/" .. v, "DATA" ) then
1392
1393 G.file.Write( snixzz.DataFolder .. "/" .. v, G.Either( v == "defaultconfig.txt", snixzz.DefaultConfig, "=== snixzz3 by 0xymoron ===\n\n" ) ) -- This is a cool function.
1394
1395 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "/" .. v .. "' data file." )
1396
1397 end
1398
1399 end
1400
1401end
1402
1403/*
1404 ESP functions
1405*/
1406
1407-- borrowed from snipwnage2's cheat with permission
1408function snixzz.GetBounds( v )
1409
1410 local eyePos = v:EyeAngles()
1411 local min = v:OBBMins()
1412 local max = v:OBBMaxs()
1413
1414 local corners = {
1415
1416 G.Vector( min.x, min.y, min.z ),
1417 G.Vector( min.x, min.y, max.z ),
1418 G.Vector( min.x, max.y, min.z ),
1419 G.Vector( min.x, max.y, max.z ),
1420 G.Vector( max.x, min.y, min.z ),
1421 G.Vector( max.x, min.y, max.z ),
1422 G.Vector( max.x, max.y, min.z ),
1423 G.Vector( max.x, max.y, max.z ),
1424
1425 }
1426
1427 local minx = G.math.huge
1428 local miny = G.math.huge
1429 local maxx = -G.math.huge
1430 local maxy = -G.math.huge
1431
1432 for _, corner in G.next, corners do
1433
1434 local screen = v:LocalToWorld( corner ):ToScreen()
1435 minx = G.math.min( minx, screen.x )
1436 miny = G.math.min( miny, screen.y )
1437 maxx = G.math.max( maxx, screen.x )
1438 maxy = G.math.max( maxy, screen.y )
1439
1440 end
1441
1442 return minx, miny, maxx, maxy
1443end
1444
1445-- Thanks gmod wiki!
1446function snixzz.DrawOutlinedBox( x, y, w, h, thickness, color )
1447
1448 G.surface.SetDrawColor( color )
1449
1450 for i = 0, thickness - 1 do
1451
1452 G.surface.DrawOutlinedRect( x + i, y + i, w - i * 2, h - i * 2 )
1453
1454 end
1455
1456end
1457
1458function snixzz.IsAdmin( v )
1459
1460 if v:IsAdmin() then
1461
1462 return true
1463
1464 end
1465
1466 if snixzz.AdminGroups[v:GetUserGroup()] then
1467
1468 return true
1469
1470 end
1471
1472end
1473
1474function snixzz.ShouldDraw( v )
1475
1476 // better fps maybe
1477 local distance = v:GetPos():Distance( G.LocalPlayer():GetPos() )
1478
1479 if snixzz.Vars["esp_distance"] != 0 && distance >= snixzz.Vars["esp_distance"] then
1480
1481 return false
1482
1483 end
1484
1485 if !v:IsPlayer() or !v:Alive() or v == G["LocalPlayer"]() then
1486
1487 return false
1488
1489 end
1490
1491 if ( v:Team() == TEAM_SPECTATOR or G.string.find( G.team.GetName( v:Team() ), "spectator" ) ) then
1492
1493 return false
1494
1495 end
1496
1497 if snixzz.Functions.IsDormant( v:EntIndex() ) then
1498
1499 return false
1500
1501 end
1502
1503 return true
1504end
1505
1506/********************/
1507/* */
1508/* Aimbot functions */
1509/* */
1510/********************/
1511
1512
1513-- sloppy ass isvalid function
1514function snixzz.IsValid( v, Type )
1515
1516 if !G.IsValid( v ) or v == G.LocalPlayer() then
1517
1518 return false
1519
1520 end
1521
1522 if Type then
1523
1524 if Type == "Aimbot" then
1525
1526 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
1527
1528 if v:IsPlayer() then
1529
1530 if v:Team() == TEAM_SPECTATOR or v:Team() == TEAM_UNASSIGNED then return false end
1531
1532 if v == LocalPlayer() then return false end -- Duh
1533
1534 elseif snixzz.IsProp( v ) then
1535
1536 local owner = v:GetOwner()
1537
1538 if owner == LocalPlayer() then return false end
1539
1540 end
1541
1542 if LocalPlayer():GetClass() == "ph_prop" then
1543
1544 return false
1545
1546 end
1547
1548 if !snixzz.IsProp( v ) && !v:IsPlayer() then
1549
1550 return false
1551
1552 end
1553
1554 if v:IsPlayer() && v:Team() == TEAM_HUNTERS then
1555
1556 return false
1557
1558 end
1559
1560 elseif snixzz.Vars["aim_target_type"] == "NPC" && !v:IsNPC() then
1561
1562 return false
1563
1564 elseif snixzz.Vars["aim_target_type"] == "Players" && !v:IsPlayer() then
1565
1566 return false
1567
1568 elseif snixzz.Vars["aim_target_type"] == "Both" && !v:IsPlayer() && !v:IsNPC() then
1569
1570 return false
1571
1572 end
1573
1574 elseif Type == "Triggerbot" then
1575
1576 if snixzz.Vars["misc_triggerbot_type"] == "NPC" && !v:IsNPC() then
1577
1578 return false
1579
1580 elseif snixzz.Vars["misc_triggerbot_type"] == "Players" && !v:IsPlayer() then
1581
1582 return false
1583
1584 elseif snixzz.Vars["misc_triggerbot_type"] == "Both" && !v:IsPlayer() && !v:IsNPC() then
1585
1586 return false
1587
1588 end
1589
1590 elseif Type == "ESP" then
1591
1592 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
1593
1594 if v:IsPlayer() then
1595
1596 if v:Team() == TEAM_SPECTATOR or v:Team() == TEAM_UNASSIGNED then return false end
1597
1598 if v == LocalPlayer() then return false end -- Duh
1599
1600 elseif snixzz.IsProp( v ) then
1601
1602 local owner = v:GetOwner()
1603
1604 if owner == LocalPlayer() then return false end
1605
1606 end
1607
1608 if !snixzz.IsProp( v ) && !v:IsPlayer() then
1609
1610 return false
1611
1612 end
1613
1614 if v:IsPlayer() && !snixzz.IsProp( v ) && v:Team() == TEAM_PROPS then
1615
1616 return false
1617
1618 end
1619
1620 elseif snixzz.Vars["esp_type"] == "NPC" && !v:IsNPC() then
1621
1622 return false
1623
1624 elseif snixzz.Vars["esp_type"] == "Players" && !v:IsPlayer() then
1625
1626 return false
1627
1628 elseif snixzz.Vars["esp_type"] == "Entities" && !snixzz.Entities[v:GetClass()] then
1629
1630 return false
1631
1632 elseif snixzz.Vars["esp_type"] == "All" && !snixzz.Entities[v:GetClass()] && !v:IsPlayer() && !v:IsNPC() then
1633
1634 return false
1635
1636 end
1637
1638 local distance = v:GetPos():Distance( G.LocalPlayer():GetPos() )
1639
1640 if snixzz.Vars["esp_distance"] != 0 && distance >= snixzz.Vars["esp_distance"] then
1641
1642 return false
1643
1644 end
1645
1646 end
1647
1648 end
1649
1650 -- IsDormant check
1651 if snixzz["IsDormant"]( v:EntIndex() ) && !snixzz.IsProp( v ) then
1652
1653 return false
1654
1655 end
1656
1657 if Type == nil or Type != "ESP" then
1658
1659 if v:GetMoveType() == 0 && !snixzz.IsProp( v ) then
1660
1661 return false
1662
1663 end
1664
1665 // visible check
1666 if !snixzz.Bools["aim_ignorelos"] then
1667
1668 if !snixzz.IsVisible( v, snixzz.GetPos( v ) ) then
1669
1670 return false
1671
1672 end
1673
1674 end
1675
1676 -- field of view
1677 if snixzz.Bools["aim_checkfov"] then
1678
1679 if !snixzz.InFov( v ) then
1680
1681 return false
1682
1683 end
1684
1685 end
1686
1687 end
1688
1689 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
1690
1691 if snixzz.IsProp( v ) && v:Health() < 0 then
1692
1693 return false
1694
1695 elseif v:IsPlayer() && !v:Alive() then
1696
1697 return false
1698
1699 end
1700
1701 elseif v:IsNPC() then
1702
1703 if v:Health() < 1 then
1704
1705 return false
1706
1707 end
1708
1709 elseif v:IsPlayer() then
1710
1711 if Type == nil or Type != "ESP" then
1712
1713 -- ignore admins
1714 if snixzz.Bools["aim_ignoreadmins"] then
1715
1716 if snixzz.IsAdmin( v ) then
1717
1718 return false
1719
1720 end
1721
1722 end
1723
1724 -- ignore friends
1725 if snixzz.Bools["aim_ignorefriends"] then
1726
1727 if snixzz.Friends[v:Nick()] then
1728
1729 return false
1730
1731 end
1732
1733 end
1734
1735 -- Ignore bots
1736 if snixzz.Bools["aim_ignorebots"] && v:IsBot() then
1737
1738 return false
1739
1740 end
1741
1742 if v:InVehicle() then
1743
1744 return false
1745
1746 end
1747
1748 -- No noclip glitchers please
1749 if G.GetConVarNumber( "sbox_noclip" ) == 0 && v:GetMoveType() == MOVETYPE_NOCLIP then
1750
1751 return false
1752
1753 end
1754
1755 -- Ignore Steam friends
1756 if snixzz.Bools["aim_ignoresteam"] then
1757
1758 if v:GetFriendStatus() == "friend" then
1759
1760 return false
1761
1762 end
1763
1764 end
1765
1766 -- Friendly Fire
1767 if snixzz.Bools["aim_ignoreteam"] then
1768
1769 if ( v:Team() == G.LocalPlayer():Team() ) then
1770
1771 return false
1772
1773 end
1774
1775 end
1776
1777 // ignore T buddies
1778 if snixzz.Bools["aim_ignoretraitors"] && snixzz.IsTTT then
1779
1780 if ( G.LocalPlayer():IsTraitor() && v:IsTraitor() ) then
1781
1782 return false
1783
1784 end
1785
1786 end
1787
1788 // Target only traitors
1789 if snixzz.Bools["aim_onlytraitors"] && snixzz.IsTTT then
1790
1791 if !snixzz.IsTraitor( v ) then
1792
1793 return false
1794
1795 end
1796
1797 end
1798
1799
1800 // spawn protection
1801 local col = v:GetColor()
1802
1803 if col.a < 255 then
1804
1805 return false
1806
1807 end
1808
1809 if G.LocalPlayer():GetColor().a < 255 then
1810
1811 return false
1812
1813 end
1814
1815 end
1816
1817 if !v:Alive() then
1818
1819 return false
1820
1821 end
1822
1823 -- Spectator check
1824 if v:GetMoveType() == MOVETYPE_OBSERVER or v:Team() == TEAM_SPECTATOR then
1825
1826 return false
1827
1828 end
1829
1830 end
1831
1832 return true
1833end
1834
1835
1836snixzz.Cones = {
1837
1838 ["HL2"] = {
1839 ["weapon_pistol"] = G.Vector( 0.01, 0.01, 0.01 ),
1840 ["weapon_smg1"] = G.Vector( 0.04362, 0.04362, 0.04362 ),
1841 ["weapon_ar2"] = G.Vector( 0.02618, 0.02618, 0.02618 ),
1842 ["weapon_shotgun"] = G.Vector( 0.08716, 0.08716, 0.08716 ),
1843 },
1844
1845 ["Normal"] = {}
1846
1847}
1848
1849snixzz.SimpleSpread = {
1850
1851 ["weapon_cs_base"] = true,
1852 ["weapon_zs_base"] = true,
1853
1854}
1855
1856local wepCone
1857function snixzz.GetCone( wep )
1858
1859 if !G.IsValid( wep ) then
1860
1861 return 0
1862
1863 end
1864
1865 if snixzz.Cones.Normal[wep:GetClass()] then
1866
1867 return snixzz.Cones.Normal[wep:GetClass()]
1868
1869 elseif snixzz.SimpleSpread[wep.Base] then
1870
1871 return wep.Cone or wep.Primary.Cone or 0
1872
1873 elseif snixzz.Cones.HL2[wep:GetClass()] then
1874
1875 return snixzz.Cones.HL2[wep:GetClass()]
1876
1877 else
1878
1879 wepCone = wep.Cone
1880
1881 if !wepCone then
1882
1883 wepCone = wep.Primary && wep.Primary.Cone or 0
1884
1885 end
1886
1887 end
1888
1889 return wepCone or 0
1890
1891end
1892
1893local spreadCone = G.Vector( 0, 0, 0 )
1894local getCone = G.Vector( 0, 0, 0 )
1895
1896function snixzz.PredictSpread( cmd, ang )
1897
1898 local wep = G.LocalPlayer():GetActiveWeapon() or NULL
1899
1900 if !G.IsValid( wep ) then
1901
1902 return ang
1903
1904 end
1905
1906 if G.type( wep.Initialize ) == "function" then
1907
1908 getCone = snixzz.GetCone( wep )
1909
1910 if G.type( getCone ) == "number" then
1911
1912 spreadCone = G.Vector( -getCone, -getCone, -getCone )
1913
1914 elseif G.type( getCone ) == "Vector" then
1915
1916 spreadCone = getCone * -1
1917
1918 end
1919
1920 else
1921
1922 if snixzz.Cones.HL2[wep:GetClass()] then
1923
1924 spreadCone = snixzz.Cones.HL2[wep:GetClass()]
1925
1926 end
1927
1928 end
1929
1930 return snixzz.Functions.PredictSpread( cmd, ang, spreadCone )
1931end
1932
1933
1934local wep
1935local punchAngle
1936
1937function snixzz.CorrectRecoil( ucmd )
1938
1939 wep = G.LocalPlayer():GetActiveWeapon()
1940
1941 if G.IsValid( wep ) then
1942
1943 if snixzz.Cones.HL2[wep:GetClass()] then
1944
1945 punchAngle = ucmd:GetViewAngles() - G.LocalPlayer():GetPunchAngle()
1946 snixzz.Functions.SetViewAngles( ucmd, punchAngle )
1947
1948 end
1949
1950 end
1951
1952end
1953
1954snixzz.NPCModels = {
1955
1956 ["models/combine_scanner.mdl"] = "Scanner.Body",
1957 ["models/hunter.mdl"] = "MiniStrider.body_joint",
1958 ["models/combine_turrets/floor_turret.mdl"] = "Barrel",
1959 ["models/dog.mdl"] = "Dog_Model.Eye",
1960 ["models/antlion.mdl"] = "Antlion.Body_Bone",
1961 ["models/antlion_guard.mdl"] = "Antlion_Guard.Body",
1962 ["models/antlion_worker.mdl"] = "Antlion.Head_Bone",
1963 ["models/zombie/fast_torso.mdl"] = "ValveBiped.HC_BodyCube",
1964 ["models/zombie/fast.mdl"] = "ValveBiped.HC_BodyCube",
1965 ["models/headcrabclassic.mdl"] = "HeadcrabClassic.SpineControl",
1966 ["models/headcrabblack.mdl"] = "HCBlack.body",
1967 ["models/headcrab.mdl"] = "HCFast.body",
1968 ["models/zombie/poison.mdl"] = "ValveBiped.Headcrab_Cube1",
1969 ["models/zombie/classic.mdl"] = "ValveBiped.HC_Body_Bone",
1970 ["models/zombie/classic_torso.mdl"] = "ValveBiped.HC_Body_Bone",
1971 ["models/zombie/zombie_soldier.mdl"] = "ValveBiped.HC_Body_Bone",
1972 ["models/combine_strider.mdl"] = "Combine_Strider.Body_Bone",
1973 ["models/lamarr.mdl"] = "HeadcrabClassic.SpineControl",
1974 ["models/crow.mdl"] = Vector( 0, 0, 5 ),
1975 ["models/pigeon.mdl"] = Vector( 0, 0, 5 ),
1976 ["models/seagull.mdl"] = Vector( 0, 0, 6 ),
1977
1978}
1979
1980snixzz.Bones = {
1981
1982 ["Head"] = "ValveBiped.Bip01_Head1",
1983 ["Neck"] = "ValveBiped.Bip01_Neck1",
1984 ["Spine"] = "ValveBiped.Bip01_Spine",
1985 ["Spine2"] = "ValveBiped.Bip01_Spine2",
1986 ["Spine4"] = "ValveBiped.Bip01_Spine4",
1987 ["Pelvis"] = "ValveBiped.Bip01_Pelvis",
1988 ["R Upperarm"] = "ValveBiped.Bip01_R_UpperArm",
1989 ["R Forearm"] = "ValveBiped.Bip01_R_Forearm",
1990 ["R Hand"] = "ValveBiped.Bip01_R_Hand",
1991 ["L Upperarm"] = "ValveBiped.Bip01_L_UpperArm",
1992 ["L Forearm"] = "ValveBiped.Bip01_L_Forearm",
1993 ["L Hand"] = "ValveBiped.Bip01_L_Hand",
1994 ["R Thigh"] = "ValveBiped.Bip01_R_Thigh",
1995 ["R Calf"] = "ValveBiped.Bip01_R_Calf",
1996 ["R Foot"] = "ValveBiped.Bip01_R_Foot",
1997 ["R Toes"] = "ValveBiped.Bip01_R_Toe0",
1998 ["L Thigh"] = "ValveBiped.Bip01_L_Thigh",
1999 ["L Calf"] = "ValveBiped.Bip01_L_Calf",
2000 ["L Foot"] = "ValveBiped.Bip01_L_Foot",
2001 ["L Toes"] = "ValveBiped.Bip01_L_Toe0",
2002
2003}
2004
2005snixzz.Hitboxes = {
2006
2007 ["Head"] = 0,
2008 ["L Upperarm"] = 1,
2009 ["L Forearm"] = 2,
2010 ["L Hand"] = 3,
2011 ["R Upperarm"] = 4,
2012 ["R Forearm"] = 5,
2013 ["R Hand"] = 6,
2014 ["L Thigh"] = 7,
2015 ["L Calf"] = 8,
2016 ["F Foot"] = 9,
2017 ["L Toe"] = 10,
2018 ["R Thigh"] = 11,
2019 ["R Calf"] = 12,
2020 ["R Foot"] = 13,
2021 ["R Toe"] = 14,
2022 ["Pelvis"] = 15,
2023 ["Spine"] = 16,
2024
2025}
2026
2027snixzz.Hitscans = {
2028 0, -- head
2029 16, -- spine
2030 4, -- r upper arm
2031 1, -- l upper arm
2032 5, -- r forearm
2033 2, -- l forearm
2034 6, -- r hand
2035 3, -- l hand
2036 15, -- pelvis
2037 11, -- r thigh
2038 7, -- l thigh
2039 12, -- r calf
2040 8, -- l calf
2041 13, -- r foot
2042 9, -- l foot
2043}
2044
2045snixzz.Hitgroups = {
2046 [HITGROUP_HEAD] = "Head",
2047 [HITGROUP_CHEST] = "Chest",
2048 [HITGROUP_STOMACH] = "Stomach",
2049 [HITGROUP_LEFTARM] = "Left Arm",
2050 [HITGROUP_RIGHTARM] = "Right Arm",
2051 [HITGROUP_LEFTLEG] = "Left Leg",
2052 [HITGROUP_RIGHTLEG] = "Right Leg",
2053}
2054
2055local Hitbox
2056local HitboxPos
2057local Bone
2058local BonePos
2059local Hitscan
2060local HitscanPos
2061local HitMin, HitMax
2062function snixzz.GetPos( v )
2063
2064 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
2065
2066 return v:LocalToWorld( v:OBBCenter() )
2067
2068 elseif snixzz.Vars["aim_target_type"] == "NPC" or snixzz.Vars["aim_target_type"] == "Both" && v:IsNPC() then
2069
2070 local special = snixzz.NPCModels[v:GetModel()]
2071
2072 if !special then
2073
2074 for k, v in G.next, snixzz.Bones do
2075
2076 if v[1] == snixzz.Vars["aim_bone"] then
2077
2078 special = v[2]
2079
2080 end
2081
2082 end
2083
2084 special = special or "ValveBiped.Bip01_Head1"
2085
2086 elseif type( special ) == "Vector" then
2087
2088 return v:LocalToWorld( special )
2089
2090 end
2091
2092 local bone = v:LookupBone( special )
2093
2094 if bone then
2095
2096 local pos, ang = v:GetBonePosition( bone )
2097
2098 return pos, ang
2099
2100 end
2101
2102 elseif snixzz.Vars["aim_target_type"] == "Players" or snixzz.Vars["aim_target_type"] == "Both" && v:IsPlayer() then
2103
2104 if snixzz.Vars["aim_method"] == "Hitbox" then
2105
2106 Hitbox = v:GetHitBoxBone( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
2107 HitboxPos = v:GetBonePosition( Hitbox )
2108
2109 local min, max = v:GetHitBoxBounds( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
2110
2111 return HitboxPos + ( min + max ) / 2
2112
2113 elseif snixzz.Vars["aim_method"] == "Bone" then
2114
2115 Bone = snixzz.Bones[snixzz.Vars["aim_bone"]]
2116 BonePos = v:LookupBone( Bone )
2117
2118 if BonePos then
2119
2120 local pos, ang = v:GetBonePosition( BonePos )
2121 return pos, ang
2122
2123 end
2124
2125 elseif snixzz.Vars["aim_method"] == "Hitscan" then
2126
2127 for k, e in G.next, snixzz.Hitscans do
2128
2129 Hitscan = v:GetHitBoxBone( snixzz.Hitscans[k], 0 )
2130
2131 if Hitscan != nil then
2132
2133 HitscanPos = v:GetBonePosition( Hitscan )
2134 HitMin, HitMax = v:GetHitBoxBounds( snixzz.Hitscans[k], 0 )
2135
2136 if snixzz.IsVisible( v, HitscanPos + ( HitMin + HitMax ) / 2 ) then
2137
2138 snixzz.TargetBone = Hitscan
2139
2140 return HitscanPos + ( HitMin + HitMax ) / 2
2141
2142 end
2143
2144 end
2145
2146 end
2147
2148 end
2149
2150 end
2151
2152 return v:LocalToWorld( v:OBBCenter() )
2153end
2154
2155function snixzz.InFov( v )
2156 -- wip
2157 return true
2158end
2159
2160-- thanks asutorea
2161function snixzz.CanFire()
2162
2163 local wep = G.LocalPlayer():GetActiveWeapon()
2164
2165 if snixzz.properCurTime == nil then return false end
2166
2167 return G.IsValid( wep ) && !snixzz.BadWeapons[wep:GetClass()] && wep:GetActivity() != ACT_RELOAD && wep:GetNextPrimaryFire() < snixzz.properCurTime && G.LocalPlayer():Alive()
2168end
2169
2170-- pAntiAnti Aim
2171function snixzz.FixAngle( v )
2172
2173 local eyeAngles = _R.Entity.EyeAngles( v )
2174
2175 if eyeAngles.p < -89 then
2176
2177 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p + 180 )
2178 _R.Entity.InvalidateBoneCache( v )
2179
2180 elseif eyeAngles.p > 89 then
2181
2182 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p - 180 )
2183 _R.Entity.InvalidateBoneCache( v )
2184
2185 end
2186
2187end
2188
2189function snixzz.OnScreen( v )
2190
2191 local a, f = _R.Player.GetAimVector( G.LocalPlayer() ):Angle() - ( v:GetPos() - G.LocalPlayer():GetShootPos() ):Angle(), _R.Player.GetFOV( G.LocalPlayer() )
2192
2193 return ( G.math.NormalizeAngle( a.y ) < f + 2 && G.math.NormalizeAngle( a.p ) < f + 2 )
2194end
2195
2196function snixzz.IsDormant( index )
2197
2198 return snixzz.Functions.IsDormant( index )
2199
2200end
2201
2202function snixzz.FixMove( ucmd, aa )
2203
2204 local fixAngle = G.Vector( ucmd:GetForwardMove(), ucmd:GetSideMove(), 0 )
2205 fixAngle = (( fixAngle:GetNormal() ):Angle() + ( ucmd:GetViewAngles() - G.Angle( 0, snixzz.Silent.y, 0 ) ) ):Forward() * fixAngle:Length()
2206
2207 if aa then
2208
2209 ucmd:SetForwardMove( fixAngle.x )
2210 ucmd:SetSideMove( fixAngle.y * -1 )
2211
2212 return
2213 end
2214
2215 ucmd:SetForwardMove( fixAngle.x )
2216 ucmd:SetSideMove( fixAngle.y )
2217
2218end
2219
2220function snixzz.NormalizeAngles( ang )
2221
2222 ang.p = G.math.NormalizeAngle( ang.p )
2223 ang.y = G.math.NormalizeAngle( ang.y )
2224 ang.r = 0
2225
2226 return ang
2227end
2228
2229snixzz.PredPositions = {}
2230local tbl = snixzz.PredPositions[v] or {}
2231
2232function snixzz.GetPredictionPos( v, pos )
2233
2234 tbl.pos = tbl.pos or pos or _R.Entity.GetPos( v )
2235
2236 local realTime = G.RealTime()
2237
2238 if tbl.realTime != realTime then
2239
2240 tbl.realTime = realTime
2241 tbl.pos = pos or _R.Entity.GetPos( v )
2242
2243 end
2244
2245 tbl.velocity = v:GetVelocity()
2246 snixzz.PredPositions = tbl
2247
2248 return tbl.pos
2249end
2250
2251snixzz.PredictionMethods = { "Velocity 0.0075", "Engine Velocity", "Classic", "Herpes", "ColdFire", "FapHack", "fr1kin" }
2252snixzz.PredWeapons = {
2253
2254 ["weapon_crossbow"] = 3110,
2255 ["weapon_frag"] = 3110,
2256
2257}
2258
2259local tPos, lVelocity, tVelocity, tDistance, predTime
2260-- Some methods are BASED on other cheat's methods, I suck at prediction.
2261function snixzz.Prediction( Pos, v )
2262
2263 local wep = G.LocalPlayer():GetActiveWeapon()
2264 lVelocity = _R.Entity.GetVelocity( G.LocalPlayer() )
2265 tVelocity = _R.Entity.GetVelocity( v )
2266 tPos = _R.Entity.GetPos( v )
2267 lPos = _R.Entity.GetPos( G.LocalPlayer() )
2268 tDistance = lPos:Distance( tPos )
2269
2270 if G.IsValid( v ) && G.type( tVelocity ) == "Vector" && G.type( tPos ) == "Vector" then
2271
2272 if wep && G.IsValid( wep ) && snixzz.PredWeapons[wep:GetClass()] then
2273
2274 predTime = distance / snixzz.PredWeapons[wep:GetClass()]
2275 Pos = Pos + tVelocity * predTime
2276
2277 else
2278
2279 if snixzz.Vars["aim_prediction_method"] == "Velocity 0.0075" then
2280
2281 Pos = Pos + lVelocity * 0.0075 + tVelocity * 0.0075
2282
2283 elseif snixzz.Vars["aim_prediction_method"] == "Engine Velocity" then
2284
2285 Pos = Pos + tVelocity * G.engine.TickInterval() - lVelocity * G.engine.TickInterval()
2286
2287 elseif snixzz.Vars["aim_prediction_method"] == "Classic" then
2288
2289 Pos = Pos + tVelocity / 45 - lVelocity / 45
2290
2291 elseif snixzz.Vars["aim_prediction_method"] == "Herpes" then
2292
2293 tPos = snixzz.GetPredictionPos( v, Pos ) - Pos
2294 Pos = Pos + ( tPos * 2 ) - ( lVelocity / 50 )
2295
2296 elseif snixzz.Vars["aim_prediction_method"] == "ColdFire" then
2297
2298 Pos = Pos - tVelocity:GetNormal() / 5.8 + lVelocity:GetNormal() / 3
2299
2300 elseif snixzz.Vars["aim_prediction_method"] == "FapHack" then
2301
2302 Pos = Pos + tVelocity * 0.02 - lVelocity * 0.05
2303
2304 elseif snixzz.Vars["aim_prediction_method"] == "fr1kin" then
2305
2306 local targetFrames = RealFrameTime() / 25
2307 local plyFrames = RealFrameTime() / 66
2308
2309 Pos = Pos + ( ( tVelocity * targetFrames ) - ( tVelocity * plyFrames ) ) - ( ( lVelocity * targetFrames ) + ( lVelocity * plyFrames ) )
2310
2311 end
2312
2313 end
2314
2315 end
2316
2317 return Pos
2318end
2319
2320function snixzz.GetTarget()
2321
2322 local x, y = G.ScrW(), G.ScrH()
2323 local vPos
2324 local oldPos = G.LocalPlayer():EyePos():ToScreen()
2325 local distance = G.math.huge
2326 local AngA
2327 local AngB
2328 //local target
2329
2330 local Method
2331
2332 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
2333
2334 Method = G.ents.GetAll()
2335
2336 elseif snixzz.Vars["aim_target_type"] == "NPC" then
2337
2338 Method = G.ents.GetAll()
2339
2340 elseif snixzz.Vars["aim_target_type"] == "Players" then
2341
2342 Method = G.player.GetAll()
2343
2344 elseif snixzz.Vars["aim_target_type"] == "Both" then
2345
2346 Method = G.ents.GetAll()
2347
2348 end
2349
2350 for k, v in G.next, Method do
2351
2352 vPos = v:GetPos():ToScreen()
2353 distance2 = v:GetPos():DistToSqr( G.LocalPlayer():GetPos() )
2354 AngA = G.math.Dist( x / 2, y / 2, oldPos.x, oldPos.y )
2355 AngB = G.math.Dist( x / 2, y / 2, vPos.x, vPos.y )
2356
2357 if snixzz.IsValid( v, "Aimbot" ) then
2358
2359 if snixzz.Vars["aim_target_method"] == "Distance" then
2360
2361 if distance2 < distance then
2362
2363 distance = distance2
2364 return v
2365
2366 end
2367
2368 elseif snixzz.Vars["aim_target_method"] == "Crosshair" then
2369
2370 if AngB <= AngA then
2371
2372 return v
2373
2374 end
2375
2376 end
2377
2378 else
2379
2380 continue
2381
2382 end
2383
2384 end
2385
2386 return nil
2387end
2388
2389snixzz.Firing = false
2390function snixzz.Fire( ucmd )
2391
2392 if snixzz.Firing then
2393
2394 ucmd:RemoveKey( G.IN_ATTACK )
2395 snixzz.Firing = false
2396
2397 else
2398
2399 ucmd:SetButtons( G.bit.bor( ucmd:GetButtons(), G.IN_ATTACK ) )
2400 snixzz.Firing = true
2401
2402 end
2403
2404end
2405
2406snixzz.FakeSwitch = false
2407snixzz.FakeAngle = G.Angle()
2408snixzz.AntiAimMethods = { "Classic", "Classic Inverted", "Static", "Jitter", "Random Pitch",/* "Fake Angles", "Fake Jitter", */"Spin", /*"Fake Spin"*/ }
2409function snixzz.AntiAim( ucmd )
2410
2411 local pitches = { -181, 541, 262 }
2412 local yaws = { 262, -262, 181, -181, 541, -541 }
2413
2414 -- OG anti-aim
2415 if snixzz.Vars["aim_anti_method"] == "Classic" then
2416
2417 snixzz.Functions.SetViewAngles( ucmd, G.Angle( 181, ucmd:GetViewAngles().y, 180 ) )
2418 snixzz.FixMove( ucmd )
2419
2420 -- Looking down instead of up
2421 elseif snixzz.Vars["aim_anti_method"] == "Classic Inverted" then
2422
2423 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -181, ucmd:GetViewAngles().y, 180 ) )
2424 snixzz.FixMove( ucmd )
2425
2426 -- Static
2427 elseif snixzz.Vars["aim_anti_method"] == "Static" then
2428
2429 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -snixzz.Angles.p + 900, snixzz.Angles.y + 180, 0 ) )
2430 snixzz.FixMove( ucmd, true )
2431
2432 -- Jitter - credits to cdriza
2433 elseif snixzz.Vars["aim_anti_method"] == "Jitter" then
2434
2435 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.table.Random( pitches ), G.table.Random( yaws ), 0 ) )
2436 snixzz.FixMove( ucmd, true )
2437
2438 -- Randomized pitch
2439 elseif snixzz.Vars["aim_anti_method"] == "Random Pitch" then
2440
2441 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ucmd:GetViewAngles().y, 180 ) )
2442 snixzz.FixMove( ucmd )
2443
2444 -- bSendPacket Fake Angles
2445 /*elseif snixzz.Vars["aim_anti_method"] == "Fake Angles" then
2446
2447 snixzz.FakeAngle = ucmd:GetViewAngles()
2448
2449 if snixzz.FakeSwitch then
2450
2451 bSendPacket = true
2452 //snixzz.Functions.SendPacket( true )
2453 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y + 90, 0 ) )
2454
2455 else
2456
2457 bSendPacket = false
2458 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y - 90, 0 ) )
2459
2460 end
2461
2462 snixzz.FixMove( ucmd, true )
2463 snixzz.FakeSwitch = !snixzz.FakeSwitch
2464
2465 -- bSendPacket Fake Jitter
2466 elseif snixzz.Vars["aim_anti_method"] == "Fake Jitter" then
2467
2468 snixzz.FakeAngle = ucmd:GetViewAngles()
2469
2470 if snixzz.FakeSwitch then
2471
2472 bSendPacket = true
2473 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y + 90, 0 ) )
2474
2475 else
2476
2477 bSendPacket = false
2478 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y - 90, 0 ) )
2479
2480 end
2481
2482 snixzz.FixMove( ucmd, true )
2483 snixzz.FakeSwitch = !snixzz.FakeSwitch
2484
2485 */
2486
2487 -- Simple spinbot with -192 pitch
2488 elseif snixzz.Vars["aim_anti_method"] == "Spin" then
2489
2490 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
2491 snixzz.FixMove( ucmd, false )
2492
2493 -- bSendPacket Spinbot
2494 /*elseif snixzz.Vars["aim_anti_method"] == "Fake Spin" then
2495
2496 snixzz.FakeAngle = ucmd:GetViewAngles()
2497
2498 if FakeSwitch then
2499
2500 bSendPacket = true
2501 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
2502
2503 else
2504
2505 bSendPacket = false
2506 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, -G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
2507
2508 end
2509
2510 snixzz.FixMove( ucmd, false )
2511 */
2512 end
2513
2514end
2515
2516-- To shorten up my aimbot checks a bit.
2517function snixzz.ShouldAim( ucmd, isToggled )
2518
2519 return snixzz.Target && snixzz.IsValid( snixzz.Target, "Aimbot" ) && ucmd:CommandNumber() != 0// && snixzz.CanFire()
2520
2521end
2522
2523function snixzz.InMenu()
2524
2525 return snixzz.Typing && snixzz.ChatboxOpen && G.gui.IsConsoleVisible() && G.gui.IsGameUIVisible()
2526
2527end
2528
2529/*=======================
2530
2531
2532Hooked functions below
2533
2534
2535=========================*/
2536snixzz.Status = "Waiting..."
2537snixzz.StatusColor = Color( 255, 255, 0, 150 )
2538snixzz.Silent = G.Angle()
2539snixzz.BulletTime = true
2540snixzz.StuckSwitch = false
2541snixzz.StuckTicks = 0
2542snixzz.pDelay = 0
2543//snixzz.SpreadPos = G.Vector( 0, 0, 0 )
2544
2545function snixzz.CreateMove( ucmd )
2546
2547 -- cl noclip
2548 if snixzz.Bools["misc_csnoclip"] then
2549
2550 ucmd:SetForwardMove( 0 )
2551 ucmd:SetUpMove( 0 )
2552 ucmd:SetSideMove( 0 )
2553
2554 end
2555
2556 // Silent aim
2557 snixzz.Silent = snixzz.Silent + G.Angle( ucmd:GetMouseY() * 0.022, -ucmd:GetMouseX() * 0.022, 0 )
2558 snixzz.Silent.p = G.math.Clamp( snixzz.Silent.p, -89, 89 )
2559 snixzz.Silent.y = G.math.NormalizeAngle( snixzz.Silent.y )
2560
2561 ucmd:SetViewAngles( snixzz.Silent )
2562
2563 if ucmd:CommandNumber() == 0 then
2564
2565 return
2566 end
2567
2568 if !snixzz.Bools["aim_holdtarget"] then
2569
2570 snixzz.Target = snixzz.GetTarget()
2571
2572 end
2573
2574 snixzz.Offset = G.Vector( 0, 0, snixzz.Vars["aim_offset"] )
2575
2576 snixzz.Angles = snixzz.Silent
2577
2578 // Aimbot core
2579 if ( snixzz.Binds["+aimbot"] != nil && G.input.IsKeyDown( snixzz.Binds["+aimbot"] ) && !snixzz.ChatboxOpen && !snixzz.Typing or snixzz.Bools["aim_toggle"] ) then
2580
2581 if snixzz.Bools["aim_holdtarget"] then
2582
2583 if snixzz.Target == nil or snixzz.Target != nil && !snixzz.IsValid( snixzz.Target, "Aimbot" ) then
2584
2585 snixzz.Target = snixzz.GetTarget()
2586
2587 end
2588
2589 end
2590
2591 if snixzz.ShouldAim( ucmd, snixzz.Bools["aim_toggle"] ) then
2592
2593 snixzz.Angles = snixzz.GetPos( snixzz.Target ) - snixzz.Offset
2594
2595 if snixzz.Bools["aim_prediction"] then
2596
2597 snixzz.Angles = snixzz.Prediction( snixzz.Angles, snixzz.Target )
2598
2599 end
2600
2601 snixzz.Angles = ( snixzz.Angles - G.LocalPlayer():GetShootPos() ):Angle()
2602
2603 -- View punch fix
2604 if snixzz.Bools["aim_norecoil"] then
2605
2606 snixzz.CorrectRecoil( ucmd )
2607
2608 end
2609
2610 -- Spread Prediction
2611 if snixzz.Bools["aim_nospread"] then
2612
2613 if snixzz.Bools["aim_badshots"] then
2614
2615 if G.math.random( 1, 5 ) == 1 then
2616
2617 snixzz.Angles = snixzz.Angles
2618
2619 else
2620
2621 snixzz.Angles = snixzz.PredictSpread( ucmd, G.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
2622
2623 end
2624
2625 else
2626
2627 snixzz.Angles = snixzz.PredictSpread( ucmd, G.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
2628
2629 end
2630
2631 end
2632
2633 snixzz.NormalizeAngles( snixzz.Angles )
2634
2635 -- Set angles
2636 snixzz.Functions.SetViewAngles( ucmd, snixzz.Angles )
2637
2638 -- autofire
2639 if snixzz.Bools["aim_autoshoot"] then
2640
2641 snixzz.Fire( ucmd )
2642
2643 end
2644
2645 -- Silent aim view & move correction
2646 if snixzz.Bools["aim_silent"] then
2647
2648 snixzz.FixMove( ucmd )
2649
2650 else
2651
2652 snixzz.Silent = snixzz.Angles
2653
2654 end
2655
2656 -- ghetto aimbot status
2657 if snixzz.Target:IsPlayer() then
2658
2659 snixzz.Status = "Locked! (" .. snixzz.Target:Nick() .. ")"
2660
2661 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2662 snixzz.Locked = true
2663
2664 elseif snixzz.Target:IsNPC() then
2665
2666 snixzz.Status = "Locked! (" .. snixzz.Target:GetModel() .. ")"
2667
2668 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2669 snixzz.Locked = true
2670
2671 elseif snixzz.IsProphunt && snixzz.IsProp( snixzz.Target ) && snixzz.IsProp( snixzz.Target ) then
2672
2673 snixzz.Status = "Locked! (" .. snixzz.Target:GetOwner():Name() .. ")"
2674
2675 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2676 snixzz.Locked = true
2677
2678 end
2679
2680 else
2681
2682 snixzz.Target = nil
2683 snixzz.Status = "Searching..."
2684 snixzz.StatusColor = Color( 0, 255, 0, 150 )
2685 snixzz.Locked = false
2686
2687 end
2688
2689 else
2690
2691 snixzz.Target = nil
2692 snixzz.Status = "Searching..."
2693 snixzz.StatusColor = Color( 0, 255, 0, 150 )
2694 snixzz.Locked = false
2695
2696 end
2697
2698 -- Rapid-Fire
2699 if snixzz.Bools["misc_rapidfire"] && ucmd:KeyDown( IN_ATTACK ) && !snixzz.Locked then
2700
2701 snixzz.Fire( ucmd )
2702
2703 end
2704
2705 -- Triggerbot
2706 if snixzz.Binds["+triggerbot"] != nil && snixzz.Bools["misc_triggerbot"] or G.input.IsKeyDown( snixzz.Binds["+triggerbot"] ) then
2707
2708 snixzz.StatusColor = Color( 255, 255, 0, 150 )
2709 snixzz.Status = "Triggerbot Searching.."
2710 local hitgroup = G.LocalPlayer():GetEyeTrace().HitGroup
2711 local entity = G.LocalPlayer():GetEyeTrace().Entity
2712 snixzz.SpreadPos = G.LocalPlayer():GetEyeTrace().HitPos
2713
2714 if snixzz.Vars["misc_triggerbot_type"] == "NPC" or snixzz.Vars["misc_triggerbot_type"] == "Both" && entity:IsNPC() then
2715
2716 if snixzz.IsValid( entity, "Triggerbot" ) then
2717
2718 if snixzz.Bools["misc_triggerbot_nospread"] then
2719
2720 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2721 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2722 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2723
2724 end
2725
2726 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2727 snixzz.Status = "Firing! (" .. entity:GetModel() .. ")"
2728
2729 snixzz.Fire( ucmd )
2730
2731 end
2732
2733 elseif snixzz.Vars["misc_triggerbot_method"] == "Body" then
2734
2735 if snixzz.IsValid( entity, "Triggerbot" ) then
2736
2737 if snixzz.Bools["misc_triggerbot_nospread"] then
2738
2739 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2740 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2741 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2742
2743 end
2744
2745 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2746 snixzz.Status = "Firing! (" .. entity:Nick() .. ")"
2747
2748 snixzz.Fire( ucmd )
2749
2750 end
2751
2752 elseif snixzz.Vars["misc_triggerbot_method"] == "Hitbox" then
2753
2754 if snixzz.Hitgroups[hitgroup] != nil && snixzz.IsValid( entity, "Triggerbot" ) then
2755
2756 if snixzz.Bools["misc_triggerbot_nospread"] then
2757
2758 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2759 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2760 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2761
2762 end
2763
2764 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2765 snixzz.Status = "Firing! (" .. entity:Nick() .. ")"
2766
2767 snixzz.Fire( ucmd )
2768
2769 end
2770
2771 end
2772
2773 end
2774
2775 -- Anti-Aim
2776 if snixzz.Bools["aim_anti"] && !snixzz.Locked && !ucmd:KeyDown( IN_ATTACK ) && !ucmd:KeyDown( IN_USE ) && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER then
2777
2778 snixzz.AntiAim( ucmd )
2779
2780 end
2781
2782 // Bunnyhop & autostrafe
2783 if snixzz.Bools["misc_bhop"] then
2784
2785 if !G.LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !snixzz.Typing then
2786
2787 if !G.LocalPlayer():OnGround() && ucmd:KeyDown( IN_JUMP )then
2788
2789 ucmd:SetButtons( G.bit.band( ucmd:GetButtons(), G.bit.bnot( IN_JUMP ) ) )
2790
2791 -- Autostrafe shamelessly ripped from "public hvh v1".
2792 -- i don't understand this shit.
2793 if snixzz.Bools["misc_autostrafe"] then
2794
2795 if ucmd:GetMouseX() > 1 or ucmd:GetMouseX() < - 1 then
2796
2797 ucmd:SetSideMove( ucmd:GetMouseX() > 1 && 400 or -400 )
2798
2799 else
2800
2801 ucmd:SetForwardMove( 5850 / G.LocalPlayer():GetVelocity():Length2D() )
2802 ucmd:SetSideMove( ( ucmd:CommandNumber() % 2 == 0 ) && -400 or 400 ) -- what the fuck. who thought of this shit.
2803
2804 end
2805
2806 end
2807
2808 elseif ucmd:KeyDown( IN_JUMP ) && snixzz.Bools["misc_autostrafe"] then
2809
2810 ucmd:SetForwardMove( 10000 )
2811
2812 end
2813
2814 end
2815
2816 end
2817
2818end
2819
2820snixzz.CSNoclipPos = {}
2821function snixzz.CalcView( ply, origin, angles, fov )
2822
2823 local ply = G.LocalPlayer()
2824 local wep = ply:GetActiveWeapon()
2825 local noclipSpeed = snixzz.Vars["misc_csnoclip_speed"] * ( FrameTime() / 2 ) * 100
2826 local view = {}
2827
2828 // Advanced NoRecoil. TODO: Recoil Control System
2829 if snixzz.Bools["aim_norecoil"] then
2830
2831 if wep.Primary then
2832
2833 if !snixzz.RecoilBackup[wep:GetClass()] then
2834 snixzz.RecoilBackup[wep:GetClass()] = wep.Primary.Recoil
2835 end
2836
2837 wep.Primary.Recoil = 0
2838
2839 elseif wep.Secondary then
2840
2841 if !snixzz.RecoilBackup then
2842
2843 snixzz.RecoilBackup[wep:GetClass()] = wep.Secondary.Recoil
2844
2845 end
2846
2847 wep.Secondary.Recoil = 0
2848
2849 end
2850 else
2851
2852 if wep.Primary then
2853
2854 if wep.Primary.Recoil == 0 then
2855
2856 wep.Primary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
2857
2858 end
2859
2860 else
2861
2862 if wep.Secondary then
2863
2864 if wep.Secondary.Recoil == 0 then
2865
2866 wep.Secondary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
2867
2868 end
2869
2870 end
2871
2872 end
2873
2874 end
2875
2876 if snixzz.Bools["misc_csnoclip"] && snixzz.CSNoclipPos then
2877
2878 local ang = snixzz.Silent:Forward()
2879
2880 if LocalPlayer():KeyDown( IN_FORWARD ) then
2881
2882 snixzz.CSNoclipPos = snixzz.CSNoclipPos + LocalPlayer():GetAimVector() * noclipSpeed
2883
2884 end
2885
2886 if LocalPlayer():KeyDown( IN_BACK ) then
2887
2888 snixzz.CSNoclipPos = snixzz.CSNoclipPos - LocalPlayer():GetAimVector() * noclipSpeed
2889
2890 end
2891
2892 if LocalPlayer():KeyDown( IN_MOVERIGHT ) then
2893
2894 snixzz.CSNoclipPos = snixzz.CSNoclipPos + ang:Angle():Right() * noclipSpeed
2895
2896 end
2897
2898 if LocalPlayer():KeyDown( IN_MOVELEFT ) then
2899
2900 snixzz.CSNoclipPos = snixzz.CSNoclipPos - ang:Angle():Right() * noclipSpeed
2901
2902 end
2903
2904 else
2905
2906 snixzz.CSNoclipPos = LocalPlayer():EyePos()
2907
2908 end
2909
2910 view.angles = ( snixzz.Bools["aim_silent"] or snixzz.Bools["aim_anti"] ) && snixzz.Silent or angles
2911
2912 view.fov = snixzz.Vars["esp_fov"]
2913
2914 //view.origin = snixzz.Bools["misc_thirdperson"] && ( origin - snixzz.Silent:Forward() * snixzz.Vars["misc_thirdperson_distance"] ) or origin
2915
2916 if snixzz.Bools["misc_thirdperson"] then
2917
2918 view.origin = origin - snixzz.Silent:Forward() * snixzz.Vars["misc_thirdperson_distance"] or origin
2919
2920 elseif snixzz.Bools["misc_csnoclip"] then
2921
2922 view.origin = snixzz.CSNoclipPos
2923
2924 else
2925
2926 view.origin = origin
2927
2928 end
2929
2930 return view
2931end
2932
2933-- Autism as FUCK
2934function snixzz.Color( col )
2935
2936 if snixzz.Bools["esp_rainbow"] then
2937
2938 return G.HSVToColor( RealTime() * 120 % 360, 1, 1 )
2939
2940 end
2941
2942 return col
2943
2944end
2945
2946// GetColor func
2947function snixzz.GetESPColor( v )
2948
2949 if snixzz.Bools["misc_murder_finder"] && snixzz.IsMurder then
2950
2951 if snixzz.IsMurderer( v ) then
2952
2953 return G.Color( 255, 0, 0 )
2954
2955 elseif snixzz.HasMagnum( v ) then
2956
2957 return G.Color( 0, 255, 255 )
2958
2959 else
2960
2961 return G.Color( 0, 255, 0 )
2962
2963 end
2964
2965 elseif snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProphunt then
2966
2967 if snixzz.IsProp( v ) then
2968
2969 return G.Color( 255, 0, 0 )
2970
2971 else
2972
2973 return G.Color( 0, 255, 0 )
2974
2975 end
2976
2977 end
2978
2979 if v:IsNPC() then
2980
2981 return G.Color( 0, 255, 0 )
2982
2983 end
2984
2985 if snixzz.Entities[v:GetClass()] then
2986
2987 return G.Color( 255, 255, 255 )
2988
2989 end
2990
2991 if v:GetFriendStatus() == "friend" then
2992
2993 return G.HSVToColor( RealTime() * 120 % 360, 1, 1 )
2994
2995 end
2996
2997 if snixzz.Bools["misc_traitor_finder"] && snixzz.IsTTT && snixzz.IsTraitor( v ) then
2998
2999 return G.Color( 255, 0, 0 )
3000
3001 else
3002
3003 return snixzz.Color( G.team.GetColor( v:Team() ) )
3004
3005 end
3006
3007 return G.Color( 255, 255, 255 )
3008
3009end
3010
3011function snixzz.HUDPaint()
3012
3013 local textpos;
3014 local x1, y1, x2, y2;
3015 local diff;
3016 local diff2;
3017 local color;
3018 local startx;
3019 local starty;
3020 local endpos;
3021 local pos;
3022 local wep = G.LocalPlayer():GetActiveWeapon()
3023 local viewmodel = G.LocalPlayer():GetViewModel()
3024 local weapon
3025 local dynLight
3026 local playerPos
3027 local targetPos
3028 local mats = EntM.GetMaterials( game.GetWorld() )
3029
3030 -- Menu header
3031 if snixzz.MenuOpen then
3032
3033 G.surface.SetDrawColor( snixzz.Color( snixzz.Vars["misc_menucolor2"] ) )
3034 G.surface.DrawRect( 20, 50, 420, 60 )
3035
3036 G.surface.SetDrawColor( Color( 0, 0, 0, 255 ) )
3037 G.surface.DrawOutlinedRect( 20, 50, 420, 60, 2 )
3038
3039 G.draw.SimpleTextOutlined( "snixzz3", "snixzz_logo", 25, 55, snixzz.Color( snixzz.Colors.White ), TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1.5, Color( 0, 0, 0 ) )
3040 G.draw.SimpleTextOutlined( "by 0xymoron", "snixzz_logo_small", G.surface.GetTextSize( "snixzz3" ) + 30, 65, snixzz.Color( snixzz.Colors.White ), TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 ) )
3041
3042 -- Is VIP?
3043 G.draw.SimpleTextOutlined( "VIP:", "snixzz_logo_small",
3044 //190, 65,
3045 snixzz.Frame:GetWide() / 2 - surface.GetTextSize( "VIP:" ) / 2, 65,
3046 snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 )
3047 )
3048
3049 -- Texture
3050 G.surface.SetMaterial( Material( snixzz.IsVIP() == true && "icon16/accept.png" or snixzz.IsVIP() == false && "icon16/cancel.png" ) )
3051 G.surface.SetDrawColor( color_white )
3052 G.surface.DrawTexturedRect( snixzz.Frame:GetWide() / 2 - surface.GetTextSize( "VIP:" ) / 2 + 22, 65, 16, 16 )
3053
3054 -- Big ass shit
3055 G.draw.SimpleTextOutlined(
3056 snixzz.Info.Version .. " Last Updated: " .. snixzz.Info.Updated,
3057 "snixzz_logo_small",
3058 snixzz.Frame:GetWide() + 15, snixzz.Frame:GetTall() - 352,
3059 snixzz.Colors.White, TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, Color( 30, 30, 30, 255 )
3060 )
3061
3062 end
3063
3064 if snixzz.Panic then return end
3065 if !snixzz.Bools["esp_enabled"] then return end
3066
3067 -- Watermark
3068 if !snixzz.IsVIP() then
3069
3070 G.draw.SimpleTextOutlined( "snixzz3 " .. snixzz.Info.Version .. " - snixzz.net", "snixzz_logo", G.ScrW() - 10, 25, G.HSVToColor( G.RealTime() * 120 % 360, 1, 1 ), TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, G.Color( 0, 0, 0 ) )
3071
3072 end
3073
3074 -- Laser Sight
3075 if snixzz.Bools["esp_laser"] then
3076
3077 if viewmodel && G.IsValid( wep ) && G.IsValid( viewmodel ) then
3078
3079 if wep:GetClass() != "weapon_physgun" then
3080
3081 local muzzle = viewmodel:LookupAttachment( "muzzle" )
3082
3083 if muzzle == 0 then
3084
3085 muzzle = viewmodel:LookupAttachment( "1" )
3086
3087 end
3088
3089 local trace = G.LocalPlayer():GetEyeTrace().HitPos
3090
3091 if viewmodel:GetAttachment( muzzle ) then
3092
3093 G.cam.Start3D( G.EyePos(), G.EyeAngles() )
3094
3095 local startpos = viewmodel:GetAttachment( muzzle ).Pos
3096 local endpos = trace
3097
3098 if snixzz.Bools["aim_silent"] && snixzz.Locked && G.IsValid( snixzz.Target ) then
3099
3100 endpos = snixzz.GetPos( snixzz.Target )
3101
3102 else
3103
3104 endpos = trace
3105
3106 end
3107
3108 -- Laser
3109 G.render.SetMaterial( G.Material( "trails/laser" ) )
3110 G.render.DrawBeam( startpos, endpos, 4, 0, 0, snixzz.Color( snixzz.Vars["misc_lasercolor"] ) )
3111
3112 -- HitPos Dot
3113 G.render.SetMaterial( G.Material( "Sprites/light_glow02_add_noz" ) )
3114
3115 G.render.DrawQuadEasy(
3116 endpos, -- trace
3117 ( G.EyePos() - trace ):GetNormal(),
3118 25, 25,
3119 Color( 255, 255, 255, 255 ), 0
3120
3121 )
3122
3123 G.cam.End3D()
3124
3125 end
3126
3127 end
3128
3129 end
3130
3131 end
3132
3133 for k, v in G.next, mats do
3134
3135 local mat = G.Material( v )
3136
3137 if !snixzz.Bools["esp_asus_walls"] then
3138
3139 MatM.SetFloat( mat, "$alpha", 1 )
3140
3141 continue
3142
3143 end
3144
3145 MatM.SetFloat( mat, "$alpha", .56 )
3146
3147 end
3148
3149 -- Dynamic Light around player
3150 if snixzz.Bools["esp_dynamiclight"] then
3151
3152 dynLight = G.DynamicLight( G.LocalPlayer():EntIndex() )
3153 dynLight.pos = G.LocalPlayer():GetShootPos()
3154 dynLight.r = 255
3155 dynLight.g = 255
3156 dynLight.b = 255
3157 dynLight.brightness = 1.75
3158 dynLight.Decay = 850
3159 dynLight.Size = 250
3160 dynLight.DieTime = G.CurTime() + 1
3161
3162 end
3163
3164 if G.IsValid( viewmodel ) then
3165
3166 if snixzz.Bools["esp_wireweapon"] then
3167
3168 _R.Entity.SetMaterial( viewmodel, "models/wireframe" )
3169 _R.Entity.SetColor( viewmodel, snixzz.Color( snixzz.Vars["misc_lasercolor"] ) )
3170
3171 else
3172
3173 _R.Entity.SetMaterial( viewmodel, "" )
3174 _R.Entity.SetColor( viewmodel, Color( 255, 255, 255 ) )
3175
3176 end
3177
3178 end
3179
3180 local Method
3181
3182 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
3183
3184 Method = G.ents.GetAll()
3185
3186 elseif snixzz.Vars["esp_type"] == "NPC" or snixzz.Vars["esp_type"] == "All" or snixzz.Vars["esp_type"] == "Entities" then
3187
3188 Method = G.ents.GetAll()
3189
3190 elseif snixzz.Vars["esp_type"] == "Players" then
3191
3192 Method = G.player.GetAll()
3193
3194 end
3195
3196 for k, v in G.next, Method do
3197
3198 if snixzz.IsValid( v, "ESP" ) then
3199
3200 textpos = 0 -- -2
3201
3202 x1, y1, x2, y2 = snixzz.GetBounds( v )
3203 diff = G.math.abs( x2 - x1 )
3204 diff2 = G.math.abs( y2 - y1 )
3205
3206 playerPos = snixzz.GetPos( v )
3207 color = snixzz.GetESPColor( v )
3208
3209 if v:IsPlayer() or v:IsNPC() then
3210
3211 if G.IsValid( v:GetActiveWeapon() ) then
3212
3213 weapon = v:GetActiveWeapon():GetPrintName()
3214
3215 else
3216
3217 weapon = "Unknown"
3218
3219 end
3220
3221 else
3222
3223 weapon = "nil"
3224
3225 end
3226
3227 if v:IsPlayer() or snixzz.IsProphunt && snixzz.IsProp( v ) then
3228
3229 if snixzz.IsMurder then
3230
3231 if snixzz.Bools["esp_name"] then
3232
3233 G.draw.SimpleText( v:GetBystanderName() .. " (" .. v:Nick() .. ")", "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3234 textpos = textpos + 12
3235
3236 end
3237
3238 elseif snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
3239
3240 if snixzz.IsProp( v ) then
3241
3242 G.draw.SimpleText( v:GetOwner():Name(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3243 textpos = textpos + 12
3244
3245 elseif v:Team() != TEAM_PROPS && v:GetClass() != "ph_prop" then
3246
3247 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3248 textpos = textpos + 12
3249
3250 end
3251
3252 else
3253
3254 if snixzz.Bools["esp_name"] then
3255
3256 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3257 textpos = textpos + 12
3258
3259 end
3260
3261 end
3262
3263 elseif v:IsNPC() then
3264
3265 G.draw.SimpleText( v:GetModel(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3266 textpos = textpos + 12
3267
3268 elseif snixzz.Entities[v:GetClass()] then
3269
3270 G.draw.SimpleText( v:GetClass(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3271 textpos = textpos + 12
3272
3273 end
3274
3275 if snixzz.Bools["esp_health_text"] then
3276
3277 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
3278
3279 G.draw.SimpleText( "HP: " .. v:GetOwner():Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3280 textpos = textpos + 12
3281
3282 elseif !snixzz.Entities[v:GetClass()] then
3283
3284 G.draw.SimpleText( "HP: " .. v:Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3285 textpos = textpos + 12
3286
3287 end
3288
3289 end
3290
3291 -- Health Bar
3292 if snixzz.Bools["esp_health_bar"] && !snixzz.Entities[v:GetClass()] then
3293
3294 local health = v:Health()
3295
3296 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
3297
3298 health = v:GetOwner():Health()
3299
3300 end
3301
3302 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
3303 G.surface.DrawRect( x1 -6, y1, 3, diff2 )
3304 G.surface.SetDrawColor( Color( 0, 255, 0 ) )
3305 G.surface.DrawRect( x1 - 6, y2 - diff2 / 100 * health, 3, diff2 / 100 * health )
3306
3307 end
3308
3309 -- ESP weapon
3310 if v:IsPlayer() or v:IsNPC() then
3311
3312 if snixzz.Bools["esp_weapon"] then
3313
3314 G.draw.SimpleText( weapon, "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3315 textpos = textpos + 12
3316
3317 end
3318
3319 -- Snaplines
3320 if snixzz.Bools["esp_snaplines"] then
3321
3322 startx = G.ScrW() / 2
3323 starty = G.ScrH() / 2
3324 endpos = playerPos:ToScreen()
3325
3326 G.surface.SetDrawColor( color )
3327 G.surface.DrawLine( startx, starty, endpos.x, endpos.y )
3328
3329 end
3330
3331 end
3332
3333 -- Distance ESP
3334 if snixzz.Bools["esp_distance"] then
3335
3336 G.draw.SimpleText( "D: " .. G.math.Round( v:GetPos():Distance( G.LocalPlayer():GetPos() ) ), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3337 textpos = textpos + 12
3338
3339 end
3340
3341
3342 // Box ESP
3343 if snixzz.Bools["esp_box"] then
3344
3345 snixzz.DrawOutlinedBox( x1, y1, diff, diff2, snixzz.Vars["esp_box_width"], color )
3346
3347 end
3348
3349 -- taken from newsbot for debug purposes
3350 if snixzz.Bools["esp_hitbox"] then
3351
3352 for group = 0, EntM.GetHitBoxGroupCount( v ) do
3353
3354 local count = EntM.GetHitBoxCount( v, group ) - 1
3355
3356 for hitbox = 0, count do
3357
3358 local bone = EntM.GetHitBoxBone( v, hitbox, group )
3359
3360 if !bone then continue end
3361
3362 local min, max = EntM.GetHitBoxBounds( v, hitbox, group )
3363
3364 local bonepos, boneang = EntM.GetBonePosition( v, bone )
3365
3366 G.cam.Start3D()
3367
3368 if snixzz.Vars["aim_target_method"] == "Hitscan" && snixzz.TargetBone != nil && bone == snixzz.TargetBone then
3369
3370 G.render.DrawWireframeBox( bonepos, boneang, min, max, Color( 255, 0, 0 ), true )
3371
3372 else
3373
3374 G.render.DrawWireframeBox( bonepos, boneang, min, max, Color( 255, 255, 255 ), true )
3375
3376 end
3377
3378 G.cam.End3D()
3379
3380 end
3381
3382 end
3383
3384 end
3385
3386 -- Chams! Much faster than RenderScreenSpaceEffects
3387 if snixzz.Bools["esp_chams"] then
3388
3389 G.cam.Start3D()
3390
3391 if snixzz.Vars["esp_chams_material"] == "Solid" then
3392
3393 v:SetMaterial( "models/debug/debugwhite" )
3394
3395 elseif snixzz.Vars["esp_chams_material"] == "Wireframe" then
3396
3397 v:SetMaterial( "models/wireframe" )
3398
3399 elseif snixzz.Vars["esp_chams_material"] == "XQZ" then
3400
3401 v:SetMaterial( "" )
3402
3403 end
3404
3405 -- Weapon Chams
3406 if v:IsPlayer() or v:IsNPC() then
3407
3408 if G.IsValid( v:GetActiveWeapon() ) then
3409
3410 v:GetActiveWeapon():DrawModel()
3411
3412 end
3413
3414 end
3415
3416 -- Player chams
3417 if snixzz.Vars["esp_chams_material"] != "XQZ" then
3418
3419 G.render.SetColorModulation( color.r / 255, color.g / 255, color.b / 255 )
3420
3421 end
3422
3423 v:DrawModel()
3424 //v:SetColor( Color( 255, 255, 255 ) )
3425 v:SetMaterial( "" )
3426
3427 G.cam.End3D()
3428
3429 end
3430
3431 -- For prediction testing & shit
3432 if snixzz.Bools["esp_aimpos"] then
3433
3434 local predictedPos = snixzz.Prediction( playerPos, v ):ToScreen()
3435
3436 G.draw.RoundedBox( 4, predictedPos.x, predictedPos.y, 7, 7, Color( 255, 0, 0, 255 ) )
3437
3438 end
3439
3440 else
3441
3442 continue
3443
3444 end
3445
3446 end
3447
3448 // Aim status & shit
3449 if snixzz.Bools["esp_status"] then
3450
3451 G.draw.DrawText( snixzz.Status, "snixzz_status", G.ScrW() / 2, G.ScrH() * 0.5 + 50, snixzz.StatusColor, TEXT_ALIGN_CENTER )
3452
3453 end
3454
3455 // Crosshair
3456 local x = ScrW() / 2
3457 local y = ScrH() / 2
3458
3459 local crosscolor = Color( 0, 0, 0, 255 )
3460 local crosslength = 50
3461 local gap = 2
3462
3463 local boxsize = 5
3464
3465 -- Box
3466 if snixzz.Bools["esp_crosshair_box"] then
3467
3468 G.surface.SetDrawColor( snixzz.Color( Color( 255, 255, 255 ) ) )
3469 G.surface.DrawOutlinedRect( x - boxsize - 2, y - boxsize - 2, ( boxsize + 2 ) * 2 + 1, ( boxsize + 2 ) * 2 + 1 )
3470
3471 end
3472
3473 -- Crosshair
3474 if snixzz.Bools["esp_crosshair"] then
3475
3476 G.surface.SetDrawColor( snixzz.Color( Color( 0, 0, 0, 255 ) ) )
3477 G.surface.DrawLine( x - crosslength, y, x - gap, y )
3478 G.surface.DrawLine( x + crosslength, y, x + gap, y )
3479
3480 G.surface.DrawLine( x, y - crosslength, x, y - gap )
3481 G.surface.DrawLine( x, y + crosslength, x, y + gap )
3482
3483 end
3484
3485 -- Menu opening
3486 if snixzz.Binds["+menu"] != nil then
3487
3488 if G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.Typing && !snixzz.MenuOpen && !G.gui.IsConsoleVisible() then
3489
3490 snixzz.Menu()
3491 snixzz.MenuOpen = true
3492
3493 end
3494
3495 end
3496
3497 -- Console Opening
3498 if G.input.IsKeyDown( KEY_Q ) && G.input.IsKeyDown( KEY_TAB ) && !snixzz.Typing && !snixzz.ConsoleOpen && !G.gui.IsConsoleVisible() then
3499
3500 snixzz.Console()
3501 snixzz.ConsoleOpen = true
3502
3503 end
3504
3505 -- Chat opening
3506 if !snixzz.ChatboxOpen && !snixzz.Typing && !snixzz.ConsoleOpen && !G.gui.IsConsoleVisible() then
3507
3508 if G.input.IsKeyDown( snixzz.Binds["chat"] ) then
3509
3510 snixzz.OpenChat()
3511 snixzz.ChatboxOpen = true
3512
3513 end
3514
3515 end
3516
3517end
3518
3519snixzz.properCurTime = 0
3520snixzz.LagVar = 12
3521snixzz.LagTicks = 0
3522local dynLight
3523function snixzz.Move()
3524
3525 if G.IsFirstTimePredicted() then return end
3526 snixzz.properCurTime = G.CurTime() + G.engine.TickInterval()
3527
3528 // No hands
3529 if snixzz.Bools["esp_nohands"] then
3530
3531 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), true )
3532
3533 else
3534
3535 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), false )
3536
3537 end
3538
3539end
3540
3541function snixzz.Namechanger()
3542
3543 /*if snixzz.Bools["misc_namechanger"] then
3544
3545 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3546 G.chat.AddText( Color( 0, 255, 255 ), "[snixzz3] Changed your name to " .. snixzz.NextName )
3547
3548 if snixzz.IsDarkRP then
3549
3550 -- Overly comlpicated Steam name stealer & RP name stealer. Accuse 2 different people at once.
3551 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3552 //snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
3553 //snixzz.Functions.SetName( snixzz.NextName .. " %" )
3554
3555 G.timer.Simple( 0.5, function()
3556 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3557 snixzz.Functions.ConCommand( "darkrp rpname " .. snixzz.NextName .. "q" ) -- ** TODO: CHANGE q TO SOMETHING ELSE.
3558 end )
3559
3560 else
3561
3562 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3563 //snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
3564 //snixzz.Functions.SetName( snixzz.NextName .. " %" )
3565
3566 end
3567
3568 end*/
3569
3570end
3571
3572function snixzz.ChatSpam()
3573
3574 if snixzz.Bools["misc_chat_spam"] then
3575
3576 if snixzz.Vars["misc_chat_spam_method"] == "Advertise" then
3577
3578 G.RunConsoleCommand( "say", G.Either( snixzz.IsDarkRP, "/ooc " .. snixzz.Vars["misc_chat_spam_message"], snixzz.Vars["misc_chat_spam_message"] ) )
3579
3580 elseif snixzz.Vars["misc_chat_spam_method"] == "Yo Momma Jokes" then
3581
3582 G.http.Fetch( "http://api.yomomma.info/",
3583
3584 function( body )
3585
3586 if body && body != "" then
3587
3588 G.RunConsoleCommand( "say", G.Either( snixzz.IsDarkRP, "/ooc " .. util.JSONToTable( body )["joke"], util.JSONToTable( body )["joke"] ) )
3589
3590 end
3591
3592 end,
3593
3594 function( error )
3595
3596 snixzz.Chat( snixzz.Colors.Red, "Unable to grab joke from API! (" .. error .. ")" )
3597
3598 end
3599
3600 )
3601
3602 elseif snixzz.Vars["misc_chat_spam_method"] == "Jokes" then
3603
3604 G.http.Fetch( "http://tambal.azurewebsites.net/joke/random",
3605
3606 function( body )
3607
3608 if body && body != "" then
3609
3610 G.RunConsoleCommand( "say", G.Either( snixzz.IsDarkRP, "/ooc " .. util.JSONToTable( body )["joke"], util.JSONToTable( body )["joke"] ) )
3611
3612 end
3613
3614 end,
3615
3616 function( error )
3617
3618 snixzz.Chat( snixzz.Colors.Red, "Unable to grab joke from API! (" .. error .. ")" )
3619
3620 end
3621
3622 )
3623
3624 end
3625
3626 end
3627
3628end
3629
3630snixzz.CorrectAngles = {}
3631
3632function snixzz.AAA()
3633
3634 for k, v in G.next, G.player.GetAll() do
3635
3636 if v == G.LocalPlayer() then continue end
3637
3638 local pitch, yaw = v:EyeAngles().x, v:EyeAngles().y
3639 local sid = v:SteamID()
3640
3641 if !snixzz.CorrectAngles[sid] then
3642
3643 snixzz.CorrectAngles[sid] = { ["p"] = 0, ["y"] = 0 }
3644
3645 end
3646
3647 -- pitch
3648 if snixzz.CorrectAngles[sid]["p"] == 1 then
3649
3650 pitch = 89
3651
3652 elseif snixzz.CorrectAngles[sid]["p"] == 2 then
3653
3654 pitch = -89
3655
3656 end
3657
3658 -- yaw
3659 if snixzz.CorrectAngles["y"] == 1 then
3660
3661 yaw = yaw - 45
3662
3663 elseif snixzz.CorrectAngles["y"] == 2 then
3664
3665 yaw = yaw + 45
3666
3667 else
3668
3669 yaw = yaw - 180
3670
3671 end
3672
3673 _R.Entity.SetPoseParameter( v, "aim_pitch", pitch )
3674 _R.Entity.SetPoseParameter( v, "body_yaw", 0 )
3675 _R.Entity.SetPoseParameter( v, "aim_yaw", 0 )
3676 _R.Entity.InvalidateBoneCache( v )
3677 _R.Entity.SetRenderAngles( v, G.Angle( 0, G.math.NormalizeAngle( yaw ), 0 ) )
3678
3679 end
3680
3681end
3682
3683/*
3684
3685
3686 Traitor, Prophunt, & Murder Finders.
3687
3688
3689*/
3690snixzz.Traitors = {}
3691snixzz.Murderers = {}
3692snixzz.ClearedMurderers = false
3693snixzz.ClearedTraitors = false
3694local t
3695
3696function snixzz.IsMurderer( v )
3697
3698 if v:HasWeapon( "weapon_mu_knife" ) then
3699
3700 return true
3701
3702 end
3703
3704 if G.table.HasValue( snixzz.Murderers, v ) then
3705
3706 return true
3707
3708 end
3709
3710 return false
3711
3712end
3713
3714function snixzz.HasMagnum( v )
3715
3716 if v:HasWeapon( "weapon_mu_magnum" ) then
3717
3718 return true
3719
3720 end
3721
3722 return false
3723
3724end
3725
3726local testtab = {}
3727function snixzz.IsProp( v )
3728
3729 if v:GetOwner() != nil then
3730
3731 local owner = v:GetOwner()
3732
3733 else
3734
3735 return false
3736
3737 end
3738
3739 if v:GetClass() == "ph_prop" && owner != G.LocalPlayer() then
3740
3741 return true
3742
3743 end
3744
3745 return false
3746
3747end
3748
3749function snixzz.IsTraitor( v )
3750
3751 if G.table.HasValue( snixzz.Traitors, v ) or G.LocalPlayer():IsTraitor() && v:IsTraitor() then
3752
3753 return true
3754
3755 end
3756
3757 return false
3758end
3759
3760function snixzz.GetTraitors()
3761
3762 if !snixzz.IsTTT then return end
3763
3764 if !snixzz.Bools["misc_traitor_finder"] then return end
3765
3766 for k, v in G.next, G.ents.GetAll() do
3767
3768 if _G.GetRoundState() == 3 && v:IsWeapon() && v:GetOwner():IsPlayer() && v.Buyer == nil && v.CanBuy && G.table.HasValue( v.CanBuy, 1 ) && !G.table.HasValue( snixzz.Traitors, v:GetOwner() ) then
3769
3770 local t = v:GetOwner()
3771
3772 if t:GetRole() == 2 then
3773
3774 v.Buyer = t
3775
3776 snixzz.ClearedTraitors = false
3777
3778 else
3779
3780 G.table.insert( snixzz.Traitors, t )
3781
3782 snixzz.ClearedTraitors = false
3783
3784 snixzz.Chat( G.Color( 255, 0, 0 ), t:Nick() .. " bought traitor weapon '" .. v:GetClass() .. "'" )
3785
3786 end
3787
3788 elseif GetRoundState() != 3 then
3789
3790 if !snixzz.ClearedTraitors then
3791
3792 snixzz.Traitors = {}
3793 snixzz.Chat( color_white, "Cleared traitors table." )
3794 snixzz.ClearedTraitors = true
3795
3796
3797 end
3798
3799 end
3800
3801 end
3802
3803end
3804
3805
3806/*
3807 DETOURS
3808*/
3809
3810function snixzz.CreateDetours()
3811
3812 debug.getinfo = snixzz.Detour( debug.getinfo, function()
3813
3814 return {
3815 what = "C",
3816 source = "[C]",
3817 source_src = "[C]",
3818 linedefined = -1,
3819 currentline = -1,
3820 lastlinedefined = -1,
3821 short_src = "[C]",
3822 }
3823
3824 end )
3825
3826 _R.Entity.FireBullets = snixzz.Detour( _R.Entity.FireBullets, function( e, bullet )
3827
3828 snixzz.Cones.Normal[ G.LocalPlayer():GetActiveWeapon():GetClass() ] = bullet["Spread"]
3829
3830 return snixzz.Detours[ _R.Entity.FireBullets ]( e, bullet )
3831 end )
3832
3833 render.Capture = snixzz.Detour( render.Capture, function( data )
3834
3835 snixzz.ACNotify( "An anti-cheat attempted to capture your screen, disabling visuals for 5 seconds." )
3836
3837 snixzz.Panic = true
3838
3839 if snixzz.MenuOpen == true then
3840
3841 snixzz.Frame:SetVisible( false )
3842 snixzz.MenuOpen = false
3843
3844 end
3845
3846 G.timer.Simple( 5, function() snixzz.Panic = false end )
3847
3848 return data
3849 end )
3850
3851 file.Exists = snixzz.Detour( file.Exists, function( filename, dir )
3852
3853 snixzz.LogDetour( "file.Exists( '" .. filename .. "', '" .. dir .. "' )" )
3854
3855 if G.string.find( filename, "snixzz" ) then
3856
3857 snixzz.ACNotify( "An anti-cheat attempted to search for snixzz" )
3858 return false
3859
3860 else
3861
3862 return snixzz.Detours[ file.Exists ]( filename, dir )
3863
3864 end
3865
3866 end )
3867
3868 file.Read = snixzz.Detour( file.Read, function( filename, dir )
3869
3870 snixzz.LogDetour( "file.Read( '" .. filename .. "', '" .. dir .. "' )" )
3871
3872 if G.string.find( filename, ".lua" ) then
3873
3874 snixzz.ACNotify( "An anti-cheat attempted to search for a .lua file '" .. filename .. "'" )
3875 return "print( 'Hello World' )"
3876
3877 else
3878
3879 return snixzz.Detours[ file.Read ]( filename, dir )
3880
3881 end
3882
3883 end )
3884
3885 snixzz.FakeFiles = {
3886 "demo_recording.lua",
3887 "vgui/dbutton.lua",
3888 "vgui/dgrid.lua",
3889 "menu/menu.lua",
3890 "menu/mainmenu.lua",
3891 "menu/loading.lua",
3892 "menu/video.lua",
3893 "menu/errors.lua",
3894 }
3895
3896 file.Find = snixzz.Detour( file.Find, function( filename, dir )
3897
3898 snixzz.LogDetour( "file.Find( '" .. filename .. "', '" .. dir .. "' )" )
3899
3900 if G.string.find( filename, "snixzz" ) then
3901
3902 return G.table.Random( snixzz.FakeFiles )
3903
3904 else
3905
3906 return snixzz.Detours[ file.Find ]( filename, dir )
3907
3908 end
3909
3910 end )
3911
3912 net.Receive = snixzz.Detour( net.Receive, function( name, func )
3913
3914 snixzz.LogDetour( "net.Receive( '" .. name .. "' )" )
3915
3916 return snixzz.Detours[ net.Receive ]( name, func )
3917 end )
3918
3919 net.Start = snixzz.Detour( net.Start, function( name )
3920
3921 if snixzz.Detours["net.Start"][name] then
3922
3923 snixzz.ACNotify( "Blocked net.Start ( '" .. name .. "' )" )
3924 return
3925
3926 else
3927
3928 snixzz.LogDetour( "net.Start( '" .. name .. "' )" )
3929 return snixzz.Detours[ net.Start ]( name )
3930
3931 end
3932
3933 end )
3934
3935 net.SendToServer = snixzz.Detour( net.SendToServer, function()
3936
3937 //snixzz.LogDetour( "net.SendToServer()" )
3938
3939 return snixzz.Detours[net.SendToServer]()
3940 end )
3941
3942 net.WriteString = snixzz.Detour( net.WriteString, function( str )
3943
3944 if G.string.find( str, "snixzz" ) then
3945
3946 snixzz.ACNotify( "Blocked net.WriteString ( '" .. str .. "' )" )
3947 return "nil"
3948
3949 else
3950
3951 snixzz.LogDetour( "net.WriteString( '" .. str .. "' )" )
3952 return snixzz.Detours[ net.WriteString ]( str )
3953
3954 end
3955
3956 end )
3957
3958 net.WriteTable = snixzz.Detour( net.WriteTable, function( tab )
3959
3960 //local theTab = G.table.concat( tab, ", " )
3961
3962 //snixzz.LogDetour( "net.WriteTable( { " .. theTab .. " } )" )
3963
3964 return snixzz.Detours[net.WriteTable]( tab )
3965
3966 end )
3967
3968 _R.Player.ConCommand = snixzz.Detour( _R.Player.ConCommand, function( ply, args )
3969
3970 snixzz.LogDetour( ply:Nick() .. " - _R.Player.ConCommand( '" .. args .. "' ) " )
3971
3972 if !snixzz.Detours["Commands"][args] then
3973
3974 return snixzz.Detours[ _R.Player.ConCommand ]( ply, args )
3975
3976 else
3977
3978 snixzz.ACNotify( "Blocked _R.Player.ConCommand( '" .. args .. "' )" )
3979 return
3980
3981 end
3982
3983 end )
3984
3985 /*
3986 _R.ConVar.GetBool = snixzz.Detour( _R.Convar.GetBool, function( cvar )
3987 snixzz.LogDetour( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "'" )
3988 for k, v in G.pairs( snixzz.Spoof ) do
3989 if cvar:GetName() == k then
3990 snixzz.ACNotify( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "' ) returning " .. G.tostring( v ) )
3991 return v
3992 else
3993 return snixzz.Detours[_R.ConVar.GetBool]( cvar )
3994 end
3995 end
3996 end )*/
3997
3998 GetConVarNumber = snixzz.Detour( GetConVarNumber, function( cvar )
3999
4000 if snixzz.Spoof[cvar] != nil then
4001
4002 return snixzz.Spoof[cvar]
4003
4004 else
4005
4006 return snixzz.Detours[GetConVarNumber]( cvar )
4007
4008 end
4009
4010 end )
4011
4012 snixzz.IgnoreCMDs = {
4013 ["hvh_playheadshotsound"] = true,
4014 ["hvh_hitsound"] = true,
4015 ["r_cleardecals"] = true,
4016 ["ulx_showmotd"] = true,
4017 }
4018
4019 RunConsoleCommand = snixzz.Detour( RunConsoleCommand, function( cmd, ... )
4020
4021 local str = cmd
4022
4023 if !snixzz.IgnoreCMDs[cmd] then
4024
4025 if ... then
4026
4027 local args = { ... }
4028 str = str .. ", " .. ( ... )
4029
4030 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. ", '" .. G.table.concat( args, "', '" ) .. "' )" )
4031
4032 else
4033
4034 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. "' )")
4035
4036 end
4037
4038 end
4039
4040 if !snixzz.Detours["Commands"][cmd] then
4041
4042 return snixzz.Detours[ RunConsoleCommand ]( cmd, ... )
4043
4044 else
4045
4046 snixzz.ACNotify( "Blocked RunConsoleCommand( '" .. cmd .. "' )" )
4047 return
4048
4049 end
4050
4051 end )
4052
4053 hook.GetTable = snixzz.Detour( hook.GetTable, function()
4054
4055 //snixzz.LogDetour( "hook.GetTable() was checked, returning bullshit." )
4056
4057 return hookGetTableCopy
4058 end )
4059
4060end
4061
4062/*
4063
4064 Menu Core
4065
4066*/
4067
4068
4069/***************
4070
4071 Changelog
4072
4073****************/
4074snixzz.UpdateLog = "Loading..."
4075
4076function snixzz.UpdateChangelog()
4077
4078 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/changelog.txt",
4079
4080 function( body, len, headers, code )
4081
4082 snixzz.UpdateLog = body
4083
4084 if !G.file.Exists( snixzz.DataFolder .. "/changelog.txt", "DATA" ) then
4085
4086 G.file.Write( snixzz.DataFolder .. "/changelog.txt", body )
4087
4088 snixzz.Chat( Color( 0, 255, 0 ), "The changelog has been updated!" )
4089
4090 snixzz.CMenu()
4091
4092 else
4093
4094 local log = G.file.Read( snixzz.DataFolder .. "/changelog.txt", "DATA" )
4095
4096 if log != body then
4097
4098 G.file.Write( snixzz.DataFolder .. "/changelog.txt", body )
4099
4100 snixzz.Chat( Color( 0, 255, 0 ), "The changelog has been updated!" )
4101
4102 snixzz.CMenu()
4103
4104 end
4105
4106 end
4107
4108 end,
4109
4110 function( error )
4111
4112 snixzz.UpdateLog = error
4113 snixzz.Chat( snixzz.Colors.Red, "Failed to update changelog '" .. error .. "'" )
4114
4115 end
4116
4117 )
4118
4119end
4120
4121function snixzz.CMenu()
4122
4123 snixzz.CFrame = G.vgui.Create( "DFrame" )
4124 snixzz.CFrame:SetPos( 20, 80 )
4125 snixzz.CFrame:SetSize( 430, 420 )
4126 snixzz.CFrame:SetTitle( "snixzz3 " .. snixzz.Info.Version .. " Changelog :: by 0xymoron" )
4127 snixzz.CFrame:SetVisible( true )
4128 snixzz.CFrame:SetDraggable( true )
4129 snixzz.CFrame:ShowCloseButton( false )
4130 snixzz.CFrame:MakePopup()
4131 snixzz.CFrame.Paint = function()
4132
4133 G.draw.RoundedBox( 0, 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall(), snixzz.Vars["misc_menucolor2"] )
4134 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4135 G.surface.DrawOutlinedRect( 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall() )
4136
4137 end
4138
4139 local close = G.vgui.Create( "DButton", snixzz.CFrame )
4140 close:SetSize( 50, 20 )
4141 close:SetPos( snixzz.CFrame:GetWide() - 51, 1 )
4142 close:SetText( "x" )
4143 close:SetTextColor( G.Color( 255, 255, 255 ) )
4144 close:SetFont( "Trebuchet18" )
4145
4146 close.Paint = function()
4147
4148 G.draw.RoundedBox( 0, 0, 0, close:GetWide(), close:GetTall(), Color( 168, 62, 62, 255 ) )
4149
4150 end
4151
4152 close.DoClick = function()
4153
4154 snixzz.CFrame:Close()
4155 snixzz.Sound()
4156 snixzz.CFrame = nil
4157
4158 end
4159
4160 local ChangelogText = G.vgui.Create( "DTextEntry", snixzz.CFrame )
4161 ChangelogText:SetPos( 5, 35 )
4162 ChangelogText:SetSize( snixzz.CFrame:GetWide() - 10, snixzz.CFrame:GetTall() - 40 )
4163 ChangelogText:SetText( snixzz.UpdateLog )
4164 ChangelogText:SetEditable( false )
4165 ChangelogText:SetMultiline( true )
4166
4167end
4168
4169/*
4170
4171 snixzz3 "IRC" (Chatbox)
4172
4173*/
4174
4175local function urlencode( str ) -- thanks random github guy
4176
4177 if ( str ) then
4178
4179 str = string.gsub (str, "\n", "\r\n")
4180
4181 str = string.gsub (str, "([^%w ])", function( c )
4182
4183 return string.format( "%%%02X", string.byte( c ) )
4184
4185 end )
4186
4187 str = string.gsub ( str, " ", "+" )
4188
4189 end
4190
4191 return str
4192
4193end
4194
4195function snixzz.GetChatData( ply, func )
4196
4197 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/data/chat.json",
4198
4199 function( body )
4200
4201 local tab = util.JSONToTable( body )
4202
4203 snixzz.ChatCache = tab
4204
4205 if func then
4206
4207 return func()
4208
4209 end
4210
4211 end,
4212
4213 function( error )
4214
4215 snixzz.Chat( Color( 255, 0, 0 ), "Failed to get chat data." )
4216
4217 end
4218
4219 )
4220
4221end
4222
4223function snixzz.SendChatMessage( ply, msg, func )
4224
4225 local oldMsg = msg
4226
4227 msg = urlencode( msg )
4228
4229 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/chat.php?steamid=" .. ply:SteamID64() .. "&msg=" .. msg,
4230
4231 function( body )
4232
4233 if body != "sent" then
4234
4235 snixzz.Chat( Color( 255, 0, 0 ), "Failed to send chat message. '" .. body .. "'" )
4236
4237 else
4238
4239 if func then
4240
4241 func()
4242
4243 end
4244
4245 snixzz.AddToConsole( "Sent chat message '" .. oldMsg .. "'" )
4246
4247 end
4248
4249 end,
4250
4251 function( error )
4252
4253 snixzz.Chat( Color( 255, 0, 0 ), "Failed to send message, try again. '" .. error .. "'" )
4254
4255 end
4256
4257 )
4258
4259end
4260
4261function snixzz.UpdateChatbox( bool, func )
4262
4263 if !snixzz.ChatDisplay then return end
4264
4265 for k, v in G.next, snixzz.ChatCache do
4266
4267 local nick = v["nick"]
4268 local sid = v["sid"]
4269 local message = v["message"]
4270
4271 if !snixzz.ChatHistory[sid] then
4272
4273 snixzz.ChatHistory[sid] = {}
4274
4275 end
4276
4277 if !G.table.HasValue( snixzz.ChatHistory[sid], message ) or bool == true then
4278
4279 if sid == "nil" then
4280
4281 snixzz.ChatDisplay:InsertColorChange( 255, 0, 0, 255 )
4282
4283 elseif sid == "76561198040553376" then
4284
4285 snixzz.ChatDisplay:InsertColorChange( 0, 255, 255, 255 )
4286
4287 else
4288
4289 snixzz.ChatDisplay:InsertColorChange( 185, 185, 185, 255 )
4290
4291 end
4292
4293 snixzz.ChatDisplay:AppendText( nick )
4294
4295 snixzz.ChatDisplay:InsertColorChange( 255, 255, 255, 255 )
4296 snixzz.ChatDisplay:AppendText( ": " .. message .. "\n" )
4297
4298 if bool == false then
4299
4300 snixzz.Sound()
4301
4302 end
4303
4304 G.table.insert( snixzz.ChatHistory[sid], message )
4305
4306 end
4307
4308 end
4309
4310 if func then
4311
4312 func()
4313
4314 end
4315
4316end
4317
4318function snixzz.UpdateWhosOnline( bool, func )
4319
4320 if !snixzz.IsVIP() then return end
4321
4322 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/getonline.php",
4323
4324 function( body )
4325
4326 snixzz.WhosOnline = G.util.JSONToTable( body )
4327
4328 if func then
4329
4330 func()
4331
4332 end
4333
4334 end,
4335
4336 function( error )
4337
4338 snixzz.WhosOnline = { ["fail"] = "Failed to update" }
4339
4340 end
4341
4342 )
4343
4344end
4345
4346snixzz.ChatboxOpen = false
4347snixzz.ChatUpdateData = 0
4348snixzz.WhosOnline = {}
4349
4350function snixzz.OpenChat()
4351
4352 if snixzz.Chatbox && snixzz.Chatbox:IsVisible() or snixzz.ChatboxOpen then return end
4353
4354 snixzz.Chatbox = G.vgui.Create( "DFrame" )
4355 snixzz.Chatbox:SetTitle( "snixzz3 Chat (Experimental)" )
4356 snixzz.Chatbox:SetSize( 600, 240 )
4357 snixzz.Chatbox:SetPos( 20, ScrH() / 2 - snixzz.Chatbox:GetTall() )
4358 snixzz.Chatbox:ShowCloseButton( true )
4359 snixzz.Chatbox:SetDraggable( true )
4360
4361 snixzz.Chatbox.Paint = function( self )
4362
4363 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 150 ) )
4364 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4365 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4366
4367 end
4368
4369 snixzz.Chatbox.Think = function( self )
4370
4371 snixzz.ChatUpdateData = snixzz.ChatUpdateData + 1
4372
4373 if snixzz.ChatUpdateData == 3300 then
4374
4375 snixzz.GetChatData( LocalPlayer(), function()
4376
4377 snixzz.UpdateChatbox( false, function()
4378
4379 snixzz.ChatUpdateData = 0
4380
4381 end )
4382
4383 end )
4384
4385 end
4386
4387 if G.input.IsKeyDown( KEY_ESCAPE ) then
4388
4389 self:Close()
4390
4391 end
4392
4393 end
4394
4395 snixzz.Chatbox.OnClose = function( self )
4396
4397 snixzz.ChatHistory = {}
4398 snixzz.ChatCache = {}
4399 snixzz.ChatboxOpen = false
4400
4401 if snixzz.OnlineFrame && snixzz.OnlineFrame:IsVisible() then
4402
4403 snixzz.OnlineFrame:SetVisible( false )
4404 snixzz.OnlineFrame = nil
4405
4406 end
4407
4408 end
4409
4410 snixzz.ChatEntry = vgui.Create( "DTextEntry", snixzz.Chatbox )
4411 snixzz.ChatEntry:SetPos( 5, snixzz.Chatbox:GetTall() - 25 )
4412 snixzz.ChatEntry:SetSize( snixzz.Chatbox:GetWide() - 35, 20 )
4413
4414 snixzz.ChatEntry.OnEnter = function( self )
4415
4416 local oldMsg = self:GetValue()
4417
4418 if oldMsg == "" then snixzz.Chatbox:Close() return end
4419
4420 self:SetEnabled( false )
4421 self:SetEditable( false )
4422
4423 self:SetText( "Sending message..." )
4424
4425 snixzz.SendChatMessage( LocalPlayer(), oldMsg, function()
4426
4427 self:SetText( "Updating chat..." )
4428
4429 snixzz.GetChatData( LocalPlayer(), function()
4430
4431 snixzz.UpdateChatbox( false, function()
4432
4433 self:SetText( "Sent! Please wait 10 seconds before sending another message." )
4434
4435 G.timer.Simple( 10, function() if IsValid( self ) then self:SetEnabled( true ) self:SetEditable( true ) self:SetText( "" ) end end )
4436
4437 end )
4438
4439 end )
4440
4441 end )
4442
4443 end
4444
4445 snixzz.ChatDisplay = vgui.Create( "RichText", snixzz.Chatbox )
4446 snixzz.ChatDisplay:SetPos( 5, 25 )
4447 snixzz.ChatDisplay:SetSize( snixzz.Chatbox:GetWide() - 10, snixzz.Chatbox:GetTall() - 45 )
4448
4449 snixzz.ChatDisplay.PerformLayout = function( self )
4450
4451 self:SetFontInternal( "ChatFont" )
4452
4453 end
4454
4455 snixzz.GetChatData( LocalPlayer(), function()
4456
4457 snixzz.UpdateChatbox( true, function()
4458
4459 snixzz.Chatbox:MakePopup()
4460
4461 snixzz.ChatboxOpen = true
4462
4463 end )
4464
4465 end )
4466
4467 if snixzz.IsVIP() then
4468
4469 snixzz.UpdateWhosOnline( true, function()
4470
4471 if !snixzz.Chatbox:IsVisible() then return end
4472
4473 snixzz.OnlineFrame = G.vgui.Create( "DFrame" )
4474 snixzz.OnlineFrame:SetSize( 200, 120 )
4475 snixzz.OnlineFrame:SetTitle( "Online Users (" .. table.Count( snixzz.WhosOnline ) .. ")" )
4476 snixzz.OnlineFrame:SetPos( 20, ScrH() / 2 - snixzz.Chatbox:GetTall() - snixzz.OnlineFrame:GetTall() - 10 )
4477 snixzz.OnlineFrame:ShowCloseButton( false )
4478 snixzz.OnlineFrame:SetDraggable( false )
4479
4480 snixzz.OnlineFrame.Paint = function( self )
4481
4482 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 125 ) )
4483 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4484 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4485
4486 end
4487
4488 snixzz.OnlineList = G.vgui.Create( "DListLayout", snixzz.OnlineFrame )
4489 snixzz.OnlineList:SetPos( 5, 25 )
4490 snixzz.OnlineList:SetSize( snixzz.OnlineFrame:GetWide() - 10, snixzz.OnlineFrame:GetTall() - 35 )
4491
4492
4493 if table.Count( snixzz.WhosOnline ) >= 1 then
4494
4495 for k, v in G.next, snixzz.WhosOnline do
4496
4497 local pButton = snixzz.OnlineList:Add( "DButton" )
4498 pButton:SetText( v )
4499 pButton:SetSize( snixzz.OnlineList:GetWide() - 10, 15 )
4500 pButton:SetTextColor( color_white )
4501 pButton:SetFont( "ChatFont" )
4502
4503 pButton.Paint = function( self )
4504
4505 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 50 ) )
4506 G.surface.SetDrawColor( color_white )
4507 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4508
4509 end
4510
4511 pButton.DoClick = function( self )
4512
4513 gui.OpenURL( "http://steamcommunity.com/profiles/" .. util.NiceFloat( k ) )
4514
4515 end
4516
4517 end
4518
4519 else
4520
4521 local pButton = snixzz.OnlineList:Add( "DButton" )
4522 pButton:SetText( "No one :(" )
4523 pButton:SetSize( snixzz.OnlineList:GetWide() - 10, 15 )
4524 pButton:SetTextColor( Color( 255, 0, 0 ) )
4525 pButton:SetFont( "ChatFont" )
4526
4527 pButton.Paint = function( self )
4528
4529 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 50 ) )
4530 G.surface.SetDrawColor( Color( 255, 0, 0 ) )
4531 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4532
4533 end
4534
4535 end
4536
4537
4538 end )
4539
4540 end
4541
4542end
4543
4544/*
4545
4546
4547 Custom Console
4548
4549
4550*/
4551
4552snixzz.Cmds = {}
4553
4554snixzz.CmdDesc = {
4555
4556 ["bind"] = "bind: proper usage: bind <key> <command>",
4557 ["unbind"] = "unbind: proper usage: unbind <command>",
4558 ["binds"] = "binds: Displays a list of bindable commands",
4559 ["convars"] = "convars: Displays a list of changable convars",
4560 ["server"] = "server: Displays server information",
4561 ["players"] = "players: Displays a list of players & SteamIDs",
4562 ["lua_run"] = "lua_run: Run a Lua string",
4563 ["connect"] = "connect: Connect to the provided IP",
4564 ["clear"] = "clear: Clears the console",
4565
4566}
4567
4568function snixzz.ConsoleCommand( str )
4569
4570 if !snixzz.ConFrame then return end
4571
4572 local args = G.string.Explode( " ", str )
4573 local cmd = args[1]
4574 local cmdArgs = args[2]
4575
4576 G.table.remove( args, 1 )
4577
4578 snixzz.AddToConsole( "] " .. str )
4579
4580 -- Console Commands
4581 if snixzz.Cmds[cmd] then
4582
4583 snixzz.Cmds[cmd]( G.LocalPlayer(), cmd, args )
4584
4585 -- ConVars
4586 elseif snixzz.Bools[cmd] != nil then
4587
4588 cmdArgs = G.tobool( cmdArgs )
4589
4590 if cmdArgs != nil then
4591
4592 snixzz.Bools[cmd] = cmdArgs
4593 snixzz.Chat( snixzz.Colors.Green, "Set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) .. "'" )
4594
4595 else
4596
4597 snixzz.Chat( snixzz.Colors.Red, "Failed to set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) or "nil" )
4598
4599 end
4600
4601 elseif snixzz.Vars[cmd] != nil then
4602
4603 if cmdArgs != nil then
4604
4605 snixzz.Vars[cmd] = cmdArgs
4606 snixzz.Chat( snixzz.Colors,Green, "Set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) .. "'" )
4607
4608 else
4609
4610 snixzz.Chat( snixzz.Colors.Red, "Failed to set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) or "nil" )
4611
4612 end
4613
4614 elseif cmd == "lua_run" then
4615
4616 local lua_String = G.string.gsub( str, "lua_run ", "" )
4617
4618 snixzz.AddToConsole( "Running Lua String '" .. lua_String .. "'" )
4619
4620 snixzz.RunString( lua_String )
4621
4622 else
4623
4624 snixzz.AddToConsole( "Unknown command '" .. cmd .. "'" )
4625
4626 end
4627
4628 snixzz.cEntry:SetText( "" )
4629
4630end
4631
4632function snixzz.AddConsoleCommand( cmd, func )
4633
4634 snixzz.Cmds[cmd] = func
4635
4636end
4637
4638snixzz.AddConsoleCommand( "help", function( ply, cmd, args )
4639
4640 for k, v in G.next, snixzz.Cmds do
4641
4642 snixzz.AddToConsole( snixzz.CmdDesc[k] )
4643
4644 end
4645
4646end )
4647
4648snixzz.AddConsoleCommand( "ping", function( ply, cmd, args )
4649
4650 if snixzz.Membership == "dev" then
4651
4652 snixzz.PingServer( ply )
4653
4654 else
4655
4656 snixzz.AddToConsole( "You must be a developer to use this command." )
4657
4658 end
4659
4660end )
4661
4662snixzz.AddConsoleCommand( "chat", function( ply, cmd, args )
4663
4664 if snixzz.ConFrame then
4665
4666 snixzz.ConsoleOpen = false
4667 snixzz.ConFrame:Remove()
4668
4669 end
4670
4671 snixzz.OpenChat()
4672
4673end )
4674
4675
4676snixzz.AddConsoleCommand( "say", function( ply, cmd, args )
4677
4678 if snixzz.Membership == "dev" then
4679
4680 snixzz.SendChatMessage( ply, tostring( table.concat( args, " " ) ) )
4681
4682 else
4683
4684 snixzz.AddToConsole( "You must be a developer to use this command." )
4685
4686 end
4687
4688end )
4689
4690snixzz.AddConsoleCommand( "bind", function( ply, cmd, args )
4691
4692 if !args[1] or !args[2] then snixzz.AddToConsole( snixzz.CmdDesc["bind"] ) return end
4693
4694 local key = "KEY_" .. G.string.upper( args[1] )
4695 local cmd = args[2]
4696
4697 snixzz.BindKey( cmd, key, true )
4698
4699end )
4700
4701snixzz.AddConsoleCommand( "unbind", function( ply, cmd, args )
4702
4703 if !args[1] then snixzz.AddToConsole( "Unbind proper usage: unbind <command>" ) return end
4704
4705 local command = args[1]
4706
4707 snixzz.Unbind( command )
4708
4709end )
4710
4711snixzz.AddConsoleCommand( "convars", function( ply, cmd, args )
4712
4713 for k, v in G.next, snixzz.Bools do
4714
4715 snixzz.AddToConsole( "ConVar: " .. k .. " | Enabled: " .. G.tostring( v ) )
4716
4717 end
4718
4719 for k, v in G.next, snixzz.Vars do
4720
4721 snixzz.AddToConsole( "ConVar: " .. k .. " | Value: " .. G.tostring( v ) )
4722
4723 end
4724
4725end )
4726
4727snixzz.AddConsoleCommand( "binds", function( ply, cmd, args )
4728
4729 for k, v in G.next, snixzz.Binds do
4730
4731 snixzz.AddToConsole( "Command: " .. k .. " | Bound to: " .. G.input.GetKeyName( v ) )
4732
4733 end
4734
4735end )
4736
4737snixzz.AddConsoleCommand( "clear", function( ply, cmd, args )
4738
4739 if snixzz.ConFrame && snixzz.cHistory then
4740
4741 snixzz.cHistory:Clear()
4742
4743 end
4744
4745 snixzz.ConsoleHistory = {}
4746
4747 snixzz.AddToConsole( "Cleared console history." )
4748
4749end )
4750
4751snixzz.AddConsoleCommand( "connect", function( ply, cmd, args )
4752
4753 if args[1] != nil then
4754
4755 snixzz.AddToConsole( "Connecting to '" .. args[1] .. "'" )
4756
4757 G.RunConsoleCommand( "connect", args[1] )
4758
4759 else
4760
4761 snixzz.AddToConsole( "Unknown IP" )
4762
4763 end
4764
4765end )
4766
4767snixzz.ConsoleOpen = false
4768
4769function snixzz.Console()
4770
4771 snixzz.ConFrame = G.vgui.Create( "DFrame" )
4772 snixzz.ConFrame:SetSize( 700, 450 )
4773 snixzz.ConFrame:SetPos( 30, 30 )
4774 snixzz.ConFrame:SetTitle( "snixzz3 Console :: by 0xymoron" )
4775 snixzz.ConFrame:ShowCloseButton( false )
4776 snixzz.ConFrame:MakePopup()
4777 snixzz.ConFrame.Paint = function( self )
4778
4779 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), snixzz.Vars["misc_menucolor2"] )
4780 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4781 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4782
4783 end
4784 snixzz.ConFrame.Think = function( self )
4785
4786 if G.input.IsKeyDown( KEY_ESCAPE ) then
4787
4788 snixzz.ConsoleOpen = false
4789 self:Remove()
4790
4791 end
4792
4793 end
4794
4795 local close = G.vgui.Create( "DButton", snixzz.ConFrame )
4796 close:SetSize( 50, 20 )
4797 close:SetPos( snixzz.ConFrame:GetWide() - 51, 1 )
4798 close:SetText( "x" )
4799 close:SetTextColor( G.Color( 255, 255, 255 ) )
4800 close:SetFont( "Trebuchet18" )
4801
4802 close.Paint = function( self )
4803
4804 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), G.Color( 168, 62, 62, 255 ) )
4805
4806 end
4807
4808 close.DoClick = function()
4809
4810 snixzz.ConsoleOpen = false
4811 snixzz.ConFrame:Remove()
4812 snixzz.Sound()
4813
4814 end
4815
4816 snixzz.cHistory = G.vgui.Create( "DListView", snixzz.ConFrame )
4817 snixzz.cHistory:SetPos( 5, 27 )
4818 snixzz.cHistory:SetSize( 690, 397 )
4819 snixzz.cHistory:SetSortable( false )
4820 snixzz.cHistory:AddColumn( "" )
4821 snixzz.cHistory:SetMultiSelect( false )
4822
4823 for k, v in pairs( snixzz.ConsoleHistory ) do
4824
4825 snixzz.cHistory:AddLine( v )
4826
4827 end
4828
4829 snixzz.cHistory.OnClickLine = function( prnt, line, self )
4830
4831 G.SetClipboardText( line:GetValue( 1 ) )
4832
4833 snixzz.Chat( snixzz.Colors.Green, "Copied selected line to clipboard.", true )
4834
4835 end
4836
4837 snixzz.cHistory:PerformLayout()
4838 snixzz.cHistory.VBar:SetScroll( snixzz.cHistory.VBar.CanvasSize )
4839
4840 -- command entry
4841 snixzz.cEntry = G.vgui.Create( "DTextEntry", snixzz.ConFrame )
4842 snixzz.cEntry:SetMultiline( false )
4843 snixzz.cEntry:SetSize( 690, 20 )
4844 snixzz.cEntry:SetPos( 5, 427 )
4845
4846 snixzz.cEntry.OnEnter = function( self )
4847
4848 snixzz.ConsoleCommand( self:GetValue() )
4849
4850 end
4851
4852 snixzz.cEntry.Think = function( self )
4853
4854 self:RequestFocus()
4855
4856 end
4857
4858end
4859
4860snixzz.MenuToggle = false
4861
4862function snixzz.DoMenuToggle()
4863
4864 snixzz.MenuOpen = true
4865 snixzz.Frame:SetVisible( true )
4866
4867end
4868
4869function snixzz.Menu()
4870
4871 local tabs, menuheight, menuwidth, w, h = {}, 430, 420, ScrW() / 2, ScrH() / 2
4872
4873 snixzz.Frame = G.vgui.Create( "DPropertySheet" )
4874 snixzz.Frame:SetParent( snixzz.Frame )
4875 snixzz.Frame:SetPos( 20, 80 )
4876 snixzz.Frame:SetSize( menuwidth, menuheight )
4877 snixzz.Frame:SetVisible( true )
4878 snixzz.Frame:MakePopup()
4879 snixzz.Frame.Think = function()
4880
4881 if snixzz.Binds["+menu"] == nil then return end
4882
4883 if !G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.MenuToggle then
4884
4885 snixzz.MenuOpen = false
4886 //snixzz.Changelog:SetVisible( false )
4887 //snixzz.LinksButton:SetVisible( false )
4888 snixzz.Frame:SetVisible( false )
4889
4890 end
4891
4892 end
4893 snixzz.Frame.Paint = function()
4894
4895 G.draw.RoundedBox( 0, 0, 30, snixzz.Frame:GetWide(), snixzz.Frame:GetTall(), snixzz.Vars["misc_menucolor"] )
4896 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4897 G.surface.DrawOutlinedRect( 0, 0, snixzz.Frame:GetWide(), snixzz.Frame:GetTall() )
4898
4899 end
4900
4901 -- Menu Toggle button
4902 local Toggle = G.vgui.Create( "DButton" )
4903 Toggle:SetParent( snixzz.Frame )
4904 Toggle:SetText( "Hold Open" )
4905 Toggle:SetTextColor( snixzz.Colors.Green )
4906 Toggle:SetPos( 0, 0 )
4907 Toggle:SetPos( snixzz.Frame:GetWide() - 60, 0 )
4908 Toggle:SetSize( 60, 30 )
4909 Toggle.DoClick = function()
4910
4911 snixzz.MenuToggle = !snixzz.MenuToggle
4912 snixzz.DoMenuToggle()
4913
4914 if snixzz.MenuToggle == true then
4915
4916 Toggle:SetText( "Close" )
4917 Toggle:SetTextColor( Color( 255, 255, 0 ) )
4918 snixzz.Sound()
4919
4920 else
4921
4922 Toggle:SetText( "Hold Open" )
4923 Toggle:SetTextColor( snixzz.Colors.Green )
4924 snixzz.Sound()
4925
4926 end
4927
4928 end
4929 Toggle.Paint = function()
4930
4931 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4932 G.surface.DrawOutlinedRect( 0, 0, Toggle:GetWide(), Toggle:GetTall() )
4933
4934 end
4935
4936 /*snixzz.LinksButton = G.vgui.Create( "DButton" )
4937 snixzz.LinksButton:SetText( "Links" )
4938 snixzz.LinksButton:SetPos( snixzz.Frame:GetWide() - 205, 60 )
4939 snixzz.LinksButton:SetSize( 35, 18 )
4940 snixzz.LinksButton:SetFont( "snixzz_logo_small" )
4941 snixzz.LinksButton:SetTextColor( color_white )
4942
4943 snixzz.LinksButton.DoClick = function()
4944
4945 if !snixzz.linksMenu then
4946
4947 snixzz.Sound()
4948 snixzz.OpenLinksMenu()
4949
4950 end
4951
4952 end
4953 snixzz.LinksButton.Paint = function()
4954
4955 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4956 G.surface.DrawOutlinedRect( 0, 0, snixzz.LinksButton:GetWide(), snixzz.LinksButton:GetTall() )
4957
4958 end*/
4959
4960 -- Parents for the tabs
4961 tabs.aimbot = G.vgui.Create( "DLabel", snixzz.Frame )
4962 tabs.aimbot:SetPos( 0, 0 )
4963 tabs.aimbot:SetText( "" )
4964
4965 tabs.esp = G.vgui.Create( "DLabel", snixzz.Frame )
4966 tabs.esp:SetPos( 0, 0 )
4967 tabs.esp:SetText( "" )
4968
4969 tabs.misc = G.vgui.Create( "DLabel", snixzz.Frame )
4970 tabs.misc:SetPos( 0, 0 )
4971 tabs.misc:SetText( "" )
4972
4973 tabs.lists = G.vgui.Create( "DLabel", snixzz.Frame )
4974 tabs.lists:SetPos( 0, 0 )
4975 tabs.lists:SetText( "" )
4976
4977 tabs.log = G.vgui.Create( "DLabel", snixzz.Frame )
4978 tabs.log:SetPos( 0, 0 )
4979 tabs.log:SetText( "" )
4980
4981 tabs.config = G.vgui.Create( "DLabel", snixzz.Frame )
4982 tabs.config:SetPos( 0, 0 )
4983 tabs.config:SetText( "" )
4984
4985 snixzz.Frame:AddSheet( "Aimbot", tabs.aimbot, "icon16/lightning.png", false, false )
4986 snixzz.Frame:AddSheet( "Visual", tabs.esp, "icon16/eye.png", false, false )
4987 snixzz.Frame:AddSheet( "Misc", tabs.misc, "icon16/plugin.png", false, false )
4988 snixzz.Frame:AddSheet( "Lists", tabs.lists, "icon16/user_add.png", false, false )
4989 snixzz.Frame:AddSheet( "Detours", tabs.log, "icon16/application_xp_terminal.png", false, false )
4990 snixzz.Frame:AddSheet( "Config", tabs.config, "icon16/wrench.png", false, false )
4991
4992 -- Aimbot Settings
4993 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aimbot Toggle", "aim_toggle", 5, 5 )
4994 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Autoshoot", "aim_autoshoot", 5, 25 )
4995 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Silent Aim", "aim_silent", 5, 45 )
4996 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Spread Prediction", "aim_nospread", 5, 65 )
4997 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aim Prediction", "aim_prediction", 5, 85 )
4998 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Remove Recoil", "aim_norecoil", 5, 105 )
4999 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Miss random shots", "aim_badshots", 5, 125 )
5000 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Hold Target", "aim_holdtarget", 5, 145 )
5001
5002 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Team", "aim_ignoreteam", 130, 5 )
5003 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Admins", "aim_ignoreadmins", 130, 25 )
5004 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Steam Friends", "aim_ignoresteam", 130, 45 )
5005 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Bots", "aim_ignorebots", 130, 65 )
5006 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore LOS", "aim_ignorelos", 130, 85 )
5007 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friends", "aim_ignorefriends", 130, 105 )
5008 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friendly Traitors", "aim_ignoretraitors", 130, 125 )
5009 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Target Only Traitors", "aim_onlytraitors", 130, 145 )
5010
5011 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti Anti-Aim", "aim_antiantiaim", 275, 5 )
5012 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti-Aim", "aim_anti", 275, 25 )
5013
5014 snixzz.CreateOption( "Slider", tabs.aimbot, "Spinbot Speed", "aim_anti_spin_speed", 10, 50, 420, 5, 325, 0 )
5015 snixzz.CreateOption( "Slider", tabs.aimbot, "Field of View", "aim_fov", 1, 180, 420, 5, 345, 0 )
5016 snixzz.CreateOption( "Slider", tabs.aimbot, "Aimspot Offset", "aim_offset", -20, 20, 425, 5, 365, 0 )
5017
5018
5019 snixzz.CreateOption( "Label", tabs.aimbot, "Prediction Method", 115, 250 )
5020
5021 local PredictionMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
5022 PredictionMethod:SetPos( 115, 265 )
5023 PredictionMethod:SetSize( 105, 20 )
5024 PredictionMethod:SetText( snixzz.Vars["aim_prediction_method"] )
5025 PredictionMethod:SetTextColor( color_white )
5026
5027 for k, v in G.next, snixzz.PredictionMethods do
5028
5029 PredictionMethod:AddChoice( v )
5030
5031 end
5032
5033 PredictionMethod.OnSelect = function( self )
5034
5035 snixzz.Vars["aim_prediction_method"] = self:GetValue()
5036 snixzz.Chat( Color( 0, 255, 255 ), "Set prediction method to '" .. self:GetValue() .. "'" )
5037 snixzz.Sound()
5038
5039 end
5040
5041 PredictionMethod.Paint = function()
5042
5043 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5044 G.surface.DrawOutlinedRect( 0, 0, PredictionMethod:GetWide(), PredictionMethod:GetTall() )
5045
5046 end
5047
5048 snixzz.CreateOption( "Label", tabs.aimbot, "Target Type", 225, 250 )
5049
5050 local TargetType = G.vgui.Create( "DComboBox", tabs.aimbot )
5051 TargetType:SetPos( 225, 265 )
5052 TargetType:SetSize( 105, 20 )
5053 TargetType:SetText( snixzz.Vars["aim_target_type"] )
5054 TargetType:SetTextColor( color_white )
5055
5056 for k, v in G.next, { "Players", "NPC", "Both" } do
5057
5058 TargetType:AddChoice( v )
5059
5060 end
5061
5062 TargetType.OnSelect = function( self )
5063
5064 snixzz.Vars["aim_target_type"] = self:GetValue()
5065 snixzz.Chat( Color( 0, 255, 255 ), "Set target type to '" .. self:GetValue() .. "'" )
5066 snixzz.Sound()
5067
5068 end
5069
5070 TargetType.Paint = function()
5071
5072 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5073 G.surface.DrawOutlinedRect( 0, 0, TargetType:GetWide(), TargetType:GetTall() )
5074
5075 end
5076
5077 // AntiAim Method
5078 snixzz.CreateOption( "Label", tabs.aimbot, "Anti-Aim Method", 5, 250 )
5079 local AntiAimMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
5080 AntiAimMethod:SetPos( 5, 265 )
5081 AntiAimMethod:SetSize( 105, 20 )
5082 AntiAimMethod:SetText( snixzz.Vars["aim_anti_method"] )
5083 AntiAimMethod:SetTextColor( color_white )
5084
5085 for k, v in G.next, snixzz.AntiAimMethods do
5086
5087 AntiAimMethod:AddChoice( v )
5088
5089 end
5090
5091 AntiAimMethod.OnSelect = function( self )
5092
5093 snixzz.Vars["aim_anti_method"] = self:GetValue()
5094 snixzz.Chat( Color( 0, 255, 255 ), "Set anti-aim method to '" .. self:GetValue() .. "'" )
5095 snixzz.Sound()
5096
5097 end
5098
5099 AntiAimMethod.Paint = function()
5100
5101 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5102 G.surface.DrawOutlinedRect( 0, 0, AntiAimMethod:GetWide(), AntiAimMethod:GetTall() )
5103
5104 end
5105
5106 -- Aimbot hitbox/bone method & spot selection
5107 snixzz.CreateOption( "Label", tabs.aimbot, "Aimbot Method", 5, 290 )
5108
5109 local AimbotMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
5110 AimbotMethod:SetPos( 5, 305 )
5111 AimbotMethod:SetSize( 105, 20 )
5112 AimbotMethod:SetText( snixzz.Vars["aim_method"] )
5113 AimbotMethod:AddChoice( "Hitbox" )
5114 AimbotMethod:AddChoice( "Bone" )
5115 AimbotMethod:AddChoice( "Hitscan" )
5116 AimbotMethod:SetTextColor( color_white )
5117 AimbotMethod.OnSelect = function( self )
5118
5119 snixzz.Vars["aim_method"] = self:GetValue()
5120 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot method to '" .. self:GetValue() .. "'" )
5121 snixzz.Sound()
5122
5123 -- Close to menu to avoid bugs.
5124 snixzz.Frame:SetVisible( false )
5125 //snixzz.Changelog:SetVisible( false )
5126 //snixzz.LinksButton:SetVisible( false )
5127 snixzz.MenuOpen = false
5128 snixzz.MenuToggle = false
5129
5130 end
5131
5132 AimbotMethod.Paint = function()
5133
5134 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5135 G.surface.DrawOutlinedRect( 0, 0, AimbotMethod:GetWide(), AimbotMethod:GetTall() )
5136
5137 end
5138
5139 -- Aimspot & aim method selection
5140 snixzz.CreateOption( "Label", tabs.aimbot, "Aim Spot", 115, 290 )
5141
5142 local Aimspot = G.vgui.Create( "DComboBox", tabs.aimbot )
5143 Aimspot:SetPos( 115, 305 )
5144 Aimspot:SetSize( 105, 20 )
5145 Aimspot:SetTextColor( color_white )
5146
5147 if snixzz.Vars["aim_method"] == "Hitbox" then
5148
5149 Aimspot:SetText( snixzz.Vars["aim_hitbox"] )
5150
5151 Aimspot:SetDisabled( false )
5152
5153 for k, v in G.next, snixzz.Hitboxes do
5154
5155 Aimspot:AddChoice( k )
5156
5157 end
5158
5159 elseif snixzz.Vars["aim_method"] == "Bone" then
5160
5161 Aimspot:SetText( snixzz.Vars["aim_bone"] )
5162
5163 Aimspot:SetDisabled( false )
5164
5165 for k, v in G.next, snixzz.Bones do
5166
5167 Aimspot:AddChoice( k )
5168
5169
5170 end
5171
5172 elseif snixzz.Vars["aim_method"] == "Hitscan" then
5173
5174 Aimspot:SetText( "Auto" )
5175 Aimspot:SetDisabled( true )
5176
5177 end
5178
5179 Aimspot.OnSelect = function( self )
5180
5181 if snixzz.Vars["aim_method"] == "Hitbox" then
5182
5183 snixzz.Vars["aim_hitbox"] = self:GetValue()
5184 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
5185
5186 elseif snixzz.Vars["aim_method"] == "Bone" then
5187
5188 snixzz.Vars["aim_bone"] = self:GetValue()
5189 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot bone to '" .. self:GetValue() .. "'" )
5190
5191 end
5192
5193 snixzz.Sound()
5194 end
5195
5196 Aimspot.Paint = function()
5197
5198 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5199 G.surface.DrawOutlinedRect( 0, 0, Aimspot:GetWide(), Aimspot:GetTall() )
5200
5201 end
5202
5203 // Target method
5204 snixzz.CreateOption( "Label", tabs.aimbot, "Target Method", 225, 290 )
5205
5206 local TargetMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
5207 TargetMethod:SetPos( 225, 305 )
5208 TargetMethod:SetSize( 105, 20 )
5209 TargetMethod:SetText( snixzz.Vars["aim_target_method"] )
5210 TargetMethod:SetTextColor( color_white )
5211 TargetMethod:AddChoice( "Distance" )
5212 TargetMethod:AddChoice( "Crosshair" )
5213 TargetMethod.OnSelect = function( self )
5214
5215 snixzz.Vars["aim_target_method"] = self:GetValue()
5216 snixzz.Chat( Color( 0, 255, 255 ), "Set target method to '" .. self:GetValue() .. "'" )
5217 snixzz.Sound()
5218
5219 end
5220
5221 TargetMethod.Paint = function()
5222
5223 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5224 G.surface.DrawOutlinedRect( 0, 0, TargetMethod:GetWide(), TargetMethod:GetTall() )
5225
5226 end
5227
5228 -- Visual Settings
5229 snixzz.CreateOption( "Checkbox", tabs.esp, "Enable Visuals", "esp_enabled", 5, 5 )
5230 snixzz.CreateOption( "Checkbox", tabs.esp, "Name Text", "esp_name", 5, 45 )
5231 snixzz.CreateOption( "Checkbox", tabs.esp, "Health Text", "esp_health_text", 5, 65 )
5232 snixzz.CreateOption( "Checkbox", tabs.esp, "Weapon Text", "esp_weapon", 5, 85 )
5233 snixzz.CreateOption( "Checkbox", tabs.esp, "Distance Text", "esp_distance", 5, 105 )
5234 snixzz.CreateOption( "Checkbox", tabs.esp, "Bounding Box", "esp_box", 5, 125 )
5235 snixzz.CreateOption( "Checkbox", tabs.esp, "Chams", "esp_chams", 5, 145 )
5236 snixzz.CreateOption( "Checkbox", tabs.esp, "Health Bar", "esp_health_bar", 5, 165 )
5237 snixzz.CreateOption( "Checkbox", tabs.esp, "Hitbox ESP", "esp_hitbox", 5, 185 )
5238
5239 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair", "esp_crosshair", 130, 5 )
5240 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair Box", "esp_crosshair_box", 130, 25 )
5241 snixzz.CreateOption( "Checkbox", tabs.esp, "Remove Hands", "esp_nohands", 130, 45 )
5242 snixzz.CreateOption( "Checkbox", tabs.esp, "Aimbot Status", "esp_status", 130, 65 )
5243 snixzz.CreateOption( "Checkbox", tabs.esp, "Laser Sights", "esp_laser", 130, 85 )
5244 snixzz.CreateOption( "Checkbox", tabs.esp, "Aim Snaplines", "esp_snaplines", 130, 105 )
5245 snixzz.CreateOption( "Checkbox", tabs.esp, "Dynamic Light", "esp_dynamiclight", 130, 125 )
5246 snixzz.CreateOption( "Checkbox", tabs.esp, "Wireframe Weapon", "esp_wireweapon", 130, 145 )
5247 snixzz.CreateOption( "Checkbox", tabs.esp, "Draw Aimbot Position", "esp_aimpos", 130, 165 )
5248 snixzz.CreateOption( "Checkbox", tabs.esp, "ASUS Walls", "esp_asus_walls", 130, 185 )
5249 snixzz.CreateOption( "Checkbox", tabs.esp, "RGB Mode", "esp_rainbow", 130, 205 )
5250
5251 snixzz.CreateOption( "Slider", tabs.esp, "Field of View", "esp_fov", 90, 140, 420, 5, 325, 1 )
5252 snixzz.CreateOption( "Slider", tabs.esp, "Box Width", "esp_box_width", 1, 2.5, 420, 5, 345, 1 )
5253 snixzz.CreateOption( "Slider", tabs.esp, "Render Distance", "esp_distance", 0, 7500, 415, 5, 365, 0 )
5254
5255
5256 snixzz.CreateOption( "Label", tabs.esp, "Chams Material", 5, 290 )
5257
5258 local ChamsType = G.vgui.Create( "DComboBox", tabs.esp )
5259 ChamsType:SetPos( 5, 305 )
5260 ChamsType:SetSize( 105, 20 )
5261 ChamsType:SetText( snixzz.Vars["esp_chams_material"] )
5262 ChamsType:AddChoice( "Solid" )
5263 ChamsType:AddChoice( "Wireframe" )
5264 ChamsType:AddChoice( "XQZ" )
5265 ChamsType:SetTextColor( color_white )
5266 ChamsType.OnSelect = function( self )
5267
5268 snixzz.Vars["esp_chams_material"] = self:GetValue()
5269 snixzz.Chat( Color( 0, 255, 255 ), "Set chams material to '" .. self:GetValue() .. "'" )
5270 snixzz.Sound()
5271
5272 end
5273
5274 ChamsType.Paint = function()
5275
5276 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5277 G.surface.DrawOutlinedRect( 0, 0, ChamsType:GetWide(), ChamsType:GetTall() )
5278
5279 end
5280
5281 snixzz.CreateOption( "Label", tabs.esp, "ESP Type", 115, 290 )
5282
5283 local ESPType = G.vgui.Create( "DComboBox", tabs.esp )
5284 ESPType:SetPos( 115, 305 )
5285 ESPType:SetSize( 105, 20 )
5286 ESPType:SetText( snixzz.Vars["esp_type"] )
5287 ESPType:AddChoice( "Players" )
5288 ESPType:AddChoice( "NPC" )
5289 ESPType:AddChoice( "Entities" )
5290 ESPType:AddChoice( "All" )
5291 ESPType:SetTextColor( color_white )
5292 ESPType.OnSelect = function( self )
5293
5294 snixzz.Vars["esp_type"] = self:GetValue()
5295 snixzz.Chat( Color( 0, 255, 255 ), "Set ESP type to '" .. self:GetValue() .. "'" )
5296 snixzz.Sound()
5297
5298 end
5299
5300 ESPType.Paint = function()
5301
5302 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5303 G.surface.DrawOutlinedRect( 0, 0, ESPType:GetWide(), ESPType:GetTall() )
5304
5305 end
5306
5307 --------------
5308 -- Misc tab --
5309 --------------
5310 snixzz.CreateOption( "Checkbox", tabs.misc, "Bunnyhop", "misc_bhop", 5, 5 )
5311 snixzz.CreateOption( "Checkbox", tabs.misc, "Autostrafe", "misc_autostrafe", 5, 25 )
5312 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot", "misc_triggerbot", 5, 45 )
5313 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot NoSpread", "misc_triggerbot_nospread", 5, 65 )
5314 snixzz.CreateOption( "Checkbox", tabs.misc, "Thirdperson", "misc_thirdperson", 5, 85 )
5315 snixzz.CreateOption( "Checkbox", tabs.misc, "Traitor Finder", "misc_traitor_finder", 5, 105 )
5316 snixzz.CreateOption( "Checkbox", tabs.misc, "Murder Finder", "misc_murder_finder", 5, 125 )
5317 snixzz.CreateOption( "Checkbox", tabs.misc, "Prophunt Finder", "misc_prophunt_finder", 5, 145 )
5318 snixzz.CreateOption( "Checkbox", tabs.misc, "Chat Spam", "misc_chat_spam", 5, 165 )
5319 snixzz.CreateOption( "Checkbox", tabs.misc, "Rapid Fire", "misc_rapidfire", 5, 185 )
5320 snixzz.CreateOption( "Checkbox", tabs.misc, "Clientside Noclip", "misc_csnoclip", 5, 205 )
5321 snixzz.CreateOption( "Checkbox", tabs.misc, "Prophunt Exploits [Beta]", "misc_exploits_prophunt", 5, 225 )
5322 snixzz.CreateOption( "Slider", tabs.misc, "Thirdperson Distance", "misc_thirdperson_distance", 50, 180, 415, 5, 345, 1 )
5323
5324 snixzz.CreateOption( "Label", tabs.misc, "Triggerbot Method", 5, 290 )
5325
5326 local Trigmethod = G.vgui.Create( "DComboBox", tabs.misc )
5327 Trigmethod:SetPos( 5, 305 )
5328 Trigmethod:SetSize( 105, 20 )
5329 Trigmethod:SetText( snixzz.Vars["misc_triggerbot_method"] )
5330 Trigmethod:AddChoice( "Body" )
5331 Trigmethod:AddChoice( "Hitbox" )
5332 Trigmethod:SetTextColor( color_white )
5333 Trigmethod.OnSelect = function( self )
5334
5335 snixzz.Vars["misc_triggerbot_method"] = self:GetValue()
5336 snixzz.Chat( Color( 0, 255, 255 ), "Set triggerbot method to '" .. self:GetValue() .. "'" )
5337 snixzz.Sound()
5338
5339 end
5340 Trigmethod.Paint = function()
5341
5342 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5343 G.surface.DrawOutlinedRect( 0, 0, Trigmethod:GetWide(), Trigmethod:GetTall() )
5344
5345 end
5346
5347 snixzz.CreateOption( "Label", tabs.misc, "Triggerbot Type", 115, 290 )
5348
5349 local TrigType = G.vgui.Create( "DComboBox", tabs.misc )
5350 TrigType:SetPos( 115, 305 )
5351 TrigType:SetSize( 105, 20 )
5352 TrigType:SetText( snixzz.Vars["misc_triggerbot_type"] )
5353 TrigType:AddChoice( "Players" )
5354 TrigType:AddChoice( "NPC" )
5355 TrigType:AddChoice( "Both" )
5356 TrigType:SetTextColor( color_white )
5357 TrigType.OnSelect = function( self )
5358
5359 snixzz.Vars["misc_triggerbot_type"] = self:GetValue()
5360 snixzz.Chat( Color( 0, 255, 255 ), "Set triggerbot type to '" .. self:GetValue() .. "'" )
5361 snixzz.Sound()
5362
5363 end
5364 TrigType.Paint = function()
5365
5366 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5367 G.surface.DrawOutlinedRect( 0, 0, TrigType:GetWide(), TrigType:GetTall() )
5368
5369 end
5370
5371 snixzz.CreateOption( "Label", tabs.misc, "Chat Spam Method", 225, 290 )
5372
5373 local SpamMethod = G.vgui.Create( "DComboBox", tabs.misc )
5374 SpamMethod:SetPos( 225, 305 )
5375 SpamMethod:SetSize( 105, 20 )
5376 SpamMethod:SetText( snixzz.Vars["misc_chat_spam_method"] )
5377 SpamMethod:AddChoice( "Advertise" )
5378 //SpamMethod:AddChoice( "Jokes" )
5379 SpamMethod:AddChoice( "Yo Momma Jokes" )
5380 SpamMethod:SetTextColor( color_white )
5381 SpamMethod.OnSelect = function( self )
5382
5383 snixzz.Vars["misc_chat_spam_method"] = self:GetValue()
5384 snixzz.Chat( Color( 0, 255, 255 ), "Set chat spam method to '" .. self:GetValue() .. "'" )
5385 snixzz.Sound()
5386
5387 end
5388
5389 SpamMethod.Paint = function()
5390
5391 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5392 G.surface.DrawOutlinedRect( 0, 0, SpamMethod:GetWide(), SpamMethod:GetTall() )
5393
5394 end
5395
5396 ---------------
5397 -- Lists Tab --
5398 ---------------
5399
5400 -- Friends/enemies
5401
5402 local Enemies = G.vgui.Create( "DListView", tabs.lists )
5403 Enemies:SetPos( 5, 5 )
5404 Enemies:SetSize( 170, 180 )
5405 Enemies:AddColumn( "Enemies" )
5406
5407 for k, v in G.next, G.player.GetAll() do
5408
5409 if !snixzz.Friends[v:Nick()] && v != G.LocalPlayer() then
5410
5411 Enemies:AddLine( v:Nick() )
5412
5413 end
5414
5415 end
5416
5417 local Friends = G.vgui.Create( "DListView", tabs.lists )
5418 Friends:SetPos( 230, 5 )
5419 Friends:SetSize( 170, 180 )
5420 Friends:AddColumn( "Friends" )
5421
5422 for k, v in G.next, snixzz.Friends do
5423
5424 Friends:AddLine( k )
5425
5426 end
5427
5428 local AddFriend = G.vgui.Create( "DButton", tabs.lists )
5429 AddFriend:SetText( "-->" )
5430 AddFriend:SetSize( 30, 20 )
5431 AddFriend:SetPos( 187.5, 140 )
5432 AddFriend:SetTextColor( color_white )
5433 AddFriend.DoClick = function()
5434
5435 local line = Enemies:GetSelectedLine()
5436
5437 if line != nil then
5438
5439 local ply = Enemies:GetLine( line ):GetValue(1)
5440
5441 if !snixzz.Friends[ply] then
5442
5443 snixzz.Friends[ply] = true
5444 snixzz.Chat( snixzz.Colors.Green, "Added '" .. ply .. "' to friends list." )
5445 Friends:AddLine( ply )
5446 Enemies:RemoveLine( line )
5447 snixzz.Sound()
5448
5449 end
5450
5451 end
5452
5453 end
5454
5455 AddFriend.Paint = function()
5456
5457 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5458 G.surface.DrawOutlinedRect( 0, 0, AddFriend:GetWide(), AddFriend:GetTall() )
5459
5460 end
5461
5462 local RemoveFriend = G.vgui.Create( "DButton", tabs.lists )
5463 RemoveFriend:SetText("<--")
5464 RemoveFriend:SetSize( 30, 20 )
5465 RemoveFriend:SetPos( 187.5, 165 )
5466 RemoveFriend:SetTextColor( color_white )
5467 RemoveFriend.DoClick = function()
5468
5469 local line = Friends:GetSelectedLine()
5470
5471 if line != nil then
5472
5473 local ply = Friends:GetLine( line ):GetValue( 1 )
5474
5475 if snixzz.Friends[ply] then
5476
5477 for k, v in G.next, snixzz.Friends do
5478
5479 if k == ply then
5480
5481 snixzz.Friends[k] = nil
5482 snixzz.Chat( snixzz.Colors.Red, "Removed '" .. ply .. "' from the friends list." )
5483 snixzz.Sound()
5484
5485 end
5486
5487 end
5488
5489 Enemies:AddLine( ply )
5490 Friends:RemoveLine( line )
5491
5492 end
5493
5494 end
5495
5496 end
5497
5498 RemoveFriend.Paint = function()
5499
5500 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5501 G.surface.DrawOutlinedRect( 0, 0, RemoveFriend:GetWide(), RemoveFriend:GetTall() )
5502
5503 end
5504
5505 local AllEnts = G.vgui.Create( "DListView", tabs.lists )
5506 AllEnts:SetPos( 5, 190 )
5507 AllEnts:SetSize( 170, 180 )
5508 AllEnts:AddColumn( "All Entities" )
5509
5510 local addedEnts = {}
5511
5512 for k, v in G.next, G.ents.GetAll() do
5513
5514 if !addedEnts[v:GetClass()] && !v:IsPlayer() && !v:IsNPC() && !snixzz.Entities[v:GetClass()] && !snixzz.BadEntities[v:GetClass()] then
5515
5516 AllEnts:AddLine( v:GetClass() )
5517 addedEnts[v:GetClass()] = true
5518
5519 end
5520
5521 end
5522
5523 local DrawEnts = G.vgui.Create( "DListView", tabs.lists )
5524 DrawEnts:SetPos( 230, 190 )
5525 DrawEnts:SetSize( 170, 180 )
5526 DrawEnts:AddColumn( "Entities to Draw" )
5527
5528 for k, v in G.next, snixzz.Entities do
5529
5530 DrawEnts:AddLine( k )
5531
5532 end
5533
5534 local AddEntity = G.vgui.Create( "DButton", tabs.lists )
5535 AddEntity:SetText( "-->" )
5536 AddEntity:SetSize( 30, 20 )
5537 AddEntity:SetPos( 187.5, 315 )
5538 AddEntity:SetTextColor( color_white )
5539 AddEntity.DoClick = function()
5540
5541 local line = AllEnts:GetSelectedLine()
5542
5543 if line != nil then
5544
5545 local ent = AllEnts:GetLine( line ):GetValue(1)
5546
5547 if !snixzz.Entities[ply] then
5548
5549 snixzz.Entities[ent] = true
5550 snixzz.Chat( snixzz.Colors.Green, "Added '" .. ent .. "' to entities list." )
5551 DrawEnts:AddLine( ent )
5552 AllEnts:RemoveLine( line )
5553 snixzz.Sound()
5554
5555 end
5556
5557 end
5558
5559 end
5560
5561 AddEntity.Paint = function()
5562
5563 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5564 G.surface.DrawOutlinedRect( 0, 0, AddEntity:GetWide(), AddEntity:GetTall() )
5565
5566 end
5567
5568 local RemoveEntity = G.vgui.Create( "DButton", tabs.lists )
5569 RemoveEntity:SetText("<--")
5570 RemoveEntity:SetSize( 30, 20 )
5571 RemoveEntity:SetPos( 187.5, 350 )
5572 RemoveEntity:SetTextColor( color_white )
5573 RemoveEntity.DoClick = function()
5574
5575 local line = DrawEnts:GetSelectedLine()
5576
5577 if line != nil then
5578
5579 local ent = DrawEnts:GetLine( line ):GetValue( 1 )
5580
5581 if snixzz.Entities[ent] then
5582
5583 for k, v in G.next, snixzz.Entities do
5584
5585 if k == ent then
5586
5587 snixzz.Entities[k] = nil
5588 snixzz.Chat( snixzz.Colors.Red, "Removed '" .. ent .. "' from the entities list." )
5589 snixzz.Sound()
5590
5591 end
5592
5593 end
5594
5595 AllEnts:AddLine( ent )
5596 DrawEnts:RemoveLine( line )
5597
5598 end
5599
5600 end
5601
5602 end
5603
5604 RemoveEntity.Paint = function()
5605
5606 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5607 G.surface.DrawOutlinedRect( 0, 0, RemoveEntity:GetWide(), RemoveEntity:GetTall() )
5608
5609 end
5610
5611 -----------------
5612 -- Log Tab --
5613 -----------------
5614
5615 snixzz.LogTab = G.vgui.Create( "DListView", tabs.log )
5616 snixzz.LogTab:SetPos( 5, 5 )
5617 snixzz.LogTab:SetSize( snixzz.Frame:GetWide() - 25, snixzz.Frame:GetTall() - 70 )
5618 snixzz.LogTab:AddColumn( "snixzz3 Logs" )
5619 snixzz.LogTab:SetSortable( false )
5620 snixzz.LogTab:SetMultiSelect( false )
5621
5622 for k, v in G.next, snixzz.Lines do
5623 snixzz.LogTab:AddLine( v )
5624
5625 end
5626
5627 snixzz.LogTab.OnClickLine = function( parent, line, isselected )
5628
5629 G.SetClipboardText( line:GetValue( 1 ) )
5630
5631 end
5632
5633 local ConsoleClear = G.vgui.Create( "DButton", tabs.log )
5634 ConsoleClear:SetText( "Clear Log" )
5635 ConsoleClear:SetSize( snixzz.Frame:GetWide() - 25, 23 )
5636 ConsoleClear:SetPos( 5, 370 )
5637 ConsoleClear:SetTextColor( color_white )
5638
5639 ConsoleClear.DoClick = function()
5640
5641 snixzz.Lines = {}
5642 snixzz.LogTab:Clear()
5643
5644 end
5645
5646 ConsoleClear.Paint = function()
5647
5648 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5649 G.surface.DrawOutlinedRect( 0, 0, ConsoleClear:GetWide(), ConsoleClear:GetTall() )
5650
5651 end
5652
5653 ----------------
5654 -- Config Tab --
5655 ----------------
5656 --Menu Settings
5657 snixzz.CreateOption( "Label", tabs.config, "Menu Color", 230, 5 )
5658
5659 local MenuColor = G.vgui.Create( "DColorMixer", tabs.config )
5660 MenuColor:SetPos( 230, 20 )
5661 MenuColor:SetSize( 170, 100 )
5662 MenuColor:SetPalette( false )
5663 MenuColor:SetAlphaBar( true )
5664 MenuColor:SetWangs( false )
5665 MenuColor:SetColor( snixzz.Vars["misc_menucolor"] )
5666
5667 MenuColor.ValueChanged = function()
5668
5669 snixzz.Vars["misc_menucolor"] = MenuColor:GetColor()
5670
5671 end
5672
5673 snixzz.CreateOption( "Label", tabs.config, "Secondary Menu Color", 230, 125 )
5674
5675 local MenuColor2 = G.vgui.Create( "DColorMixer", tabs.config )
5676 MenuColor2:SetPos( 230, 140 )
5677 MenuColor2:SetSize( 170, 100 )
5678 MenuColor2:SetPalette( false )
5679 MenuColor2:SetAlphaBar( true )
5680 MenuColor2:SetWangs( false )
5681 MenuColor2:SetColor( snixzz.Vars["misc_menucolor2"] )
5682
5683 MenuColor2.ValueChanged = function()
5684
5685 snixzz.Vars["misc_menucolor2"] = MenuColor2:GetColor()
5686
5687 end
5688
5689 snixzz.CreateOption( "Label", tabs.config, "Laser Color", 230, 245 )
5690
5691 local LaserCol = G.vgui.Create( "DColorMixer", tabs.config )
5692 LaserCol:SetPos( 230, 260 )
5693 LaserCol:SetSize( 170, 100 )
5694 LaserCol:SetPalette( false )
5695 LaserCol:SetAlphaBar( false )
5696 LaserCol:SetWangs( false )
5697 LaserCol:SetColor( snixzz.Vars["misc_lasercolor"] )
5698
5699 LaserCol.ValueChanged = function()
5700
5701 snixzz.Vars["misc_lasercolor"] = LaserCol:GetColor()
5702
5703 end
5704
5705 local CfgList = G.vgui.Create( "DListView", tabs.config )
5706 CfgList:SetPos( 5, 5 )
5707 CfgList:SetMultiSelect( false )
5708 CfgList:SetSize( 220, 80 )
5709 CfgList:AddColumn( "Config" )
5710
5711 for k, v in G.next, snixzz.Configs do
5712
5713 CfgList:AddLine( v )
5714
5715 end
5716
5717 CfgList.DoDoubleClick = function()
5718
5719 local line = CfgList:GetSelectedLine()
5720
5721 if line != nil then
5722
5723 local config = CfgList:GetLine( line ):GetValue( 1 )
5724 snixzz.LoadConfig( config )
5725 snixzz.Sound()
5726
5727 end
5728
5729 end
5730
5731 -- Right from gInject. Im lazy with menus. I'll re-write it later
5732 local CreateConfig = G.vgui.Create( "DButton", tabs.config )
5733 CreateConfig:SetText( "Create New" )
5734 CreateConfig:SetSize( 105, 30 )
5735 CreateConfig:SetPos( 5, 90 )
5736 CreateConfig:SetTextColor( color_white )
5737 CreateConfig.DoClick = function()
5738
5739 G.Derma_StringRequest( "New Config", "Name of the new config", "", function( txt )
5740
5741 snixzz.SaveConfig( txt )
5742 snixzz.Sound()
5743
5744 end )
5745
5746 end
5747
5748 CreateConfig.Paint = function()
5749
5750 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5751 G.surface.DrawOutlinedRect( 0, 0, CreateConfig:GetWide(), CreateConfig:GetTall() )
5752
5753 end
5754
5755 local RenameConfig = G.vgui.Create( "DButton", tabs.config )
5756 RenameConfig:SetText( "Rename" )
5757 RenameConfig:SetSize( 105, 30 )
5758 RenameConfig:SetPos( 5, 125 )
5759 RenameConfig:SetTextColor( color_white )
5760 RenameConfig.DoClick = function()
5761
5762 G.Derma_StringRequest( "Rename Config", "Name of the new config", "", function( NewConfig )
5763
5764 local line = CfgList:GetSelectedLine()
5765
5766 if line != nil then
5767
5768 local OldConfig = CfgList:GetLine( line ):GetValue( 1 )
5769
5770 if OldConfig != "default" then
5771
5772 snixzz.RenameConfig( OldConfig, NewConfig )
5773 G.table.remove( snixzz.Configs, CfgList:GetSelectedLine() )
5774 G.table.insert( snixzz.Configs, NewConfig )
5775 snixzz.Sound()
5776
5777 end
5778
5779 end
5780
5781 end )
5782
5783 end
5784
5785 RenameConfig.Paint = function()
5786
5787 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5788 G.surface.DrawOutlinedRect( 0, 0, RenameConfig:GetWide(), RenameConfig:GetTall() )
5789
5790 end
5791
5792 local DeleteConfig = G.vgui.Create( "DButton", tabs.config )
5793 DeleteConfig:SetText( "Delete" )
5794 DeleteConfig:SetSize( 105, 30 )
5795 DeleteConfig:SetPos( 118, 90 )
5796 DeleteConfig:SetTextColor( color_white )
5797 DeleteConfig.DoClick = function()
5798
5799 local line = CfgList:GetSelectedLine()
5800
5801 if line != nil then
5802
5803 local config = CfgList:GetLine( line ):GetValue( 1 )
5804 if config != "default" then
5805
5806 for k, v in G.next, snixzz.Configs do
5807
5808 if v == config then
5809
5810 snixzz.DeleteConfig( config )
5811 G.table.remove( snixzz.Configs, k )
5812 snixzz.Sound()
5813
5814 end
5815
5816 end
5817
5818 end
5819
5820 end
5821
5822 end
5823
5824 DeleteConfig.Paint = function()
5825
5826 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5827 G.surface.DrawOutlinedRect( 0, 0, DeleteConfig:GetWide(), DeleteConfig:GetTall() )
5828
5829 end
5830
5831
5832 local LoadConfig = G.vgui.Create( "DButton", tabs.config )
5833 LoadConfig:SetText( "Load" )
5834 LoadConfig:SetSize( 105, 30 )
5835 LoadConfig:SetPos( 118, 125 )
5836 LoadConfig:SetTextColor( color_white )
5837 LoadConfig.DoClick = function()
5838
5839 local line = CfgList:GetSelectedLine()
5840
5841 if line != nil then
5842 local config = CfgList:GetLine( line ):GetValue( 1 )
5843 snixzz.LoadConfig( config )
5844 snixzz.Frame:SetVisible( false )
5845 //snixzz.Changelog:SetVisible( false )
5846 //snixzz.LinksButton:SetVisible( false )
5847 snixzz.MenuOpen = false
5848 snixzz.MenuToggle = false
5849 snixzz.Sound()
5850
5851 end
5852
5853 end
5854
5855 LoadConfig.Paint = function()
5856
5857 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5858 G.surface.DrawOutlinedRect( 0, 0, LoadConfig:GetWide(), LoadConfig:GetTall() )
5859
5860 end
5861
5862 local SetDefaultCfg = G.vgui.Create( "DButton", tabs.config )
5863 SetDefaultCfg:SetText( "Set Default" )
5864 SetDefaultCfg:SetSize( 105, 30 )
5865 SetDefaultCfg:SetPos( 118, 160 )
5866 SetDefaultCfg:SetTextColor( color_white )
5867 SetDefaultCfg.DoClick = function()
5868
5869 local line = CfgList:GetSelectedLine()
5870
5871 if line != nil then
5872
5873 local config = CfgList:GetLine( line ):GetValue( 1 )
5874
5875 snixzz.SetDefaultConfig( config )
5876 snixzz.LoadConfig( config )
5877 snixzz.Sound()
5878
5879 end
5880
5881 end
5882
5883 SetDefaultCfg.Paint = function()
5884
5885 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5886 G.surface.DrawOutlinedRect( 0, 0, SetDefaultCfg:GetWide(), SetDefaultCfg:GetTall() )
5887
5888 end
5889
5890 local UpdateConfig = G.vgui.Create( "DButton", tabs.config )
5891 UpdateConfig:SetText( "Save Changes" )
5892 UpdateConfig:SetSize( 105, 35 )
5893 UpdateConfig:SetPos( 118, 195 )
5894 UpdateConfig:SetTextColor( color_white )
5895 UpdateConfig.DoClick = function()
5896
5897 snixzz.Sound()
5898 snixzz.UpdateConfig()
5899
5900 end
5901
5902 UpdateConfig.Paint = function()
5903
5904 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5905 G.surface.DrawOutlinedRect( 0, 0, UpdateConfig:GetWide(), UpdateConfig:GetTall() )
5906
5907 end
5908
5909 // Binds
5910 local BindCommands = G.vgui.Create( "DComboBox", tabs.config )
5911 BindCommands:SetPos( 5, 160 )
5912 BindCommands:SetSize( 105, 20 )
5913 BindCommands:SetTextColor( color_white )
5914
5915 for k, v in G.next, snixzz.Binds do
5916
5917 BindCommands:AddChoice( k )
5918
5919 end
5920
5921 BindCommands.Paint = function()
5922
5923 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5924 G.surface.DrawOutlinedRect( 0, 0, BindCommands:GetWide(), BindCommands:GetTall() )
5925
5926 end
5927
5928 local BindKeys = G.vgui.Create( "DComboBox", tabs.config )
5929 BindKeys:SetPos( 5, 185 )
5930 BindKeys:SetSize( 105, 20 )
5931 BindKeys:SetTextColor( color_white )
5932
5933 for k, v in G.next, snixzz.Keys do
5934
5935 BindKeys:AddChoice( v.Name )
5936
5937 end
5938
5939 BindKeys.Paint = function()
5940
5941 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5942 G.surface.DrawOutlinedRect( 0, 0, BindKeys:GetWide(), BindKeys:GetTall() )
5943
5944 end
5945
5946 local RebindKey = G.vgui.Create( "DButton", tabs.config )
5947 RebindKey:SetText( "Bind" )
5948 RebindKey:SetSize( 105, 20 )
5949 RebindKey:SetPos( 5, 210 )
5950 RebindKey:SetTextColor( color_white )
5951 RebindKey.DoClick = function()
5952
5953 local Key = BindKeys:GetValue()
5954 local Command = BindCommands:GetValue()
5955
5956 if ( BindKeys:GetValue() != "" && BindCommands:GetValue() != "" ) then
5957
5958 snixzz.Frame:SetVisible( false )
5959 //snixzz.Changelog:SetVisible( false )
5960 //snixzz.LinksButton:SetVisible( false )
5961 snixzz.MenuOpen = false
5962 snixzz.MenuToggle = false
5963 snixzz.BindKey( Command, Key )
5964 snixzz.Sound()
5965
5966 end
5967
5968 end
5969
5970 RebindKey.Paint = function()
5971
5972 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5973 G.surface.DrawOutlinedRect( 0, 0, RebindKey:GetWide(), RebindKey:GetTall() )
5974
5975 end
5976
5977 local JoinHvH = G.vgui.Create( "DButton", tabs.config )
5978 JoinHvH:SetText( "Join OFFICIAL Hack VS Hack Server" )
5979 JoinHvH:SetSize( 218, 30 )
5980 JoinHvH:SetPos( 5, 235 )
5981 JoinHvH:SetTextColor( color_white )
5982 JoinHvH:SetFont( "snixzz_logo_small" )
5983 JoinHvH.DoClick = function()
5984
5985 Derma_Query(
5986
5987 "Would you like to join Hack VS Hack?", "Join Hack VS Hack",
5988
5989 "Yes", function()
5990
5991 snixzz.Chat( Color( 255, 0, 0 ), "Connecting in 15 seconds. If you're missing the map you can simply Google 'aim_ag_texture2' & download it anywhere." )
5992
5993 timer.Simple( 15, function()
5994
5995 G.LocalPlayer():ConCommand( "connect 66.150.164.192:27015" )
5996
5997 end )
5998
5999 end,
6000
6001 "No", function()
6002
6003 snixzz.Chat( Color( 0, 255, 255 ), "Hack VS Hack is a great place to test & configure your cheat or compete against other cheaters!" )
6004
6005 end )
6006
6007 end
6008
6009 JoinHvH.Paint = function()
6010
6011 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
6012 G.surface.DrawOutlinedRect( 0, 0, JoinHvH:GetWide(), JoinHvH:GetTall() )
6013
6014 end
6015
6016 snixzz.Changelog = G.vgui.Create( "DButton", tabs.config )
6017 snixzz.Changelog:SetText( "Changelog and News" )
6018 snixzz.Changelog:SetPos( 5, 270 )
6019 snixzz.Changelog:SetSize( 218, 30 )
6020 snixzz.Changelog:SetFont( "snixzz_logo" )
6021 snixzz.Changelog:SetTextColor( color_white )
6022
6023 snixzz.Changelog.DoClick = function()
6024
6025 if !snixzz.CFrame then
6026
6027 snixzz.Sound()
6028 snixzz.CMenu()
6029
6030 end
6031
6032 end
6033 snixzz.Changelog.Paint = function()
6034
6035 //G.draw.RoundedBox( 0, 0, 0, snixzz.Changelog:GetWide(), snixzz.Changelog:GetTall(), Color( 40, 40, 40, 145 ) )
6036 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
6037 G.surface.DrawOutlinedRect( 0, 0, snixzz.Changelog:GetWide(), snixzz.Changelog:GetTall() )
6038
6039 end
6040
6041 snixzz.CreateOption( "Checkbox", tabs.config, "Load with GAMEMODE hooks (Buggy, may break parts of gamemode)", "load_unhooked", 5, 375 )
6042
6043end
6044
6045/*
6046
6047 Open Steam Group & Forum once
6048
6049*/
6050
6051/*
6052function snixzz.RequestLinks()
6053
6054 G.Derma_Query( "snixzz.net is expanding!\nWe've re-opened our forums and a Steam group, please take a look & consider joining!", "[snixzz.net] Join us!",
6055 "Okay!", function()
6056
6057 snixzz.OpenLinksMenu()
6058
6059 end )
6060
6061end
6062
6063function snixzz.OpenLinksMenu()
6064
6065 snixzz.linksMenu = G.vgui.Create( "DFrame" )
6066 snixzz.linksMenu:SetSize( 260, 60 )
6067 snixzz.linksMenu:Center()
6068 snixzz.linksMenu:SetTitle( "Links" )
6069 snixzz.linksMenu:ShowCloseButton( false )
6070 snixzz.linksMenu:MakePopup()
6071 snixzz.linksMenu.Paint = function( self )
6072
6073 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), snixzz.Vars["misc_menucolor2"] )
6074 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
6075 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
6076
6077 end
6078
6079 local close = G.vgui.Create( "DButton", snixzz.linksMenu )
6080 close:SetSize( 50, 20 )
6081 close:SetPos( snixzz.linksMenu:GetWide() - 51, 1 )
6082 close:SetText( "x" )
6083 close:SetTextColor( G.Color( 255, 255, 255 ) )
6084 close:SetFont( "Trebuchet18" )
6085
6086 close.Paint = function()
6087
6088 G.draw.RoundedBox( 0, 0, 0, close:GetWide(), close:GetTall(), Color( 168, 62, 62, 255 ) )
6089
6090 end
6091
6092 close.DoClick = function()
6093
6094 snixzz.linksMenu:Close()
6095 snixzz.Sound()
6096 snixzz.linksMenu = nil
6097
6098 end
6099
6100 local website = G.vgui.Create( "DButton", snixzz.linksMenu )
6101 website:SetSize( 120, 30 )
6102 website:SetPos( 5, 25 )
6103 website:SetText( "Forums" )
6104 website:SetTextColor( color_white )
6105
6106 website.Paint = function()
6107
6108 G.surface.SetDrawColor( Color( 230, 30, 30 ) )
6109 G.surface.DrawOutlinedRect( 0, 0, website:GetWide(), website:GetTall() )
6110
6111 end
6112
6113 website.DoClick = function( self )
6114
6115 G.gui.OpenURL( "https://bit.ly/1UiOwAC" )
6116
6117 end
6118
6119 local group = G.vgui.Create( "DButton", snixzz.linksMenu )
6120 group:SetSize( 120, 30 )
6121 group:SetPos( 130, 25 )
6122 group:SetText( "Steam Group" )
6123 group:SetTextColor( color_white )
6124
6125 group.Paint = function()
6126
6127 G.surface.SetDrawColor( Color( 0, 255, 153 ) )
6128 G.surface.DrawOutlinedRect( 0, 0, group:GetWide(), group:GetTall() )
6129
6130 end
6131
6132 group.DoClick = function( self )
6133
6134 G.gui.OpenURL( "https://bit.ly/1VzMroY" )
6135
6136 end
6137
6138end
6139
6140if !G.file.Exists( snixzz.DataFolder .. "/asktojoin.txt", "DATA" ) then
6141
6142 snixzz.RequestLinks()
6143
6144 file.Write( snixzz.DataFolder .. "/asktojoin.txt", "Confirmed, asked to join website/steam group on " .. G.os.date() .. "\n" )
6145
6146end
6147*/
6148
6149/*
6150
6151 Hooking & loading.
6152
6153*/
6154
6155function snixzz.LoadHooks()
6156
6157 snixzz.GMHooks = { -- Return the server's original hooks for selected types
6158
6159 ["CreateMove"] = GAMEMODE.CreateMove,
6160 ["HUDPaint"] = GAMEMODE.HUDPaint,
6161 ["StartChat"] = GAMEMODE.StartChat,
6162 ["FinishChat"] = GAMEMODE.FinishChat,
6163 ["PlayerTraceAttack"] = GAMEMODE.PlayerTraceAttack,
6164 ["RenderScene"] = GAMEMODE.RenderScene,
6165
6166 }
6167
6168 function GAMEMODE:RenderScene()
6169
6170 if snixzz.Bools["aim_antiantiaim"] then
6171
6172 snixzz.AAA()
6173
6174 end
6175
6176 end
6177
6178 function GAMEMODE:PlayerTraceAttack( ent, dmg, dir, trace )
6179
6180 local hit = trace.HitPos
6181 local start = trace.StartPos
6182
6183 G.table.insert( snixzz.Bullets, { hit, start, 5, Color( 255, 0, 0, 255 ), snixzz.Angles } )
6184
6185 return snixzz.GMHooks["PlayerTraceAttack"]( ent, dmg, dir, trace )
6186
6187 end
6188
6189 function GAMEMODE:PostDraw2DSkyBox()
6190
6191 if !snixzz.Bools["esp_asus_walls"] then return end
6192
6193 G.render.Clear( 0, 0, 0, 255 )
6194
6195 end
6196
6197 function GAMEMODE:PreDrawSkyBox()
6198
6199 if !snixzz.Bools["esp_asus_walls"] then return end
6200
6201 G.render.Clear( 0, 0, 0, 255 )
6202
6203 return true
6204
6205 end
6206
6207 function GAMEMODE:StartChat()
6208
6209 snixzz.Typing = true
6210
6211 return snixzz.GMHooks.StartChat()
6212 end
6213
6214 function GAMEMODE:FinishChat()
6215
6216 snixzz.Typing = false
6217
6218 return snixzz.GMHooks.FinishChat()
6219 end
6220
6221 function GAMEMODE:ShouldDrawLocalPlayer( ply )
6222
6223 return snixzz.Bools["misc_thirdperson"]
6224
6225 end
6226
6227 if snixzz.Bools["load_unhooked"] then
6228
6229 function GAMEMODE:CreateMove( ucmd )
6230
6231 snixzz.CreateMove( ucmd )
6232
6233 return snixzz.GMHooks.CreateMove( ucmd )
6234 end
6235
6236 function GAMEMODE:HUDPaint( self, ... )
6237
6238 snixzz.HUDPaint()
6239
6240 return snixzz.GMHooks.HUDPaint( self, ... )
6241 end
6242
6243 function GAMEMODE:CalcView( ply, origin, angles, fov )
6244
6245 return snixzz.CalcView( ply, origin, angles, fov )
6246
6247 end
6248
6249 function GAMEMODE:Move()
6250
6251 return snixzz.Move()
6252
6253 end
6254
6255 snixzz.AddToConsole( "Hooking functions into the gamemode's hook system." )
6256
6257 else
6258
6259 snixzz.AddHook( "CreateMove", snixzz.CreateMove )
6260 snixzz.AddHook( "HUDPaint", snixzz.HUDPaint )
6261 snixzz.AddHook( "CalcView", snixzz.CalcView )
6262 snixzz.AddHook( "Move", snixzz.Move )
6263
6264 snixzz.AddToConsole( "Loading unsecured hooks. More detectable but more reliable." )
6265
6266 end
6267
6268end
6269
6270function snixzz.LoadExploits()
6271
6272 if snixzz.Bools["misc_exploits_prophunt"] then
6273
6274 net.Receive( "PH_TeamWinning_Snd", function( len )
6275
6276 snixzz.Chat( Color( 0, 255, 0 ), "Detected round end, attempting to exploit team swap system to become hunter" )
6277
6278 G.RunConsoleCommand( "changeteam", "2" )
6279
6280 end )
6281
6282 net.Receive( "PH_RoundDraw_Snd", function( len )
6283
6284 snixzz.Chat( Color( 0, 255, 0 ), "Detected round draw, attempting to exploit team swap system to become hunter" )
6285
6286 G.RunConsoleCommand( "changeteam", "2" )
6287
6288 end )
6289
6290 end
6291
6292end
6293
6294function snixzz.PingServer( ply ) -- This was overly complicated & I ended up having to do it a really dumb way for now.
6295
6296 snixzz.AddToConsole( "Attempting to ping snixzz server" )
6297
6298 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/ping.php?steamid=" .. ply:SteamID64(),
6299
6300 function( body )
6301
6302 snixzz.AddToConsole( "snixzz server responded to ping with '" .. body .. "'" )
6303
6304 if body == "Error: Retry" then
6305
6306 snixzz.PingServer( LocalPlayer() )
6307
6308 end
6309
6310 end,
6311
6312 function( error )
6313
6314 snixzz.AddToConsole( "ping received, pinging server again in 250 seconds." )
6315
6316 G.timer.Simple( 250, function()
6317
6318 snixzz.PingServer( LocalPlayer() )
6319
6320 end )
6321
6322 end
6323
6324 )
6325
6326end
6327
6328function snixzz.CreateTimers()
6329
6330 if snixzz.IsTTT then
6331
6332 snixzz.RegisterTimer( 10, 0, snixzz.GetTraitors )
6333
6334 end
6335
6336 /*if snixzz.IsDarkRP then
6337
6338 snixzz.RegisterTimer( 10, 0, snixzz.Namechanger )
6339
6340 else
6341
6342 snixzz.RegisterTimer( G.GetConVarNumber( "sv_namechange_cooldown_seconds" ) + 0.5, 0, snixzz.Namechanger )
6343
6344 end*/
6345
6346 snixzz.RegisterTimer( 1, 0, snixzz.ChatSpam )
6347
6348end
6349
6350function snixzz.LoadAllFunctions()
6351
6352 snixzz.UpdateChangelog()
6353
6354 snixzz.FileSystem()
6355
6356 snixzz.Configs = snixzz.GetConfigs()
6357
6358 if !snixzz.ConfigExists( "default" ) then
6359
6360 snixzz.SaveConfig( "default" )
6361
6362 end
6363
6364 snixzz.UpdateAllConfigs()
6365
6366 snixzz.LoadConfig( snixzz.DefaultConfig, true )
6367
6368 snixzz.AntiCheats()
6369 snixzz.CreateDetours()
6370 snixzz.LoadModules()
6371 snixzz.CreateTimers()
6372 snixzz.LoadHooks()
6373 snixzz.LoadExploits()
6374
6375 snixzz.PingServer( LocalPlayer() )
6376
6377end
6378
6379function snixzz.Ban( ply, bantype )
6380
6381 if bantype == "ip" then
6382
6383 snixzz.Chat( Color( 255, 0, 0 ), "You have been IP banned from the snixzz.net services." )
6384
6385 elseif bantype == "id" then
6386
6387 snixzz.Chat( Color( 255, 0, 0 ), "You have been banned from the snixzz.net services." )
6388
6389 end
6390
6391 if snixzz.loadFrame && snixzz.loadProgress then
6392
6393 snixzz.loadProgress:SetFraction( 1 )
6394
6395 snixzz.loadFrame:SetTitle( "Banned." )
6396
6397 snixzz.loadFrame:Close()
6398 snixzz.loadProgress = nil
6399 snixzz.loadFrame = nil
6400
6401 gui.EnableScreenClicker( false )
6402
6403 end
6404
6405
6406 if _G.snixzz then _G.snixzz = nil end
6407
6408end
6409
6410function snixzz.LoadCheat( bool )
6411
6412 if snixzz.loadProgress then
6413
6414 snixzz.loadProgress:SetFraction( 0.4 )
6415 snixzz.loadFrame:SetTitle( "Logged in, sending stats." )
6416
6417 end
6418
6419 if snixzz.Banned then
6420
6421 snixzz.Ban( LocalPlayer(), "id" )
6422
6423 return
6424
6425 end
6426
6427 snixzz.Stats( LocalPlayer(), true, function()
6428
6429 G.chat.AddText( "\n\n\n\n" )
6430
6431 if bool then
6432
6433 snixzz.Chat( Color( 255, 0, 0 ), "Failed to connect to login server, running as guest." )
6434
6435 end
6436
6437 snixzz.logEvent( "Load", "Playing " .. GAMEMODE.Name .. " on " .. GetHostName() )
6438
6439 snixzz.Chat( snixzz.Colors.Green, "Press '" .. G.input.GetKeyName( snixzz.Binds["+menu"] ) .. "' to open the menu & hold TAB+Q to open the console." )
6440
6441 G.chat.AddText(
6442 snixzz.Colors.DarkRed, "[snixzz3] ",
6443 snixzz.Colors.Cyan, "Loaded lua. ",
6444 snixzz.Colors.Purple, snixzz.Info.Version .. ", ",
6445 snixzz.Colors.White, "Last updated ",
6446 snixzz.Colors.Green, snixzz.Info.Updated .. ", ",
6447 Color( 255, 255, 0 ), snixzz.Info.Size .. ", ",
6448 Color( 0, 100, 240 ), snixzz.Info.Lines .. " ",
6449 snixzz.Colors.White, "lines long. ",
6450 snixzz.Colors.Green, "Membership Status: ",
6451 color_white, snixzz.Membership )
6452
6453 snixzz.Chat( snixzz.Colors.Cyan, "Try out our new chat system by pressing '" .. G.input.GetKeyName( snixzz.Binds["chat"] ) .. "' or typing 'chat' in your snixzz3 console." )
6454
6455 snixzz.Sound()
6456
6457 snixzz.Users = {}
6458
6459 // Some shit
6460 for k, v in G.next, G.player.GetAll() do
6461
6462 if v != G.LocalPlayer() then
6463
6464 if snixzz.IsDev( v ) then
6465
6466 snixzz.Chat( Color( 0, 255, 255 ), "The developer of snixzz3 is on the server! Suck " .. v:Nick() .. "'s cock!" ) -- im a faggot
6467
6468 end
6469
6470 end
6471
6472 end
6473
6474
6475 snixzz.loadProgress:SetFraction( 1 )
6476
6477 snixzz.loadFrame:SetTitle( "Done!" )
6478
6479 G.timer.Simple( 0.5, function()
6480
6481 snixzz.loadFrame:Close()
6482 snixzz.loadProgress = nil
6483 snixzz.loadFrame = nil
6484
6485 gui.EnableScreenClicker( false )
6486
6487 //if !snixzz.IsVIP() then
6488
6489 // snixzz.OpenMOTDgdAd( true ) -- Cheat is loaded after the ad
6490
6491 //else
6492
6493 snixzz.LoadAllFunctions()
6494
6495 //end
6496
6497 end )
6498
6499 end )
6500
6501end
6502
6503snixzz.Login( LocalPlayer() )