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