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