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