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