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