· 9 years ago · Feb 01, 2017, 04:20 AM
1/*
2
3 ¦¦¦¦¦¦¦+¦¦¦+ ¦¦+¦¦+¦¦+ ¦¦+¦¦¦¦¦¦¦+¦¦¦¦¦¦¦+¦¦¦¦¦¦+
4 ¦¦+----+¦¦¦¦+ ¦¦¦¦¦¦+¦¦+¦¦+++--¦¦¦+++--¦¦¦+++----¦¦+
5 ¦¦¦¦¦¦¦+¦¦+¦¦+ ¦¦¦¦¦¦ +¦¦¦++ ¦¦¦++ ¦¦¦++ ¦¦¦¦¦++
6 +----¦¦¦¦¦¦+¦¦+¦¦¦¦¦¦ ¦¦+¦¦+ ¦¦¦++ ¦¦¦++ +---¦¦+
7 ¦¦¦¦¦¦¦¦¦¦¦ +¦¦¦¦¦¦¦¦¦¦++ ¦¦+¦¦¦¦¦¦¦+¦¦¦¦¦¦¦+¦¦¦¦¦¦++
8 +------++-+ +---++-++-+ +-++------++------++-----+
9 by 0xymoron
10
11 This is revived & updated version of snixzz2 with lots of code formatting & other updates.
12
13 Fuck MPGH.net
14
15 This will be the GOOD version of snixzz3, with all the features MPGH wouldn't let me add.
16
17 !!! You do not have permission to redistribute this. !!!
18 !!! You do not have permission to modify this, use any of this, or manipulate it in any way. !!!
19
20 -----------------
21
22 Credits
23
24 -----------------
25
26 fr1kin <3 - for teaching me Lua in the first place & tons of help along the way.
27 ethos - TONS of help with optimization & finding my mistakes
28
29 --------------------------
30
31 TODO List & Ideas
32
33 --------------------------
34
35 - [Continue optimizing ESP]
36 Ideas:
37 - Use OnEntityCreated/Removed to shorten needed loops
38 - Only update loop when an entity is created or removed
39
40 - [Get Coder/Code a C++ login & loader] <- implying i'll ever do this
41 - Use SteamID verification, 1 SteamID per customer
42 - IP whitelist on source file
43 - AES? encryption for module
44 - Auto download gmcl_modules or add needed functions to injected .dll
45 - Load before autorun & hide logged location of source.
46 - encrypt lua before running
47 - GarrysMod/ data directory, or SQL.
48
49 -----------------------------------
50
51 Interesting functions/ideas
52
53 -----------------------------------
54
55 gcinfo() - Get Lua memory usage in KB
56 AngRand() - Generates a random pitch, yaw, & roll -90 to 90 & -180 to 180
57 IsUselessModel( mdl )
58 JoinServer( ip )
59 HSVToColor( RealTime() * 120 % 360, 1, 1 ) - Rainbow! ~ I forgot who gave me this, but thanks.
60
61 -------------------------------------
62
63 Potential APIs to integrate
64
65 ------------------------------------
66
67 http://tambal.azurewebsites.net/joke/random - A nice joke generator API output: {"joke":"joke string"}
68
69*/
70
71if _G.snixzz then chat.AddText( Color( 255, 0, 0 ), "\n\n\n\n\nsnixzz3 cannot be reloaded! Reconnect then re-load it." ) return end
72if game.SinglePlayer() then chat.AddText( Color( 255, 0, 0 ), "\n\n\n\n\nsnixzz3 will not load in singleplayer!" ) return end
73
74local snixzz = {}
75
76snixzz.IsDev = function( ply ) return ply:SteamID64() == "76561198361157371" end -- I am not proud of myself.
77
78if 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
79
80snixzz.Panic = false
81
82snixzz.DataFolder = "snixzz3_beta"
83
84snixzz.Info = {
85 ["Version"] = "build 1.3.2b",
86 ["Updated"] = "7/3/16",
87 ["Size"] = "151kb",
88 ["Lines"] = "6,217",
89}
90
91// Data cache
92snixzz.Cache = {}
93snixzz.ConsoleHistory = {}
94snixzz.ChatCache = {}
95snixzz.ChatHistory = {}
96
97local G = table.Copy( _G )
98local _R = G.debug.getregistry()
99local hookGetTableCopy = G.table.Copy( hook.GetTable() )
100
101-- Gamemode checks
102snixzz.IsTTT = G.GAMEMODE.Name == "Trouble in Terrorist Town"
103snixzz.IsDarkRP = ( -- Wow look at all these garbage DarkRP renames.
104G.GAMEMODE.Name == "DarkRP" or G.GAMEMODE.Name == "MethRP" or
105G.GAMEMODE.Name == "The Purge" or G.GAMEMODE.Name == "starwarsrp" or
106G.GAMEMODE.Name == "KingdomRP" or G.GAMEMODE.Name == "MilitaryRP" or
107G.GAMEMODE.Name == "SlaveRP" or G.GAMEMODE.Name == "1942RP" or
108G.GAMEMODE.Name == "ZombieRP" or G.GAMEMODE.Name == "SchoolRP" or
109G.GAMEMODE.Name == "PrisonRP" or G.GAMEMODE.Name == "HaloRP" or
110G.GAMEMODE.Name == "PonyRP" or G.GAMEMODE.Name == "MexicanBorderRPP" or G.GAMEMODE.Name == "HogwartsRP" -- end my suffering. what the fuck is this shit.
111)
112snixzz.IsSandbox = G.GAMEMODE.Name == "Sandbox"
113snixzz.IsMurder = G.GAMEMODE.Name == "Murder"
114snixzz.IsProphunt = G.GAMEMODE.Name == "Prop Hunt" or G.GAMEMODE.Name == "Prophunt"
115
116snixzz.Detours = {
117 ["net.Start"] = {
118 ["checksaum"] = true,
119 ["checksum"] = true,
120 ["gcontrolled_vars"] = true,
121 ["controlled_vars"] = true,
122 ["quack"] = true,
123 ["leyac_cmd"] = true, -- old but blocks old versions
124 },
125 ["Commands"] = {
126 "GetTheTime",
127 },
128}
129
130snixzz["Spoof"] = {
131 ["sv_allowcslua"] = 0,
132 ["sv_cheats"] = 0,
133 ["host_timescale"] = 1,
134 ["host_framerate"] = 0,
135}
136
137// Aimbot vars nd shit
138snixzz.Target = nil
139snixzz.Typing = false
140snixzz.Locked = false
141
142snixzz.Bools = {
143
144 -- Load settings
145 ["load_unhooked"] = false,
146
147 -- Aimbot & view settings
148 ["aim_toggle"] = false,
149 ["aim_autoshoot"] = true,
150 ["aim_silent"] = true,
151 ["aim_psilent"] = false,
152 ["aim_anti"] = false,
153 ["aim_badshots"] = false,
154 ["aim_nospread"] = true,
155 ["aim_norecoil"] = true,
156 ["aim_prediction"] = true,
157 ["aim_antiantiaim"] = false,
158 ["aim_checkfov"] = false,
159 ["aim_ignorelos"] = false,
160 ["aim_ignoresteam"] = true,
161 ["aim_ignoreadmins"] = false,
162 ["aim_ignorebots"] = false,
163 ["aim_ignoreteam"] = false,
164 ["aim_ignorefriends"] = true,
165 ["aim_ignoretraitors"] = false,
166 ["aim_onlytraitors"] = false,
167 ["aim_holdtarget"] = false,
168
169 -- ESP settings
170 ["esp_enabled"] = true,
171 ["esp_name"] = true,
172 ["esp_health_text"] = true,
173 ["esp_health_bar"] = true,
174 ["esp_chams"] = true,
175 ["esp_chams_weapon"] = true,
176 ["esp_weapon"] = true,
177 ["esp_box"] = true,
178 ["esp_crosshair"] = false,
179 ["esp_crosshair_box"] = false,
180 ["esp_laser"] = true,
181 ["esp_nohands"] = true,
182 ["esp_status"] = true,
183 ["esp_list"] = true,
184 ["esp_snaplines"] = false,
185 ["esp_distance"] = false,
186 ["esp_dynamiclight"] = false,
187 ["esp_wireweapon"] = false,
188 ["esp_aimpos"] = false,
189
190 ["misc_bhop"] = true,
191 ["misc_triggerbot"] = false,
192 ["misc_triggerbot_nospread"] = true,
193 ["misc_thirdperson"] = false,
194 ["misc_traitor_finder"] = false,
195 ["misc_murder_finder"] = false,
196 ["misc_prophunt_finder"] = false,
197 ["misc_chat_spam"] = false,
198 ["misc_autostrafe"] = false,
199 ["misc_rapidfire"] = false,
200 ["misc_autoreload"] = false, -- todo
201
202}
203
204snixzz.Vars = {
205
206 -- Aimbot Vars
207 ["aim_distance"] = 2147483647,
208 ["aim_fov"] = 180,
209 ["aim_offset"] = 0,
210 ["aim_method"] = "Hitbox",
211 ["aim_anti_method"] = "Classic",
212 ["aim_hitbox"] = "Head",
213 ["aim_bone"] = "Head",
214 ["aim_target_method"] = "Distance",
215 ["aim_prediction_method"] = "Engine Velocity",
216 ["aim_anti_spin_speed"] = 10,
217 ["aim_target_type"] = "Players",
218
219 -- ESP Vars
220 ["esp_distance"] = 3000,
221 ["esp_chams_material"] = "Solid",
222 ["esp_asus_alpha"] = 0.95,
223 ["esp_box_width"] = 1.5,
224 ["esp_fov"] = 90,
225 ["esp_laser_attachment"] = "Iron Sights",
226 ["esp_type"] = "Players",
227
228 -- Misc Vars
229 ["speedhack_speed"] = 3.5,
230 ["speedhack_type"] = "pSpeed",
231
232 ["misc_triggerbot_method"] = "Hitbox",
233 ["misc_triggerbot_type"] = "Players",
234 ["misc_menucolor"] = Color( 99, 99, 99, 163 ),
235 ["misc_menucolor2"] = Color( 0, 221, 225, 145 ),
236 ["misc_lasercolor"] = Color( 255, 0, 0, 255 ),
237 ["misc_thirdperson_distance"] = 90,
238
239 ["misc_chat_spam_method"] = "Advertise",
240 ["misc_chat_spam_message"] = "Visit www.snixzz.net to download the best Garry's Mod Multi-Hack of 2016", -- TODO: add menu for dis
241
242}
243
244snixzz.Binds = {
245 ["+aimbot"] = KEY_F,
246 ["+menu"] = KEY_INSERT,
247 ["+speedhack"] = KEY_B,
248 ["+triggerbot"] = KEY_G,
249 ["chat"] = KEY_T,
250}
251
252snixzz.Entities = { ["tsp_cooler_base"] = true, }
253snixzz.Friends = {}
254
255snixzz.BadEntities = {
256
257 ["env_sprite"] = true,
258 ["player"] = true,
259 ["prop_physics"] = true,
260 ["prop_door_rotating"] = true,
261 ["prop_dynamic"] = true,
262 ["viewmodel"] = true,
263 ["weapon_physgun"] = true,
264 ["weapon_physcannon"] = true,
265 ["keys"] = true,
266 ["pocket"] = true,
267 ["gmod_tool"] = true,
268 ["physgun_beam"] = true,
269 ["func_door_rotating"] = true,
270 ["func_breakable_surf"] = true,
271 ["worldspawn"] = true,
272 ["func_door"] = true,
273 ["class C_Sun"] = true,
274 ["func_useableladder"] = true,
275 ["class C_BaseEntity"] = true,
276 ["class C_PlayerResource"] = true,
277 ["class C_GMODGameRulesProxy"] = true,
278 ["class C_WaterLODControl"] = true,
279 ["class C_ShadowControl"] = true,
280 ["class C_EnvTonemapController"] = true,
281 ["class C_PhysPropClientside"] = true,
282 ["class C_HL2MPRagdoll"] = true,
283 ["class C_BaseFlex"] = true,
284 ["class C_ParticleSystem"] = true,
285
286}
287
288snixzz.Keys = {
289 [1] = { Name = "A", Key = KEY_A },
290 [2] = { Name = "B", Key = KEY_B },
291 [3] = { Name = "C", Key = KEY_C },
292 [4] = { Name = "D", Key = KEY_D },
293 [5] = { Name = "E", Key = KEY_E },
294 [6] = { Name = "F", Key = KEY_F },
295 [7] = { Name = "G", Key = KEY_G },
296 [8] = { Name = "H", Key = KEY_H },
297 [9] = { Name = "I", Key = KEY_I },
298 [10] = { Name = "J", Key = KEY_J },
299 [11] = { Name = "K", Key = KEY_K },
300 [12] = { Name = "L", Key = KEY_L },
301 [13] = { Name = "M", Key = KEY_M },
302 [14] = { Name = "N", Key = KEY_N },
303 [15] = { Name = "O", Key = KEY_O },
304 [16] = { Name = "P", Key = KEY_P },
305 [17] = { Name = "Q", Key = KEY_Q },
306 [18] = { Name = "R", Key = KEY_R },
307 [19] = { Name = "S", Key = KEY_S },
308 [20] = { Name = "T", Key = KEY_T },
309 [21] = { Name = "U", Key = KEY_U },
310 [22] = { Name = "V", Key = KEY_V },
311 [23] = { Name = "W", Key = KEY_W },
312 [24] = { Name = "X", Key = KEY_X },
313 [25] = { Name = "Y", Key = KEY_Y },
314 [26] = { Name = "Z", Key = KEY_Z },
315 [27] = { Name = "SPACE", Key = KEY_SPACE },
316 [28] = { Name = "TAB", Key = KEY_TAB },
317 [29] = { Name = "Left Shift", Key = KEY_LSHIFT },
318 [30] = { Name = "Right Shift", Key = KEY_RSHIFT },
319 [31] = { Name = "Left Alt", Key = KEY_LALT },
320 [32] = { Name = "Right Alt", Key = KEY_RALT },
321 [33] = { Name = "Delete", Key = KEY_DELETE },
322 [34] = { Name = ".", Key = KEY_PERIOD },
323 [35] = { Name = "/", Key = KEY_SLASH },
324 [36] = { Name = "[", Key = KEY_LBRACKET },
325 [37] = { Name = ";", Key = KEY_SEMICOLON },
326 [38] = { Name = "'", Key = KEY_APOSTROPHE },
327 [39] = { Name = ",", Key = KEY_COMMA },
328 [40] = { Name = "Insert", Key = KEY_INSERT },
329}
330
331snixzz.DefaultConfig = G.file.Read( snixzz.DataFolder .. "/defaultconfig.txt", "DATA" ) or "default"
332
333// nospread shit
334snixzz.RecoilBackup = {}
335
336snixzz.BadWeapons = {
337 ["gmod_tool"] = true,
338 ["gmod_camera"] = true,
339 ["weapon_physgun"] = true,
340 ["weapon_crowbar"] = true,
341 ["keys"] = true,
342 ["pocket"] = true,
343}
344
345snixzz["Colors"] = {
346 ["White"] = Color( 255, 255, 255, 255 ),
347 ["Black"] = Color( 0, 0, 0, 255 ),
348 ["Green"] = Color( 0, 255, 0, 255 ),
349 ["Red"] = Color( 255, 0, 0, 255 ),
350 ["DarkRed"] = Color( 200, 50, 50, 255 ),
351 ["Cyan"] = Color( 0, 255, 255, 255 ),
352 ["Purple"] = Color( 255, 0, 255 ),
353}
354
355snixzz.AdminGroups = {
356 ["trialmod"] = true,
357 ["tmod"] = true,
358 ["trial-mod"] = true,
359 ["trialmoderator"] = true,
360 ["t-mod"] = true,
361 ["mod"] = true,
362 ["moderator"] = true,
363 ["operator"] = true,
364 ["vipmod"] = true,
365 ["vipmoderator"] = true,
366 ["admin"] = true,
367 ["vipadmin"] = true,
368 ["head-admin"] = true,
369 ["headadmin"] = true,
370 ["manager"] = true,
371 ["developer"] = true,
372 ["dev"] = true,
373 ["superadmin"] = true,
374 ["sadmin"] = true,
375 ["super"] = true,
376 ["vipsuperadmin"] = true, -- i cry
377 ["owner"] = true,
378 ["root_user"] = true,
379 ["vipowner"] = true, -- wouldn't be surprised it
380 ["doubleadmin"] = true, -- what the fuck is this
381}
382
383G.surface.CreateFont( "snixzz_status", { font = "coolvetica", size = 20, antialias = true } ) -- HudHintTextLarge
384G.surface.CreateFont( "snixzz_logo", { size = 25, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
385G.surface.CreateFont( "snixzz_logo_small", { size = 13, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
386G.surface.CreateFont( "ESPFont", { size = 14, weight = 200, antialias = false, shadow = true, font = "Arial" } )
387
388/* General notification/display functions */
389
390local sound
391function snixzz.Sound( Error )
392
393 if Error then
394
395 sound = G.Sound( "/HL1/fvox/buzz.wav" )
396
397 else
398
399 sound = G.Sound( "/buttons/button17.wav" )
400
401 end
402
403 local createSound = G.CreateSound( G.LocalPlayer(), sound )
404 createSound:Play()
405
406end
407
408function snixzz.AddToConsole( str )
409
410 if snixzz.ConsoleOpen && snixzz.cHistory && str != nil then
411
412 snixzz.cHistory:AddLine( str )
413
414 snixzz.cHistory:PerformLayout()
415 snixzz.cHistory.VBar:SetScroll( snixzz.cHistory.VBar.CanvasSize )
416
417 end
418
419 G.table.insert( snixzz.ConsoleHistory, str )
420
421end
422
423function snixzz.Message( col, text )
424
425 G.MsgC( snixzz.Colors.Cyan, "[snixzz3]: " )
426 G.MsgC( col, text .. "\n" )
427
428 snixzz.AddToConsole( text )
429
430end
431
432function snixzz.Chat( col, text, bool )
433
434 G.chat.AddText(
435
436 col, "[snixzz3]: ",
437 color_white, text
438
439 )
440
441 if !bool then
442
443 snixzz.AddToConsole( text )
444
445 end
446
447end
448
449function snixzz.ACNotify( text )
450
451 snixzz.Chat( snixzz.Colors.Red, text )
452
453 snixzz.logEvent( "anticheat", text )
454 snixzz.Sound( Error )
455
456end
457
458function snixzz.Debug( text )
459
460 snixzz.AddToConsole( text )
461
462 snixzz.logEvent( "Debug", text )
463
464end
465
466function snixzz.LogDetour( text )
467
468 snixzz.AddToConsole( text )
469
470 snixzz.logEvent( "Detour", text )
471
472end
473
474/* Detour function */
475function snixzz.Detour( Old, New )
476
477 snixzz.Detours[New] = Old
478 snixzz.AddToConsole( "Detouring function " .. G.tostring( Old ) .. "." )
479
480 return New
481end
482
483/* Module Loading */
484snixzz.Functions = {}
485snixzz.LoadedModules = {}
486
487function snixzz.IsInstalled( mod )
488
489 return G.file.Exists( "lua/bin/gmcl_" .. mod .. "_win32.dll", "GAME" )
490
491end
492
493-- ghetto module-less loading
494function snixzz.LoadModules()
495
496 -- Attempt to load modules
497 if G.system.IsWindows() then
498
499 --if snixzz.IsInstalled( "bsendpacket" ) then G.require( "bSendPacket" ) snixzz.LoadedModules["bSendPacket"] = true end
500 if snixzz.IsInstalled( "snixzz2" ) then G.require( "snixzz2" ) snixzz.LoadedModules["snixzz2"] = true end
501
502 end
503
504 -- Check & notify if the module successfully loaded
505 /*if bSendPacket != nil or !G.system.IsWindows() then
506
507 bSendPacket = true
508
509 snixzz.AddToConsole( "Successfully loaded module 'gmcl_bSendPacket_win32.dll'" )
510
511 else
512
513 bSendPacket = nil
514
515 snixzz.Chat( snixzz.Colors.Red, "Unable to load module 'gmcl_bSendPacket_win32.dll', disabling module features." )
516
517 end*/
518
519 if _G.NHTable != nil or !G.system.IsWindows() then
520
521 snixzz.Functions.PredictSpread = _G.NHTable.ZeroSpread
522 snixzz.Functions.LocalPlayer = _G.NHTable.SetLPIndex
523 snixzz.Functions.ConCommand = _G.NHTable.ClientCMD
524 snixzz.Functions.SetViewAngles = _G.NHTable.SetViewAngles
525 snixzz.Functions.NoDraw = _G.NHTable.NoDraw
526 snixzz.Functions.IsDormant = _G.NHTable.IsDormant
527 snixzz.Functions.IsVisible = _G.NHTable.IsVisible
528
529 -- C++ IsVisible func
530 snixzz.IsVisible = function( v, pos )
531
532 if snixzz.Bools["aim_antiantiaim"] then
533
534 snixzz.FixAngle( v )
535
536 end
537
538 return snixzz.Functions.IsVisible( G.LocalPlayer():GetShootPos(), pos, v:EntIndex() )
539 end
540
541 snixzz.AddToConsole( "Successfully loaded module 'gmcl_snixzz2_win32.dll'" )
542
543 _G.NHTable = nil
544
545 else
546
547 snixzz.Functions.PredictSpread = function( cmd, ang, vec ) return ang end
548 snixzz.Functions.LocalPlayer = G.LocalPlayer()
549 snixzz.Functions.ConCommand = function( cmd ) G.LocalPlayer():ConCommand( cmd ) end
550 snixzz.Functions.NoDraw = function( mat, bool ) end
551 snixzz.Functions.SetViewAngles = function( cmd, ang ) cmd:SetViewAngles( ang ) end
552 snixzz.Functions.IsDormant = function( index ) return false end
553
554 -- Lua IsVisible func
555 snixzz.Functions.IsVisible = function( shootpos, pos, v ) return false end
556
557 snixzz.IsVisible = function( v, pos )
558
559 if snixzz.Bools["aim_antiantiaim"] then
560
561 snixzz.FixAngle( v )
562
563 end
564
565 local traceTab = { start = G.LocalPlayer():GetShootPos(), endpos = pos, mask = MASK_SHOT, filter = function( entity ) return !entity:IsPlayer() end }
566 local trace = G.util.TraceLine( traceTab )
567 return !trace.Hit
568
569 end
570
571 snixzz.Chat( snixzz.Colors.Red, "Unable to load module 'gmcl_snixzz2_win32.dll', disabling module features." )
572
573 end
574
575end
576
577/*
578
579 VIP/Advertisement System/Stats
580 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.
581
582 This system is constantly being worked on.
583 I like tracking stats, there's really no reason for it I just enjoy seeing who's actually using my work.
584
585*/
586
587snixzz.Membership = "nil"
588
589function snixzz.Login( ply )
590
591 gui.EnableScreenClicker( true )
592
593 snixzz.loadFrame = G.vgui.Create( "DFrame" )
594 snixzz.loadFrame:SetTitle( "Logging in as '" .. ply:SteamID64() .. "'" )
595 snixzz.loadFrame:SetSize( 250, 50 )
596 snixzz.loadFrame:Center()
597 snixzz.loadFrame:ShowCloseButton( false )
598 snixzz.loadFrame:SetBackgroundBlur( true )
599 snixzz.loadFrame:SetDraggable( false )
600
601 snixzz.loadFrame.Paint = function( self )
602
603 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 100 ) )
604 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
605 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
606 end
607
608 snixzz.loadProgress = G.vgui.Create( "DProgress", snixzz.loadFrame )
609 snixzz.loadProgress:SetPos( 5, 22.5 )
610 snixzz.loadProgress:SetSize( snixzz.loadFrame:GetWide() - 10, snixzz.loadFrame:GetTall() - 27.5 )
611 snixzz.loadProgress:SetFraction( 0.1 )
612
613 local oSystem = "Unknown"
614 local oIP = "Unknown"
615
616 if system.IsWindows() then oSystem = "Windows" elseif system.IsLinux() then oSystem = "Linux" elseif system.IsOSX() then oSystem = "OSX" else oSystem = "Unknon" end
617
618 snixzz.loadProgress:SetFraction( 0.2 )
619
620 snixzz.loadFrame:SetTitle( "Connecting to login server" )
621
622 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/register.php?steamid=" .. ply:SteamID64() .. "&os=" .. oSystem, -- stop spamming this faggots
623
624 function( body )
625
626 snixzz.loadFrame:SetTitle( "Connected, getting user info." )
627
628 if body == "Error: Banned" then
629
630 snixzz.Ban( ply, "ip" )
631
632 return
633
634 end
635
636 local tab = util.JSONToTable( body )
637
638 if istable( tab ) then
639
640 if tab.group == "user" then
641
642 snixzz.Membership = "dev"
643
644 elseif tab.group == "vip" then
645
646 snixzz.Membership = "vip"
647
648 elseif tab.group == "banned" then
649
650 snixzz.Membership = "banned"
651 snixzz.Banned = true
652
653 elseif body == "Error: Invalid SteamID64" then
654
655 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/" )
656
657 snixzz.Membership = "user"
658
659 else
660
661 snixzz.Chat( Color( 255, 0, 0 ), "Failed to fetch user data from login server, running as guest." )
662
663 snixzz.Membership = "guest"
664
665 end
666
667 snixzz.loadProgress:SetFraction( 0.3 )
668
669 snixzz.LoadCheat()
670
671 elseif string.find( body, "Error: " ) then
672
673 snixzz.loadProgress:SetFraction( 0.3 )
674
675 snixzz.Membership = "dev"
676
677 snixzz.LoadCheat()
678
679 else
680
681 snixzz.loadFrame:SetTitle( "Received bad login info." )
682
683 snixzz.Membership = "guest"
684
685 snixzz.Chat( Color( 255, 0, 0 ), "Received bad login response, running as guest." )
686
687 snixzz.LoadCheat()
688
689 end
690
691 end,
692
693 function( error )
694
695 snixzz.loadFrame:SetTitle( "Failed to connect to login server." )
696
697 snixzz.Membership = "guest"
698
699 snixzz.LoadCheat( true )
700
701 end
702
703 )
704
705end
706
707function snixzz.IsVIP()
708
709 return snixzz.Membership == "user" or snixzz.Membership == "dev"
710
711end
712
713function snixzz.Stats( ply, loading, func )
714
715 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/stats.php?steamid=" .. ply:SteamID64() .. "&load=" .. tostring( loading ),
716
717 function( body )
718
719 if loading && snixzz.loadProgress then
720
721 snixzz.loadProgress:SetFraction( 0.7 )
722
723 end
724
725 if !string.find( body, "Error:" ) then
726
727 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/stats/totalruns.txt",
728
729 function( statsbody )
730
731 if loading && snixzz.loadProgress then
732
733 snixzz.loadProgress:SetFraction( 0.8 )
734
735 func()
736
737 end
738
739 snixzz.AddToConsole( "Successfully posted stats, snixzz3 has now been ran " .. string.Comma( statsbody ) .. " times." )
740
741 end,
742
743 function( error )
744
745 snixzz.Chat( Color( 255, 0, 0 ), "Failed to receive stats." )
746
747 if loading && snixzz.loadProgress then
748
749 snixzz.loadProgress:SetFraction( 0.8 )
750
751 func()
752
753 end
754
755 end
756
757 )
758
759 else
760
761 snixzz.Chat( Color( 255, 0, 0 ), "Failed to post stats. (" .. body .. ")" )
762
763 end
764
765 end,
766
767 function( error )
768
769 snixzz.Chat( Color( 255, 0, 0 ), "Failed to post stats." )
770
771 end
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( "http://motdgd.com/motd/?user=11606&fv=1&ip=66.150.164.192&pt=27015&gm=garrysmod&st=" .. LocalPlayer():SteamID() .. "&v=2.07&sec=20" )
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
1994}
1995
1996snixzz.Bones = {
1997
1998 ["Head"] = "ValveBiped.Bip01_Head1",
1999 ["Neck"] = "ValveBiped.Bip01_Neck1",
2000 ["Spine"] = "ValveBiped.Bip01_Spine",
2001 ["Spine2"] = "ValveBiped.Bip01_Spine2",
2002 ["Spine4"] = "ValveBiped.Bip01_Spine4",
2003 ["Pelvis"] = "ValveBiped.Bip01_Pelvis",
2004 ["R Upperarm"] = "ValveBiped.Bip01_R_UpperArm",
2005 ["R Forearm"] = "ValveBiped.Bip01_R_Forearm",
2006 ["R Hand"] = "ValveBiped.Bip01_R_Hand",
2007 ["L Upperarm"] = "ValveBiped.Bip01_L_UpperArm",
2008 ["L Forearm"] = "ValveBiped.Bip01_L_Forearm",
2009 ["L Hand"] = "ValveBiped.Bip01_L_Hand",
2010 ["R Thigh"] = "ValveBiped.Bip01_R_Thigh",
2011 ["R Calf"] = "ValveBiped.Bip01_R_Calf",
2012 ["R Foot"] = "ValveBiped.Bip01_R_Foot",
2013 ["R Toes"] = "ValveBiped.Bip01_R_Toe0",
2014 ["L Thigh"] = "ValveBiped.Bip01_L_Thigh",
2015 ["L Calf"] = "ValveBiped.Bip01_L_Calf",
2016 ["L Foot"] = "ValveBiped.Bip01_L_Foot",
2017 ["L Toes"] = "ValveBiped.Bip01_L_Toe0",
2018
2019}
2020
2021snixzz.Hitboxes = {
2022
2023 ["Head"] = 0,
2024 ["L Upperarm"] = 1,
2025 ["L Forearm"] = 2,
2026 ["L Hand"] = 3,
2027 ["R Upperarm"] = 4,
2028 ["R Forearm"] = 5,
2029 ["R Hand"] = 6,
2030 ["L Thigh"] = 7,
2031 ["L Calf"] = 8,
2032 ["F Foot"] = 9,
2033 ["L Toe"] = 10,
2034 ["R Thigh"] = 11,
2035 ["R Calf"] = 12,
2036 ["R Foot"] = 13,
2037 ["R Toe"] = 14,
2038 ["Pelvis"] = 15,
2039 ["Spine"] = 16,
2040
2041}
2042
2043snixzz.Hitscans = {
2044 0, -- head
2045 16, -- spine
2046 4, -- r upper arm
2047 1, -- l upper arm
2048 5, -- r forearm
2049 2, -- l forearm
2050 6, -- r hand
2051 3, -- l hand
2052 15, -- pelvis
2053 11, -- r thigh
2054 7, -- l thigh
2055 12, -- r calf
2056 8, -- l calf
2057 13, -- r foot
2058 9, -- l foot
2059}
2060
2061snixzz.Hitgroups = {
2062 [HITGROUP_HEAD] = "Head",
2063 [HITGROUP_CHEST] = "Chest",
2064 [HITGROUP_STOMACH] = "Stomach",
2065 [HITGROUP_LEFTARM] = "Left Arm",
2066 [HITGROUP_RIGHTARM] = "Right Arm",
2067 [HITGROUP_LEFTLEG] = "Left Leg",
2068 [HITGROUP_RIGHTLEG] = "Right Leg",
2069}
2070
2071local Hitbox
2072local HitboxPos
2073local Bone
2074local BonePos
2075local Hitscan
2076local HitscanPos
2077local HitMin, HitMax
2078function snixzz.GetPos( v )
2079
2080 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
2081
2082 return v:LocalToWorld( v:OBBCenter() )
2083
2084 elseif snixzz.Vars["aim_target_type"] == "NPC" or snixzz.Vars["aim_target_type"] == "Both" && v:IsNPC() then
2085
2086 local bones = snixzz.NPCModels[v:GetModel()]
2087
2088 if !bones then
2089
2090 for k, v in G.next, snixzz.Bones do
2091
2092 if v[1] == snixzz.Vars["aim_bone"] then
2093
2094 bones = v[2]
2095
2096 end
2097
2098 end
2099
2100 bones = bones or "ValveBiped.Bip01_Head1"
2101
2102 end
2103
2104 local bone = v:LookupBone( bones )
2105
2106 if bone then
2107
2108 local pos, ang = v:GetBonePosition( bone )
2109
2110 return pos, ang
2111
2112 end
2113
2114 elseif snixzz.Vars["aim_target_type"] == "Players" or snixzz.Vars["aim_target_type"] == "Both" && v:IsPlayer() then
2115
2116 if snixzz.Vars["aim_method"] == "Hitbox" then
2117
2118 Hitbox = v:GetHitBoxBone( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
2119 HitboxPos = v:GetBonePosition( Hitbox )
2120
2121 local min, max = v:GetHitBoxBounds( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
2122
2123 return HitboxPos + ( min + max ) / 2
2124
2125 elseif snixzz.Vars["aim_method"] == "Bone" then
2126
2127 Bone = snixzz.Bones[snixzz.Vars["aim_bone"]]
2128 BonePos = v:LookupBone( Bone )
2129
2130 if BonePos then
2131
2132 local pos, ang = v:GetBonePosition( BonePos )
2133 return pos, ang
2134
2135 end
2136
2137 elseif snixzz.Vars["aim_method"] == "Hitscan" then
2138
2139 for k, e in G.next, snixzz.Hitscans do
2140
2141 Hitscan = v:GetHitBoxBone( snixzz.Hitscans[k], 0 )
2142
2143 if Hitscan != nil then
2144
2145 HitscanPos = v:GetBonePosition( Hitscan )
2146 HitMin, HitMax = v:GetHitBoxBounds( snixzz.Hitscans[k], 0 )
2147
2148 if snixzz.IsVisible( v, HitscanPos + ( HitMin + HitMax ) / 2 ) then
2149
2150 return HitscanPos + ( HitMin + HitMax ) / 2
2151
2152 end
2153
2154 end
2155
2156 end
2157
2158 end
2159
2160 end
2161
2162 return v:LocalToWorld( v:OBBCenter() )
2163end
2164
2165function snixzz.InFov( v )
2166 -- wip
2167 return true
2168end
2169
2170-- thanks asutorea
2171function snixzz.CanFire()
2172
2173 local wep = G.LocalPlayer():GetActiveWeapon()
2174
2175 if snixzz.properCurTime == nil then return false end
2176
2177 return G.IsValid( wep ) && !snixzz.BadWeapons[wep:GetClass()] && wep:GetActivity() != ACT_RELOAD && wep:GetNextPrimaryFire() < snixzz.properCurTime && G.LocalPlayer():Alive()
2178end
2179
2180-- pAntiAnti Aim
2181function snixzz.FixAngle( v )
2182
2183 local eyeAngles = _R.Entity.EyeAngles( v )
2184
2185 if eyeAngles.p < -89 then
2186
2187 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p + 180 )
2188 _R.Entity.InvalidateBoneCache( v )
2189
2190 elseif eyeAngles.p > 89 then
2191
2192 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p - 180 )
2193 _R.Entity.InvalidateBoneCache( v )
2194
2195 end
2196
2197end
2198
2199function snixzz.OnScreen( v )
2200
2201 local a, f = _R.Player.GetAimVector( G.LocalPlayer() ):Angle() - ( v:GetPos() - G.LocalPlayer():GetShootPos() ):Angle(), _R.Player.GetFOV( G.LocalPlayer() )
2202
2203 return ( G.math.NormalizeAngle( a.y ) < f + 2 && G.math.NormalizeAngle( a.p ) < f + 2 )
2204end
2205
2206function snixzz.IsDormant( index )
2207
2208 return snixzz.Functions.IsDormant( index )
2209
2210end
2211
2212function snixzz.FixMove( ucmd, aa )
2213
2214 local fixAngle = G.Vector( ucmd:GetForwardMove(), ucmd:GetSideMove(), 0 )
2215 fixAngle = (( fixAngle:GetNormal() ):Angle() + ( ucmd:GetViewAngles() - G.Angle( 0, snixzz.Silent.y, 0 ) ) ):Forward() * fixAngle:Length()
2216
2217 if aa then
2218
2219 ucmd:SetForwardMove( fixAngle.x )
2220 ucmd:SetSideMove( fixAngle.y * -1 )
2221
2222 return
2223 end
2224
2225 ucmd:SetForwardMove( fixAngle.x )
2226 ucmd:SetSideMove( fixAngle.y )
2227
2228end
2229
2230function snixzz.NormalizeAngles( ang )
2231
2232 ang.p = G.math.NormalizeAngle( ang.p )
2233 ang.y = G.math.NormalizeAngle( ang.y )
2234 ang.r = 0
2235
2236 return ang
2237end
2238
2239snixzz.PredPositions = {}
2240local tbl = snixzz.PredPositions[v] or {}
2241
2242function snixzz.GetPredictionPos( v, pos )
2243
2244 tbl.pos = tbl.pos or pos or _R.Entity.GetPos( v )
2245
2246 local realTime = G.RealTime()
2247
2248 if tbl.realTime != realTime then
2249
2250 tbl.realTime = realTime
2251 tbl.pos = pos or _R.Entity.GetPos( v )
2252
2253 end
2254
2255 tbl.velocity = v:GetVelocity()
2256 snixzz.PredPositions = tbl
2257
2258 return tbl.pos
2259end
2260
2261snixzz.PredictionMethods = { "Velocity 0.0075", "Engine Velocity", "Classic", "Herpes", "ColdFire", "FapHack" }
2262snixzz.PredWeapons = {
2263
2264 ["weapon_crossbow"] = 3110,
2265 ["weapon_frag"] = 3110,
2266
2267}
2268
2269local tPos, lVelocity, tVelocity, tDistance, predTime
2270-- Some methods are BASED on other cheat's methods, I suck at prediction.
2271function snixzz.Prediction( Pos, v )
2272
2273 local wep = G.LocalPlayer():GetActiveWeapon()
2274 lVelocity = _R.Entity.GetVelocity( G.LocalPlayer() )
2275 tVelocity = _R.Entity.GetVelocity( v )
2276 tPos = _R.Entity.GetPos( v )
2277 lPos = _R.Entity.GetPos( G.LocalPlayer() )
2278 tDistance = lPos:Distance( tPos )
2279
2280 if G.IsValid( v ) && G.type( tVelocity ) == "Vector" && G.type( tPos ) == "Vector" then
2281
2282 if wep && G.IsValid( wep ) && snixzz.PredWeapons[wep:GetClass()] then
2283
2284 predTime = distance / snixzz.PredWeapons[wep:GetClass()]
2285 Pos = Pos + tVelocity * predTime
2286
2287 else
2288
2289 if snixzz.Vars["aim_prediction_method"] == "Velocity 0.0075" then
2290
2291 Pos = Pos + lVelocity * 0.0075 + tVelocity * 0.0075
2292
2293 elseif snixzz.Vars["aim_prediction_method"] == "Engine Velocity" then
2294
2295 Pos = Pos + tVelocity * G.engine.TickInterval() - lVelocity * G.engine.TickInterval()
2296
2297 elseif snixzz.Vars["aim_prediction_method"] == "Classic" then
2298
2299 Pos = Pos + tVelocity / 45 - lVelocity / 45
2300
2301 elseif snixzz.Vars["aim_prediction_method"] == "Herpes" then
2302
2303 tPos = snixzz.GetPredictionPos( v, Pos ) - Pos
2304 Pos = Pos + ( tPos * 2 ) - ( lVelocity / 50 )
2305
2306 elseif snixzz.Vars["aim_prediction_method"] == "ColdFire" then
2307
2308 Pos = Pos - tVelocity:GetNormal() / 5.8 + lVelocity:GetNormal() / 3
2309
2310 elseif snixzz.Vars["aim_prediction_method"] == "FapHack" then
2311
2312 Pos = Pos + tVelocity * 0.02 - lVelocity * 0.05
2313
2314 end
2315
2316 end
2317
2318 end
2319
2320 return Pos
2321end
2322
2323function snixzz.GetTarget()
2324
2325 local x, y = G.ScrW(), G.ScrH()
2326 local vPos
2327 local oldPos = G.LocalPlayer():EyePos():ToScreen()
2328 local distance = G.math.huge
2329 local AngA
2330 local AngB
2331 //local target
2332
2333 local Method
2334
2335 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
2336
2337 Method = G.ents.GetAll()
2338
2339 elseif snixzz.Vars["aim_target_type"] == "NPC" then
2340
2341 Method = G.ents.GetAll()
2342
2343 elseif snixzz.Vars["aim_target_type"] == "Players" then
2344
2345 Method = G.player.GetAll()
2346
2347 elseif snixzz.Vars["aim_target_type"] == "Both" then
2348
2349 Method = G.ents.GetAll()
2350
2351 end
2352
2353 for k, v in G.next, Method do
2354
2355 vPos = v:GetPos():ToScreen()
2356 distance2 = v:GetPos():DistToSqr( G.LocalPlayer():GetPos() )
2357 AngA = G.math.Dist( x / 2, y / 2, oldPos.x, oldPos.y )
2358 AngB = G.math.Dist( x / 2, y / 2, vPos.x, vPos.y )
2359
2360 if snixzz.IsValid( v, "Aimbot" ) then
2361
2362 if snixzz.Vars["aim_target_method"] == "Distance" then
2363
2364 if distance2 < distance then
2365
2366 distance = distance2
2367 return v
2368
2369 end
2370
2371 elseif snixzz.Vars["aim_target_method"] == "Crosshair" then
2372
2373 if AngB <= AngA then
2374
2375 return v
2376
2377 end
2378
2379 end
2380
2381 else
2382
2383 continue
2384
2385 end
2386
2387 end
2388
2389 return nil
2390end
2391
2392snixzz.Firing = false
2393function snixzz.Fire( ucmd )
2394
2395 if snixzz.Firing then
2396
2397 ucmd:RemoveKey( G.IN_ATTACK )
2398 snixzz.Firing = false
2399
2400 else
2401
2402 ucmd:SetButtons( G.bit.bor( ucmd:GetButtons(), G.IN_ATTACK ) )
2403 snixzz.Firing = true
2404
2405 end
2406
2407end
2408
2409snixzz.FakeSwitch = false
2410snixzz.FakeAngle = G.Angle()
2411snixzz.AntiAimMethods = { "Classic", "Classic Inverted", "Static", "Jitter", "Random Pitch",/* "Fake Angles", "Fake Jitter", */"Spin", /*"Fake Spin"*/ }
2412function snixzz.AntiAim( ucmd )
2413
2414 local pitches = { -181, 541, 262 }
2415 local yaws = { 262, -262, 181, -181, 541, -541 }
2416
2417 -- OG anti-aim
2418 if snixzz.Vars["aim_anti_method"] == "Classic" then
2419
2420 snixzz.Functions.SetViewAngles( ucmd, G.Angle( 181, ucmd:GetViewAngles().y, 180 ) )
2421 snixzz.FixMove( ucmd )
2422
2423 -- Looking down instead of up
2424 elseif snixzz.Vars["aim_anti_method"] == "Classic Inverted" then
2425
2426 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -181, ucmd:GetViewAngles().y, 180 ) )
2427 snixzz.FixMove( ucmd )
2428
2429 -- Static
2430 elseif snixzz.Vars["aim_anti_method"] == "Static" then
2431
2432 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -snixzz.Angles.p + 900, snixzz.Angles.y + 180, 0 ) )
2433 snixzz.FixMove( ucmd, true )
2434
2435 -- Jitter - credits to cdriza
2436 elseif snixzz.Vars["aim_anti_method"] == "Jitter" then
2437
2438 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.table.Random( pitches ), G.table.Random( yaws ), 0 ) )
2439 snixzz.FixMove( ucmd, true )
2440
2441 -- Randomized pitch
2442 elseif snixzz.Vars["aim_anti_method"] == "Random Pitch" then
2443
2444 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ucmd:GetViewAngles().y, 180 ) )
2445 snixzz.FixMove( ucmd )
2446
2447 -- bSendPacket Fake Angles
2448 /*elseif snixzz.Vars["aim_anti_method"] == "Fake Angles" then
2449
2450 snixzz.FakeAngle = ucmd:GetViewAngles()
2451
2452 if snixzz.FakeSwitch then
2453
2454 bSendPacket = true
2455 //snixzz.Functions.SendPacket( true )
2456 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y + 90, 0 ) )
2457
2458 else
2459
2460 bSendPacket = false
2461 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y - 90, 0 ) )
2462
2463 end
2464
2465 snixzz.FixMove( ucmd, true )
2466 snixzz.FakeSwitch = !snixzz.FakeSwitch
2467
2468 -- bSendPacket Fake Jitter
2469 elseif snixzz.Vars["aim_anti_method"] == "Fake Jitter" then
2470
2471 snixzz.FakeAngle = ucmd:GetViewAngles()
2472
2473 if snixzz.FakeSwitch then
2474
2475 bSendPacket = true
2476 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y + 90, 0 ) )
2477
2478 else
2479
2480 bSendPacket = false
2481 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y - 90, 0 ) )
2482
2483 end
2484
2485 snixzz.FixMove( ucmd, true )
2486 snixzz.FakeSwitch = !snixzz.FakeSwitch
2487
2488 */
2489
2490 -- Simple spinbot with -192 pitch
2491 elseif snixzz.Vars["aim_anti_method"] == "Spin" then
2492
2493 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
2494 snixzz.FixMove( ucmd, false )
2495
2496 -- bSendPacket Spinbot
2497 /*elseif snixzz.Vars["aim_anti_method"] == "Fake Spin" then
2498
2499 snixzz.FakeAngle = ucmd:GetViewAngles()
2500
2501 if FakeSwitch then
2502
2503 bSendPacket = true
2504 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
2505
2506 else
2507
2508 bSendPacket = false
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
2511 end
2512
2513 snixzz.FixMove( ucmd, false )
2514 */
2515 end
2516
2517end
2518
2519-- To shorten up my aimbot checks a bit.
2520function snixzz.ShouldAim( ucmd, isToggled )
2521
2522 return snixzz.Target && snixzz.IsValid( snixzz.Target, "Aimbot" ) && ucmd:CommandNumber() != 0// && snixzz.CanFire()
2523
2524end
2525
2526function snixzz.InMenu()
2527
2528 return snixzz.Typing && snixzz.ChatboxOpen && G.gui.IsConsoleVisible() && G.gui.IsGameUIVisible()
2529
2530end
2531
2532/*=======================
2533
2534
2535Hooked functions below
2536
2537
2538=========================*/
2539snixzz.Status = "Waiting..."
2540snixzz.StatusColor = Color( 255, 255, 0, 150 )
2541snixzz.Silent = G.Angle()
2542snixzz.BulletTime = true
2543snixzz.StuckSwitch = false
2544snixzz.StuckTicks = 0
2545snixzz.pDelay = 0
2546//snixzz.SpreadPos = G.Vector( 0, 0, 0 )
2547
2548function snixzz.CreateMove( ucmd )
2549
2550 // Silent aim
2551 snixzz.Silent = snixzz.Silent + G.Angle( ucmd:GetMouseY() * 0.022, -ucmd:GetMouseX() * 0.022, 0 )
2552 snixzz.Silent.p = G.math.Clamp( snixzz.Silent.p, -89, 89 )
2553 snixzz.Silent.y = G.math.NormalizeAngle( snixzz.Silent.y )
2554
2555 ucmd:SetViewAngles( snixzz.Silent )
2556
2557 if ucmd:CommandNumber() == 0 then
2558
2559 return
2560 end
2561
2562 if !snixzz.Bools["aim_holdtarget"] then
2563
2564 snixzz.Target = snixzz.GetTarget()
2565
2566 end
2567
2568 snixzz.Offset = G.Vector( 0, 0, snixzz.Vars["aim_offset"] )
2569
2570 snixzz.Angles = snixzz.Silent
2571
2572 // Aimbot core
2573 if ( snixzz.Binds["+aimbot"] != nil && G.input.IsKeyDown( snixzz.Binds["+aimbot"] ) && !snixzz.ChatboxOpen && !snixzz.Typing or snixzz.Bools["aim_toggle"] ) then
2574
2575 if snixzz.Bools["aim_holdtarget"] then
2576
2577 if snixzz.Target == nil or snixzz.Target != nil && !snixzz.IsValid( snixzz.Target, "Aimbot" ) then
2578
2579 snixzz.Target = snixzz.GetTarget()
2580
2581 end
2582
2583 end
2584
2585 if snixzz.ShouldAim( ucmd, snixzz.Bools["aim_toggle"] ) then
2586
2587 snixzz.Angles = snixzz.GetPos( snixzz.Target ) - snixzz.Offset
2588
2589 if snixzz.Bools["aim_prediction"] then
2590
2591 snixzz.Angles = snixzz.Prediction( snixzz.Angles, snixzz.Target )
2592
2593 end
2594
2595 snixzz.Angles = ( snixzz.Angles - G.LocalPlayer():GetShootPos() ):Angle()
2596
2597 -- View punch fix
2598 if snixzz.Bools["aim_norecoil"] then
2599
2600 snixzz.CorrectRecoil( ucmd )
2601
2602 end
2603
2604 -- Spread Prediction
2605 if snixzz.Bools["aim_nospread"] then
2606
2607 if snixzz.Bools["aim_badshots"] then
2608
2609 if G.math.random( 1, 5 ) == 1 then
2610
2611 snixzz.Angles = snixzz.Angles
2612
2613 else
2614
2615 snixzz.Angles = snixzz.PredictSpread( ucmd, G.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
2616
2617 end
2618
2619 else
2620
2621 snixzz.Angles = snixzz.PredictSpread( ucmd, G.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
2622
2623 end
2624
2625 end
2626
2627 snixzz.NormalizeAngles( snixzz.Angles )
2628
2629 -- Set angles
2630 snixzz.Functions.SetViewAngles( ucmd, snixzz.Angles )
2631
2632 -- autofire
2633 if snixzz.Bools["aim_autoshoot"] then
2634
2635 snixzz.Fire( ucmd )
2636
2637 end
2638
2639 -- Silent aim view & move correction
2640 if snixzz.Bools["aim_silent"] then
2641
2642 snixzz.FixMove( ucmd )
2643
2644 else
2645
2646 snixzz.Silent = snixzz.Angles
2647
2648 end
2649
2650 -- ghetto aimbot status
2651 if snixzz.Target:IsPlayer() then
2652
2653 snixzz.Status = "Locked! (" .. snixzz.Target:Nick() .. ")"
2654
2655 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2656 snixzz.Locked = true
2657
2658 elseif snixzz.Target:IsNPC() then
2659
2660 snixzz.Status = "Locked! (" .. snixzz.Target:GetModel() .. ")"
2661
2662 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2663 snixzz.Locked = true
2664
2665 elseif snixzz.IsProphunt && snixzz.IsProp( snixzz.Target ) && snixzz.IsProp( snixzz.Target ) then
2666
2667 snixzz.Status = "Locked! (" .. snixzz.Target:GetOwner():Name() .. ")"
2668
2669 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2670 snixzz.Locked = true
2671
2672 end
2673
2674 else
2675
2676 snixzz.Target = nil
2677 snixzz.Status = "Searching..."
2678 snixzz.StatusColor = Color( 0, 255, 0, 150 )
2679 snixzz.Locked = false
2680
2681 end
2682
2683 else
2684
2685 snixzz.Target = nil
2686 snixzz.Status = "Searching..."
2687 snixzz.StatusColor = Color( 0, 255, 0, 150 )
2688 snixzz.Locked = false
2689
2690 end
2691
2692 -- Rapid-Fire
2693 if snixzz.Bools["misc_rapidfire"] && ucmd:KeyDown( IN_ATTACK ) && !snixzz.Locked then
2694
2695 snixzz.Fire( ucmd )
2696
2697 end
2698
2699 -- Triggerbot
2700 if snixzz.Binds["+triggerbot"] != nil && snixzz.Bools["misc_triggerbot"] or G.input.IsKeyDown( snixzz.Binds["+triggerbot"] ) then
2701
2702 snixzz.StatusColor = Color( 255, 255, 0, 150 )
2703 snixzz.Status = "Triggerbot Searching.."
2704 local hitgroup = G.LocalPlayer():GetEyeTrace().HitGroup
2705 local entity = G.LocalPlayer():GetEyeTrace().Entity
2706 snixzz.SpreadPos = G.LocalPlayer():GetEyeTrace().HitPos
2707
2708 if snixzz.Vars["misc_triggerbot_type"] == "NPC" or snixzz.Vars["misc_triggerbot_type"] == "Both" && entity:IsNPC() then
2709
2710 if snixzz.IsValid( entity, "Triggerbot" ) then
2711
2712 if snixzz.Bools["misc_triggerbot_nospread"] then
2713
2714 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2715 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2716 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2717
2718 end
2719
2720 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2721 snixzz.Status = "Firing! (" .. entity:GetModel() .. ")"
2722
2723 snixzz.Fire( ucmd )
2724
2725 end
2726
2727 elseif snixzz.Vars["misc_triggerbot_method"] == "Body" then
2728
2729 if snixzz.IsValid( entity, "Triggerbot" ) then
2730
2731 if snixzz.Bools["misc_triggerbot_nospread"] then
2732
2733 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2734 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2735 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2736
2737 end
2738
2739 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2740 snixzz.Status = "Firing! (" .. entity:Nick() .. ")"
2741
2742 snixzz.Fire( ucmd )
2743
2744 end
2745
2746 elseif snixzz.Vars["misc_triggerbot_method"] == "Hitbox" then
2747
2748 if snixzz.Hitgroups[hitgroup] != nil && snixzz.IsValid( entity, "Triggerbot" ) then
2749
2750 if snixzz.Bools["misc_triggerbot_nospread"] then
2751
2752 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
2753 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
2754 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
2755
2756 end
2757
2758 snixzz.StatusColor = Color( 255, 0, 0, 150 )
2759 snixzz.Status = "Firing! (" .. entity:Nick() .. ")"
2760
2761 snixzz.Fire( ucmd )
2762
2763 end
2764
2765 end
2766
2767 end
2768
2769 -- Anti-Aim
2770 if snixzz.Bools["aim_anti"] && !snixzz.Locked && !ucmd:KeyDown( IN_ATTACK ) && !ucmd:KeyDown( IN_USE ) && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER then
2771
2772 snixzz.AntiAim( ucmd )
2773
2774 end
2775
2776 // Bunnyhop & autostrafe
2777 if snixzz.Bools["misc_bhop"] then
2778
2779 if !G.LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !snixzz.Typing then
2780
2781 if !G.LocalPlayer():OnGround() && ucmd:KeyDown( IN_JUMP )then
2782
2783 ucmd:SetButtons( G.bit.band( ucmd:GetButtons(), G.bit.bnot( IN_JUMP ) ) )
2784
2785 -- Autostrafe shamelessly ripped from "public hvh v1".
2786 -- i don't understand this shit.
2787 if snixzz.Bools["misc_autostrafe"] then
2788
2789 if ucmd:GetMouseX() > 1 or ucmd:GetMouseX() < - 1 then
2790
2791 ucmd:SetSideMove( ucmd:GetMouseX() > 1 && 400 or 400 )
2792
2793 else
2794
2795 ucmd:SetForwardMove( 5850 / G.LocalPlayer():GetVelocity():Length2D() )
2796 ucmd:SetSideMove( ( ucmd:CommandNumber() % 2 == 0 ) && -400 or 400 ) -- what the fuck. who thought of this shit.
2797
2798 end
2799
2800 end
2801
2802 elseif ucmd:KeyDown( IN_JUMP ) && snixzz.Bools["misc_autostrafe"] then
2803
2804 ucmd:SetForwardMove( 10000 )
2805
2806 end
2807
2808 end
2809
2810 end
2811
2812end
2813
2814function snixzz.CalcView( ply, origin, angles, fov )
2815
2816 local ply = G.LocalPlayer()
2817 local wep = ply:GetActiveWeapon()
2818 local view = {}
2819
2820 // Advanced NoRecoil. TODO: Recoil Control System
2821 if snixzz.Bools["aim_norecoil"] then
2822
2823 if wep.Primary then
2824
2825 if !snixzz.RecoilBackup[wep:GetClass()] then
2826 snixzz.RecoilBackup[wep:GetClass()] = wep.Primary.Recoil
2827 end
2828
2829 wep.Primary.Recoil = 0
2830
2831 elseif wep.Secondary then
2832
2833 if !snixzz.RecoilBackup then
2834
2835 snixzz.RecoilBackup[wep:GetClass()] = wep.Secondary.Recoil
2836
2837 end
2838
2839 wep.Secondary.Recoil = 0
2840
2841 end
2842 else
2843
2844 if wep.Primary then
2845
2846 if wep.Primary.Recoil == 0 then
2847
2848 wep.Primary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
2849
2850 end
2851
2852 else
2853
2854 if wep.Secondary then
2855
2856 if wep.Secondary.Recoil == 0 then
2857
2858 wep.Secondary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
2859
2860 end
2861
2862 end
2863
2864 end
2865
2866 end
2867
2868 view.angles = ( snixzz.Bools["aim_silent"] or snixzz.Bools["aim_anti"] ) && snixzz.Silent or angles
2869
2870 view.fov = snixzz.Vars["esp_fov"]
2871
2872 view.origin = snixzz.Bools["misc_thirdperson"] && ( origin - snixzz.Silent:Forward() * snixzz.Vars["misc_thirdperson_distance"] ) or origin
2873
2874 return view
2875end
2876
2877// GetColor func
2878function snixzz.GetESPColor( v )
2879
2880 if snixzz.Bools["misc_murder_finder"] && snixzz.IsMurder then
2881
2882 if snixzz.IsMurderer( v ) then
2883
2884 return G.Color( 255, 0, 0 )
2885
2886 elseif snixzz.HasMagnum( v ) then
2887
2888 return G.Color( 0, 255, 255 )
2889
2890 else
2891
2892 return G.Color( 0, 255, 0 )
2893
2894 end
2895
2896 elseif snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProphunt then
2897
2898 if snixzz.IsProp( v ) then
2899
2900 return G.Color( 255, 0, 0 )
2901
2902 else
2903
2904 return G.Color( 0, 255, 0 )
2905
2906 end
2907
2908 end
2909
2910 if v:IsNPC() then
2911
2912 return G.Color( 0, 255, 0 )
2913
2914 end
2915
2916 if snixzz.Entities[v:GetClass()] then
2917
2918 return G.Color( 255, 255, 255 )
2919
2920 end
2921
2922 if snixzz.Bools["misc_traitor_finder"] && snixzz.IsTTT && snixzz.IsTraitor( v ) then
2923
2924 return G.Color( 255, 0, 0 )
2925
2926 else
2927
2928 return G.team.GetColor( v:Team() )
2929
2930 end
2931
2932 return G.Color( 255, 255, 255 )
2933
2934end
2935
2936function snixzz.HUDPaint()
2937
2938 local textpos;
2939 local x1, y1, x2, y2;
2940 local diff;
2941 local diff2;
2942 local color;
2943 local startx;
2944 local starty;
2945 local endpos;
2946 local pos;
2947 local wep = G.LocalPlayer():GetActiveWeapon()
2948 local viewmodel = G.LocalPlayer():GetViewModel()
2949 local weapon
2950 local dynLight
2951 local playerPos
2952 local targetPos
2953
2954 -- Menu header
2955 if snixzz.MenuOpen then
2956
2957 G.surface.SetDrawColor( snixzz.Vars["misc_menucolor2"] )
2958 G.surface.DrawRect( 20, 50, 420, 60 )
2959
2960 G.surface.SetDrawColor( Color( 0, 0, 0, 255 ) )
2961 G.surface.DrawOutlinedRect( 20, 50, 420, 60, 2 )
2962
2963 G.draw.SimpleTextOutlined( "snixzz3", "snixzz_logo", 25, 55, snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1.5, Color( 0, 0, 0 ) )
2964 G.draw.SimpleTextOutlined( "by 0xymoron", "snixzz_logo_small", G.surface.GetTextSize( "snixzz3" ) + 30, 65, snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 ) )
2965
2966 -- Is VIP?
2967 G.draw.SimpleTextOutlined( "VIP:", "snixzz_logo_small",
2968 //190, 65,
2969 snixzz.Frame:GetWide() / 2 - surface.GetTextSize( "VIP:" ) / 2, 65,
2970 snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 )
2971 )
2972
2973 -- Texture
2974 G.surface.SetMaterial( Material( snixzz.IsVIP() == true && "icon16/accept.png" or snixzz.IsVIP() == false && "icon16/cancel.png" ) )
2975 G.surface.SetDrawColor( color_white )
2976 G.surface.DrawTexturedRect( snixzz.Frame:GetWide() / 2 - surface.GetTextSize( "VIP:" ) / 2 + 22, 65, 16, 16 )
2977
2978 -- Big ass shit
2979 G.draw.SimpleTextOutlined(
2980 snixzz.Info.Version .. " Last Updated: " .. snixzz.Info.Updated,
2981 "snixzz_logo_small",
2982 snixzz.Frame:GetWide() + 15, snixzz.Frame:GetTall() - 352,
2983 snixzz.Colors.White, TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, Color( 30, 30, 30, 255 )
2984 )
2985
2986 end
2987
2988 if snixzz.Panic then return end
2989 if !snixzz.Bools["esp_enabled"] then return end
2990
2991 -- Watermark
2992 if !snixzz.IsVIP() then
2993
2994 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 ) )
2995
2996 end
2997
2998 -- Laser Sight
2999 if snixzz.Bools["esp_laser"] then
3000
3001 if viewmodel && G.IsValid( wep ) && G.IsValid( viewmodel ) then
3002
3003 if wep:GetClass() != "weapon_physgun" then
3004
3005 local muzzle = viewmodel:LookupAttachment( "muzzle" )
3006
3007 if muzzle == 0 then
3008
3009 muzzle = viewmodel:LookupAttachment( "1" )
3010
3011 end
3012
3013 local trace = G.LocalPlayer():GetEyeTrace().HitPos
3014
3015 if viewmodel:GetAttachment( muzzle ) then
3016
3017 G.cam.Start3D( G.EyePos(), G.EyeAngles() )
3018
3019 local startpos = viewmodel:GetAttachment( muzzle ).Pos
3020 local endpos = trace
3021
3022 if snixzz.Bools["aim_silent"] && snixzz.Locked && G.IsValid( snixzz.Target ) then
3023
3024 endpos = snixzz.GetPos( snixzz.Target )
3025
3026 else
3027
3028 endpos = trace
3029
3030 end
3031
3032 -- Laser
3033 G.render.SetMaterial( G.Material( "trails/laser" ) )
3034 G.render.DrawBeam( startpos, endpos, 4, 0, 0, snixzz.Vars["misc_lasercolor"] )
3035
3036 -- HitPos Dot
3037 G.render.SetMaterial( G.Material( "Sprites/light_glow02_add_noz" ) )
3038
3039 G.render.DrawQuadEasy(
3040 endpos, -- trace
3041 ( G.EyePos() - trace ):GetNormal(),
3042 25, 25,
3043 Color( 255, 255, 255, 255 ), 0
3044
3045 )
3046
3047 G.cam.End3D()
3048
3049 end
3050
3051 end
3052
3053 end
3054
3055 end
3056
3057 -- Dynamic Light around player
3058 if snixzz.Bools["esp_dynamiclight"] then
3059
3060 dynLight = G.DynamicLight( G.LocalPlayer():EntIndex() )
3061 dynLight.pos = G.LocalPlayer():GetShootPos()
3062 dynLight.r = 255
3063 dynLight.g = 255
3064 dynLight.b = 255
3065 dynLight.brightness = 1.75
3066 dynLight.Decay = 850
3067 dynLight.Size = 250
3068 dynLight.DieTime = G.CurTime() + 1
3069
3070 end
3071
3072 if G.IsValid( viewmodel ) then
3073
3074 if snixzz.Bools["esp_wireweapon"] then
3075
3076 _R.Entity.SetMaterial( viewmodel, "models/wireframe" )
3077 _R.Entity.SetColor( viewmodel, snixzz.Vars["misc_lasercolor"] )
3078
3079 else
3080
3081 _R.Entity.SetMaterial( viewmodel, "" )
3082 _R.Entity.SetColor( viewmodel, Color( 255, 255, 255 ) )
3083
3084 end
3085
3086 end
3087
3088 local Method
3089
3090 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
3091
3092 Method = G.ents.GetAll()
3093
3094 elseif snixzz.Vars["esp_type"] == "NPC" or snixzz.Vars["esp_type"] == "All" or snixzz.Vars["esp_type"] == "Entities" then
3095
3096 Method = G.ents.GetAll()
3097
3098 elseif snixzz.Vars["esp_type"] == "Players" then
3099
3100 Method = G.player.GetAll()
3101
3102 end
3103
3104 for k, v in G.next, Method do
3105
3106 if snixzz.IsValid( v, "ESP" ) then
3107
3108 textpos = 0 -- -2
3109
3110 x1, y1, x2, y2 = snixzz.GetBounds( v )
3111 diff = G.math.abs( x2 - x1 )
3112 diff2 = G.math.abs( y2 - y1 )
3113
3114 playerPos = snixzz.GetPos( v )
3115 color = snixzz.GetESPColor( v )
3116
3117 if v:IsPlayer() or v:IsNPC() then
3118
3119 if G.IsValid( v:GetActiveWeapon() ) then
3120
3121 weapon = v:GetActiveWeapon():GetPrintName()
3122
3123 else
3124
3125 weapon = "Unknown"
3126
3127 end
3128
3129 else
3130
3131 weapon = "nil"
3132
3133 end
3134
3135 if v:IsPlayer() or snixzz.IsProphunt && snixzz.IsProp( v ) then
3136
3137 if snixzz.IsMurder then
3138
3139 if snixzz.Bools["esp_name"] then
3140
3141 G.draw.SimpleText( v:GetBystanderName() .. " (" .. v:Nick() .. ")", "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3142 textpos = textpos + 12
3143
3144 end
3145
3146 elseif snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] then
3147
3148 if snixzz.IsProp( v ) then
3149
3150 G.draw.SimpleText( v:GetOwner():Name(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3151 textpos = textpos + 12
3152
3153 elseif v:Team() != TEAM_PROPS && v:GetClass() != "ph_prop" then
3154
3155 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3156 textpos = textpos + 12
3157
3158 end
3159
3160 else
3161
3162 if snixzz.Bools["esp_name"] then
3163
3164 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3165 textpos = textpos + 12
3166
3167 end
3168
3169 end
3170
3171 elseif v:IsNPC() then
3172
3173 G.draw.SimpleText( v:GetModel(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3174 textpos = textpos + 12
3175
3176 elseif snixzz.Entities[v:GetClass()] then
3177
3178 G.draw.SimpleText( v:GetClass(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3179 textpos = textpos + 12
3180
3181 end
3182
3183 if snixzz.Bools["esp_health_text"] then
3184
3185 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
3186
3187 G.draw.SimpleText( "HP: " .. v:GetOwner():Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3188 textpos = textpos + 12
3189
3190 elseif !snixzz.Entities[v:GetClass()] then
3191
3192 G.draw.SimpleText( "HP: " .. v:Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3193 textpos = textpos + 12
3194
3195 end
3196
3197 end
3198
3199 -- Health Bar
3200 if snixzz.Bools["esp_health_bar"] && !snixzz.Entities[v:GetClass()] then
3201
3202 local health = v:Health()
3203
3204 if snixzz.IsProphunt && snixzz.Bools["misc_prophunt_finder"] && snixzz.IsProp( v ) then
3205
3206 health = v:GetOwner():Health()
3207
3208 end
3209
3210 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
3211 G.surface.DrawRect( x1 -6, y1, 3, diff2 )
3212 G.surface.SetDrawColor( Color( 0, 255, 0 ) )
3213 G.surface.DrawRect( x1 - 6, y2 - diff2 / 100 * health, 3, diff2 / 100 * health )
3214
3215 end
3216
3217 -- ESP weapon
3218 if v:IsPlayer() or v:IsNPC() then
3219
3220 if snixzz.Bools["esp_weapon"] then
3221
3222 G.draw.SimpleText( weapon, "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
3223 textpos = textpos + 12
3224
3225 end
3226
3227 -- Snaplines
3228 if snixzz.Bools["esp_snaplines"] then
3229
3230 startx = G.ScrW() / 2
3231 starty = G.ScrH() / 2
3232 endpos = playerPos:ToScreen()
3233
3234 G.surface.SetDrawColor( color )
3235 G.surface.DrawLine( startx, starty, endpos.x, endpos.y )
3236
3237 end
3238
3239 end
3240
3241 -- Distance ESP
3242 if snixzz.Bools["esp_distance"] then
3243
3244 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 )
3245 textpos = textpos + 12
3246
3247 end
3248
3249
3250 // Box ESP
3251 if snixzz.Bools["esp_box"] then
3252
3253 snixzz.DrawOutlinedBox( x1, y1, diff, diff2, snixzz.Vars["esp_box_width"], color )
3254
3255 end
3256
3257 -- Chams! Much faster than RenderScreenSpaceEffects
3258 if snixzz.Bools["esp_chams"] then
3259
3260 G.cam.Start3D()
3261
3262 if snixzz.Vars["esp_chams_material"] == "Solid" then
3263
3264 v:SetMaterial( "models/debug/debugwhite" )
3265
3266 elseif snixzz.Vars["esp_chams_material"] == "Wireframe" then
3267
3268 v:SetMaterial( "models/wireframe" )
3269
3270 elseif snixzz.Vars["esp_chams_material"] == "XQZ" then
3271
3272 v:SetMaterial( "" )
3273
3274 end
3275
3276 -- Weapon Chams
3277 if v:IsPlayer() or v:IsNPC() then
3278
3279 if G.IsValid( v:GetActiveWeapon() ) then
3280
3281 v:GetActiveWeapon():DrawModel()
3282
3283 end
3284
3285 end
3286
3287 -- Player chams
3288 if snixzz.Vars["esp_chams_material"] != "XQZ" then
3289
3290 G.render.SetColorModulation( color.r / 255, color.g / 255, color.b / 255 )
3291
3292 end
3293
3294 v:DrawModel()
3295 //v:SetColor( Color( 255, 255, 255 ) )
3296 v:SetMaterial( "" )
3297
3298 G.cam.End3D()
3299
3300 end
3301
3302 -- For prediction testing & shit
3303 if snixzz.Bools["esp_aimpos"] then
3304
3305 local predictedPos = snixzz.Prediction( playerPos, v ):ToScreen()
3306
3307 G.draw.RoundedBox( 4, predictedPos.x, predictedPos.y, 7, 7, Color( 255, 0, 0, 255 ) )
3308
3309 end
3310
3311 else
3312
3313 continue
3314
3315 end
3316
3317 end
3318
3319 // Aim status & shit
3320 if snixzz.Bools["esp_status"] then
3321
3322 G.draw.DrawText( snixzz.Status, "snixzz_status", G.ScrW() / 2, G.ScrH() * 0.5 + 50, snixzz.StatusColor, TEXT_ALIGN_CENTER )
3323
3324 end
3325
3326 // Crosshair
3327 local x = ScrW() / 2
3328 local y = ScrH() / 2
3329
3330 local crosscolor = Color( 0, 0, 0, 255 )
3331 local crosslength = 50
3332 local gap = 2
3333
3334 local boxsize = 5
3335
3336 -- Box
3337 if snixzz.Bools["esp_crosshair_box"] then
3338
3339 G.surface.SetDrawColor( Color( 255, 255, 255 ) )
3340 G.surface.DrawOutlinedRect( x - boxsize - 2, y - boxsize - 2, ( boxsize + 2 ) * 2 + 1, ( boxsize + 2 ) * 2 + 1 )
3341
3342 end
3343
3344 -- Crosshair
3345 if snixzz.Bools["esp_crosshair"] then
3346
3347 G.surface.SetDrawColor( 0, 0, 0, 255 )
3348 G.surface.DrawLine( x - crosslength, y, x - gap, y )
3349 G.surface.DrawLine( x + crosslength, y, x + gap, y )
3350
3351 G.surface.DrawLine( x, y - crosslength, x, y - gap )
3352 G.surface.DrawLine( x, y + crosslength, x, y + gap )
3353
3354 end
3355
3356 -- Menu opening
3357 if snixzz.Binds["+menu"] != nil then
3358
3359 if G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.Typing && !snixzz.MenuOpen && !G.gui.IsConsoleVisible() then
3360
3361 snixzz.Menu()
3362 snixzz.MenuOpen = true
3363
3364 end
3365
3366 end
3367
3368 -- Console Opening
3369 if G.input.IsKeyDown( KEY_Q ) && G.input.IsKeyDown( KEY_TAB ) && !snixzz.Typing && !snixzz.ConsoleOpen && !G.gui.IsConsoleVisible() then
3370
3371 snixzz.Console()
3372 snixzz.ConsoleOpen = true
3373
3374 end
3375
3376 -- Chat opening
3377 if !snixzz.ChatboxOpen && !snixzz.Typing && !snixzz.ConsoleOpen && !G.gui.IsConsoleVisible() then
3378
3379 if G.input.IsKeyDown( snixzz.Binds["chat"] ) then
3380
3381 snixzz.OpenChat()
3382 snixzz.ChatboxOpen = true
3383
3384 end
3385
3386 end
3387
3388end
3389
3390snixzz.properCurTime = 0
3391snixzz.LagVar = 12
3392snixzz.LagTicks = 0
3393local dynLight
3394function snixzz.Move()
3395
3396 if G.IsFirstTimePredicted() then return end
3397 snixzz.properCurTime = G.CurTime() + G.engine.TickInterval()
3398
3399 // No hands
3400 if snixzz.Bools["esp_nohands"] then
3401
3402 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), true )
3403
3404 else
3405
3406 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), false )
3407
3408 end
3409
3410end
3411
3412function snixzz.Namechanger()
3413
3414 /*if snixzz.Bools["misc_namechanger"] then
3415
3416 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3417 G.chat.AddText( Color( 0, 255, 255 ), "[snixzz3] Changed your name to " .. snixzz.NextName )
3418
3419 if snixzz.IsDarkRP then
3420
3421 -- Overly comlpicated Steam name stealer & RP name stealer. Accuse 2 different people at once.
3422 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3423 //snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
3424 //snixzz.Functions.SetName( snixzz.NextName .. " %" )
3425
3426 G.timer.Simple( 0.5, function()
3427 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3428 snixzz.Functions.ConCommand( "darkrp rpname " .. snixzz.NextName .. "q" ) -- ** TODO: CHANGE q TO SOMETHING ELSE.
3429 end )
3430
3431 else
3432
3433 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
3434 //snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
3435 //snixzz.Functions.SetName( snixzz.NextName .. " %" )
3436
3437 end
3438
3439 end*/
3440
3441end
3442
3443function snixzz.ChatSpam()
3444
3445 if snixzz.Bools["misc_chat_spam"] then
3446
3447 if snixzz.Vars["misc_chat_spam_method"] == "Advertise" then
3448
3449 G.RunConsoleCommand( "say", G.Either( snixzz.IsDarkRP, "/ooc " .. snixzz.Vars["misc_chat_spam_message"], snixzz.Vars["misc_chat_spam_message"] ) )
3450
3451 elseif snixzz.Vars["misc_chat_spam_method"] == "Jokes" then
3452
3453 G.http.Fetch( "http://tambal.azurewebsites.net/joke/random",
3454
3455 function( body )
3456
3457 if body && body != "" then
3458
3459 G.RunConsoleCommand( "say", G.Either( snixzz.IsDarkRP, "/ooc " .. util.JSONToTable( body )["joke"], util.JSONToTable( body )["joke"] ) )
3460
3461 end
3462
3463 end,
3464
3465 function( error )
3466
3467 snixzz.Chat( snixzz.Colors.Red, "Unable to grab joke from API! (" .. error .. ")" )
3468
3469 end
3470
3471 )
3472
3473 end
3474
3475 end
3476
3477end
3478
3479/*
3480
3481
3482 Traitor, Prophunt, & Murder Finders.
3483
3484
3485*/
3486snixzz.Traitors = {}
3487snixzz.Murderers = {}
3488snixzz.ClearedMurderers = false
3489snixzz.ClearedTraitors = false
3490local t
3491
3492function snixzz.IsMurderer( v )
3493
3494 if v:HasWeapon( "weapon_mu_knife" ) then
3495
3496 return true
3497
3498 end
3499
3500 if G.table.HasValue( snixzz.Murderers, v ) then
3501
3502 return true
3503
3504 end
3505
3506 return false
3507
3508end
3509
3510function snixzz.HasMagnum( v )
3511
3512 if v:HasWeapon( "weapon_mu_magnum" ) then
3513
3514 return true
3515
3516 end
3517
3518 return false
3519
3520end
3521
3522local testtab = {}
3523function snixzz.IsProp( v )
3524
3525 if v:GetOwner() != nil then
3526
3527 local owner = v:GetOwner()
3528
3529 else
3530
3531 return false
3532
3533 end
3534
3535 if v:GetClass() == "ph_prop" && owner != G.LocalPlayer() then
3536
3537 return true
3538
3539 end
3540
3541 return false
3542
3543end
3544
3545function snixzz.IsTraitor( v )
3546
3547 if G.table.HasValue( snixzz.Traitors, v ) or G.LocalPlayer():IsTraitor() && v:IsTraitor() then
3548
3549 return true
3550
3551 end
3552
3553 return false
3554end
3555
3556function snixzz.GetTraitors()
3557
3558 if !snixzz.IsTTT then return end
3559
3560 if !snixzz.Bools["misc_traitor_finder"] then return end
3561
3562 for k, v in G.next, G.ents.GetAll() do
3563
3564 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
3565
3566 local t = v:GetOwner()
3567
3568 if t:GetRole() == 2 then
3569
3570 v.Buyer = t
3571
3572 snixzz.ClearedTraitors = false
3573
3574 else
3575
3576 G.table.insert( snixzz.Traitors, t )
3577
3578 snixzz.ClearedTraitors = false
3579
3580 snixzz.Chat( G.Color( 255, 0, 0 ), t:Nick() .. " bought traitor weapon '" .. v:GetClass() .. "'" )
3581
3582 end
3583
3584 elseif GetRoundState() != 3 then
3585
3586 if !snixzz.ClearedTraitors then
3587
3588 snixzz.Traitors = {}
3589 snixzz.Chat( color_white, "Cleared traitors table." )
3590 snixzz.ClearedTraitors = true
3591
3592
3593 end
3594
3595 end
3596
3597 end
3598
3599end
3600
3601
3602/*
3603 DETOURS
3604*/
3605
3606function snixzz.CreateDetours()
3607
3608 _R.Entity.FireBullets = snixzz.Detour( _R.Entity.FireBullets, function( e, bullet )
3609
3610 snixzz.Cones.Normal[ G.LocalPlayer():GetActiveWeapon():GetClass() ] = bullet["Spread"]
3611
3612 return snixzz.Detours[ _R.Entity.FireBullets ]( e, bullet )
3613 end )
3614
3615 render.Capture = snixzz.Detour( render.Capture, function( data )
3616
3617 snixzz.ACNotify( "An anti-cheat attempted to capture your screen, disabling visuals for 5 seconds." )
3618
3619 snixzz.Panic = true
3620
3621 if snixzz.MenuOpen == true then
3622
3623 snixzz.Frame:SetVisible( false )
3624 snixzz.MenuOpen = false
3625
3626 end
3627
3628 G.timer.Simple( 5, function() snixzz.Panic = false end )
3629
3630 return data
3631 end )
3632
3633 file.Exists = snixzz.Detour( file.Exists, function( filename, dir )
3634
3635 snixzz.LogDetour( "file.Exists( '" .. filename .. "', '" .. dir .. "' )" )
3636
3637 if G.string.find( filename, "snixzz" ) then
3638
3639 snixzz.ACNotify( "An anti-cheat attempted to search for snixzz" )
3640 return false
3641
3642 else
3643
3644 return snixzz.Detours[ file.Exists ]( filename, dir )
3645
3646 end
3647
3648 end )
3649
3650 file.Read = snixzz.Detour( file.Read, function( filename, dir )
3651
3652 snixzz.LogDetour( "file.Read( '" .. filename .. "', '" .. dir .. "' )" )
3653
3654 if G.string.find( filename, ".lua" ) then
3655
3656 snixzz.ACNotify( "An anti-cheat attempted to search for a .lua file '" .. filename .. "'" )
3657 return "print( 'Hello World' )"
3658
3659 else
3660
3661 return snixzz.Detours[ file.Read ]( filename, dir )
3662
3663 end
3664
3665 end )
3666
3667 snixzz.FakeFiles = {
3668 "demo_recording.lua",
3669 "vgui/dbutton.lua",
3670 "vgui/dgrid.lua",
3671 "menu/menu.lua",
3672 "menu/mainmenu.lua",
3673 "menu/loading.lua",
3674 "menu/video.lua",
3675 "menu/errors.lua",
3676 }
3677
3678 file.Find = snixzz.Detour( file.Find, function( filename, dir )
3679
3680 snixzz.LogDetour( "file.Find( '" .. filename .. "', '" .. dir .. "' )" )
3681
3682 if G.string.find( filename, "snixzz" ) then
3683
3684 return G.table.Random( snixzz.FakeFiles )
3685
3686 else
3687
3688 return snixzz.Detours[ file.Find ]( filename, dir )
3689
3690 end
3691
3692 end )
3693
3694 net.Receive = snixzz.Detour( net.Receive, function( name, func )
3695
3696 snixzz.LogDetour( "net.Receive( '" .. name .. "' )" )
3697
3698 return snixzz.Detours[ net.Receive ]( name, func )
3699 end )
3700
3701 net.Start = snixzz.Detour( net.Start, function( name )
3702
3703 if snixzz.Detours["net.Start"][name] then
3704
3705 snixzz.ACNotify( "Blocked net.Start ( '" .. name .. "' )" )
3706 return
3707
3708 else
3709
3710 snixzz.LogDetour( "net.Start( '" .. name .. "' )" )
3711 return snixzz.Detours[ net.Start ]( name )
3712
3713 end
3714
3715 end )
3716
3717 net.SendToServer = snixzz.Detour( net.SendToServer, function()
3718
3719 //snixzz.LogDetour( "net.SendToServer()" )
3720
3721 return snixzz.Detours[net.SendToServer]()
3722 end )
3723
3724 net.WriteString = snixzz.Detour( net.WriteString, function( str )
3725
3726 if G.string.find( str, "snixzz" ) then
3727
3728 snixzz.ACNotify( "Blocked net.WriteString ( '" .. str .. "' )" )
3729 return "nil"
3730
3731 else
3732
3733 snixzz.LogDetour( "net.WriteString( '" .. str .. "' )" )
3734 return snixzz.Detours[ net.WriteString ]( str )
3735
3736 end
3737
3738 end )
3739
3740 net.WriteTable = snixzz.Detour( net.WriteTable, function( tab )
3741
3742 //local theTab = G.table.concat( tab, ", " )
3743
3744 //snixzz.LogDetour( "net.WriteTable( { " .. theTab .. " } )" )
3745
3746 return snixzz.Detours[net.WriteTable]( tab )
3747
3748 end )
3749
3750 _R.Player.ConCommand = snixzz.Detour( _R.Player.ConCommand, function( ply, args )
3751
3752 snixzz.LogDetour( ply:Nick() .. " - _R.Player.ConCommand( '" .. args .. "' ) " )
3753
3754 if !snixzz.Detours["Commands"][args] then
3755
3756 return snixzz.Detours[ _R.Player.ConCommand ]( ply, args )
3757
3758 else
3759
3760 snixzz.ACNotify( "Blocked _R.Player.ConCommand( '" .. args .. "' )" )
3761 return
3762
3763 end
3764
3765 end )
3766
3767 /*
3768 _R.ConVar.GetBool = snixzz.Detour( _R.Convar.GetBool, function( cvar )
3769 snixzz.LogDetour( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "'" )
3770 for k, v in G.pairs( snixzz.Spoof ) do
3771 if cvar:GetName() == k then
3772 snixzz.ACNotify( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "' ) returning " .. G.tostring( v ) )
3773 return v
3774 else
3775 return snixzz.Detours[_R.ConVar.GetBool]( cvar )
3776 end
3777 end
3778 end )*/
3779
3780 GetConVarNumber = snixzz.Detour( GetConVarNumber, function( cvar )
3781
3782 if snixzz.Spoof[cvar] != nil then
3783
3784 return snixzz.Spoof[cvar]
3785
3786 else
3787
3788 return snixzz.Detours[GetConVarNumber]( cvar )
3789
3790 end
3791
3792 end )
3793
3794 snixzz.IgnoreCMDs = {
3795 ["hvh_playheadshotsound"] = true,
3796 ["hvh_hitsound"] = true,
3797 ["r_cleardecals"] = true,
3798 ["ulx_showmotd"] = true,
3799 }
3800
3801 RunConsoleCommand = snixzz.Detour( RunConsoleCommand, function( cmd, ... )
3802
3803 local str = cmd
3804
3805 if !snixzz.IgnoreCMDs[cmd] then
3806
3807 if ... then
3808
3809 local args = { ... }
3810 str = str .. ", " .. ( ... )
3811
3812 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. ", '" .. G.table.concat( args, "', '" ) .. "' )" )
3813
3814 else
3815
3816 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. "' )")
3817
3818 end
3819
3820 end
3821
3822 if !snixzz.Detours["Commands"][cmd] then
3823
3824 return snixzz.Detours[ RunConsoleCommand ]( cmd, ... )
3825
3826 else
3827
3828 snixzz.ACNotify( "Blocked RunConsoleCommand( '" .. cmd .. "' )" )
3829 return
3830
3831 end
3832
3833 end )
3834
3835 hook.GetTable = snixzz.Detour( hook.GetTable, function()
3836
3837 //snixzz.LogDetour( "hook.GetTable() was checked, returning bullshit." )
3838
3839 return hookGetTableCopy
3840 end )
3841
3842end
3843
3844/*
3845
3846 Menu Core
3847
3848*/
3849
3850
3851/***************
3852
3853 Changelog
3854
3855****************/
3856snixzz.UpdateLog = "Loading..."
3857
3858function snixzz.UpdateChangelog()
3859
3860 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/changelog.txt",
3861
3862 function( body, len, headers, code )
3863
3864 snixzz.UpdateLog = body
3865
3866 if !G.file.Exists( snixzz.DataFolder .. "/changelog.txt", "DATA" ) then
3867
3868 G.file.Write( snixzz.DataFolder .. "/changelog.txt", body )
3869
3870 snixzz.Chat( Color( 0, 255, 0 ), "The changelog has been updated!" )
3871
3872 snixzz.CMenu()
3873
3874 else
3875
3876 local log = G.file.Read( snixzz.DataFolder .. "/changelog.txt", "DATA" )
3877
3878 if log != body then
3879
3880 G.file.Write( snixzz.DataFolder .. "/changelog.txt", body )
3881
3882 snixzz.Chat( Color( 0, 255, 0 ), "The changelog has been updated!" )
3883
3884 snixzz.CMenu()
3885
3886 end
3887
3888 end
3889
3890 end,
3891
3892 function( error )
3893
3894 snixzz.UpdateLog = error
3895 snixzz.Chat( snixzz.Colors.Red, "Failed to update changelog '" .. error .. "'" )
3896
3897 end
3898
3899 )
3900
3901end
3902
3903function snixzz.CMenu()
3904
3905 snixzz.CFrame = G.vgui.Create( "DFrame" )
3906 snixzz.CFrame:SetPos( 20, 80 )
3907 snixzz.CFrame:SetSize( 430, 420 )
3908 snixzz.CFrame:SetTitle( "snixzz3 " .. snixzz.Info.Version .. " Changelog :: by 0xymoron" )
3909 snixzz.CFrame:SetVisible( true )
3910 snixzz.CFrame:SetDraggable( true )
3911 snixzz.CFrame:ShowCloseButton( false )
3912 snixzz.CFrame:MakePopup()
3913 snixzz.CFrame.Paint = function()
3914
3915 G.draw.RoundedBox( 0, 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall(), snixzz.Vars["misc_menucolor2"] )
3916 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
3917 G.surface.DrawOutlinedRect( 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall() )
3918
3919 end
3920
3921 local close = G.vgui.Create( "DButton", snixzz.CFrame )
3922 close:SetSize( 50, 20 )
3923 close:SetPos( snixzz.CFrame:GetWide() - 51, 1 )
3924 close:SetText( "x" )
3925 close:SetTextColor( G.Color( 255, 255, 255 ) )
3926 close:SetFont( "Trebuchet18" )
3927
3928 close.Paint = function()
3929
3930 G.draw.RoundedBox( 0, 0, 0, close:GetWide(), close:GetTall(), Color( 168, 62, 62, 255 ) )
3931
3932 end
3933
3934 close.DoClick = function()
3935
3936 snixzz.CFrame:Close()
3937 snixzz.Sound()
3938 snixzz.CFrame = nil
3939
3940 end
3941
3942 local ChangelogText = G.vgui.Create( "DTextEntry", snixzz.CFrame )
3943 ChangelogText:SetPos( 5, 35 )
3944 ChangelogText:SetSize( snixzz.CFrame:GetWide() - 10, snixzz.CFrame:GetTall() - 40 )
3945 ChangelogText:SetText( snixzz.UpdateLog )
3946 ChangelogText:SetEditable( false )
3947 ChangelogText:SetMultiline( true )
3948
3949end
3950
3951/*
3952
3953 snixzz3 "IRC" (Chatbox)
3954
3955*/
3956
3957local function urlencode( str ) -- thanks random github guy
3958
3959 if ( str ) then
3960
3961 str = string.gsub (str, "\n", "\r\n")
3962
3963 str = string.gsub (str, "([^%w ])", function( c )
3964
3965 return string.format( "%%%02X", string.byte( c ) )
3966
3967 end )
3968
3969 str = string.gsub ( str, " ", "+" )
3970
3971 end
3972
3973 return str
3974
3975end
3976
3977function snixzz.GetChatData( ply, func )
3978
3979 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/data/chat.json",
3980
3981 function( body )
3982
3983 local tab = util.JSONToTable( body )
3984
3985 snixzz.ChatCache = tab
3986
3987 if func then
3988
3989 return func()
3990
3991 end
3992
3993 end,
3994
3995 function( error )
3996
3997 snixzz.Chat( Color( 255, 0, 0 ), "Failed to get chat data." )
3998
3999 end
4000
4001 )
4002
4003end
4004
4005function snixzz.SendChatMessage( ply, msg, func )
4006
4007 local oldMsg = msg
4008
4009 msg = urlencode( msg )
4010
4011 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/chat.php?steamid=" .. ply:SteamID64() .. "&msg=" .. msg,
4012
4013 function( body )
4014
4015 if body != "sent" then
4016
4017 snixzz.Chat( Color( 255, 0, 0 ), "Failed to send chat message. '" .. body .. "'" )
4018
4019 else
4020
4021 if func then
4022
4023 func()
4024
4025 end
4026
4027 snixzz.AddToConsole( "Sent chat message '" .. oldMsg .. "'" )
4028
4029 end
4030
4031 end,
4032
4033 function( error )
4034
4035 snixzz.Chat( Color( 255, 0, 0 ), "Failed to send message, try again. '" .. error .. "'" )
4036
4037 end
4038
4039 )
4040
4041end
4042
4043function snixzz.UpdateChatbox( bool, func )
4044
4045 if !snixzz.ChatDisplay then return end
4046
4047 for k, v in G.next, snixzz.ChatCache do
4048
4049 local nick = v["nick"]
4050 local sid = v["sid"]
4051 local message = v["message"]
4052
4053 if !snixzz.ChatHistory[sid] then
4054
4055 snixzz.ChatHistory[sid] = {}
4056
4057 end
4058
4059 if !G.table.HasValue( snixzz.ChatHistory[sid], message ) or bool == true then
4060
4061 if sid == "nil" then
4062
4063 snixzz.ChatDisplay:InsertColorChange( 255, 0, 0, 255 )
4064
4065 elseif sid == "76561198040553376" then
4066
4067 snixzz.ChatDisplay:InsertColorChange( 0, 255, 255, 255 )
4068
4069 else
4070
4071 snixzz.ChatDisplay:InsertColorChange( 185, 185, 185, 255 )
4072
4073 end
4074
4075 snixzz.ChatDisplay:AppendText( nick )
4076
4077 snixzz.ChatDisplay:InsertColorChange( 255, 255, 255, 255 )
4078 snixzz.ChatDisplay:AppendText( ": " .. message .. "\n" )
4079
4080 if bool == false then
4081
4082 snixzz.Sound()
4083
4084 end
4085
4086 G.table.insert( snixzz.ChatHistory[sid], message )
4087
4088 end
4089
4090 end
4091
4092 if func then
4093
4094 func()
4095
4096 end
4097
4098end
4099
4100function snixzz.UpdateWhosOnline( bool, func )
4101
4102 if !snixzz.IsVIP() then return end
4103
4104 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/getonline.php",
4105
4106 function( body )
4107
4108 snixzz.WhosOnline = G.util.JSONToTable( body )
4109
4110 if func then
4111
4112 func()
4113
4114 end
4115
4116 end,
4117
4118 function( error )
4119
4120 snixzz.WhosOnline = { ["fail"] = "Failed to update" }
4121
4122 end
4123
4124 )
4125
4126end
4127
4128snixzz.ChatboxOpen = false
4129snixzz.ChatUpdateData = 0
4130snixzz.WhosOnline = {}
4131
4132function snixzz.OpenChat()
4133
4134 if snixzz.Chatbox && snixzz.Chatbox:IsVisible() or snixzz.ChatboxOpen then return end
4135
4136 snixzz.Chatbox = G.vgui.Create( "DFrame" )
4137 snixzz.Chatbox:SetTitle( "snixzz3 Chat (Experimental)" )
4138 snixzz.Chatbox:SetSize( 600, 240 )
4139 snixzz.Chatbox:SetPos( 20, ScrH() / 2 - snixzz.Chatbox:GetTall() )
4140 snixzz.Chatbox:ShowCloseButton( true )
4141 snixzz.Chatbox:SetDraggable( true )
4142
4143 snixzz.Chatbox.Paint = function( self )
4144
4145 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 150 ) )
4146 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4147 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4148
4149 end
4150
4151 snixzz.Chatbox.Think = function( self )
4152
4153 snixzz.ChatUpdateData = snixzz.ChatUpdateData + 1
4154
4155 if snixzz.ChatUpdateData == 3300 then
4156
4157 snixzz.GetChatData( LocalPlayer(), function()
4158
4159 snixzz.UpdateChatbox( false, function()
4160
4161 snixzz.ChatUpdateData = 0
4162
4163 end )
4164
4165 end )
4166
4167 end
4168
4169 if G.input.IsKeyDown( KEY_ESCAPE ) then
4170
4171 self:Close()
4172
4173 end
4174
4175 end
4176
4177 snixzz.Chatbox.OnClose = function( self )
4178
4179 snixzz.ChatHistory = {}
4180 snixzz.ChatCache = {}
4181 snixzz.ChatboxOpen = false
4182
4183 if snixzz.OnlineFrame && snixzz.OnlineFrame:IsVisible() then
4184
4185 snixzz.OnlineFrame:SetVisible( false )
4186 snixzz.OnlineFrame = nil
4187
4188 end
4189
4190 end
4191
4192 snixzz.ChatEntry = vgui.Create( "DTextEntry", snixzz.Chatbox )
4193 snixzz.ChatEntry:SetPos( 5, snixzz.Chatbox:GetTall() - 25 )
4194 snixzz.ChatEntry:SetSize( snixzz.Chatbox:GetWide() - 35, 20 )
4195
4196 snixzz.ChatEntry.OnEnter = function( self )
4197
4198 local oldMsg = self:GetValue()
4199
4200 if oldMsg == "" then snixzz.Chatbox:Close() return end
4201
4202 self:SetEnabled( false )
4203 self:SetEditable( false )
4204
4205 self:SetText( "Sending message..." )
4206
4207 snixzz.SendChatMessage( LocalPlayer(), oldMsg, function()
4208
4209 self:SetText( "Updating chat..." )
4210
4211 snixzz.GetChatData( LocalPlayer(), function()
4212
4213 snixzz.UpdateChatbox( false, function()
4214
4215 self:SetText( "Sent! Please wait 10 seconds before sending another message." )
4216
4217 G.timer.Simple( 10, function() if IsValid( self ) then self:SetEnabled( true ) self:SetEditable( true ) self:SetText( "" ) end end )
4218
4219 end )
4220
4221 end )
4222
4223 end )
4224
4225 end
4226
4227 snixzz.ChatDisplay = vgui.Create( "RichText", snixzz.Chatbox )
4228 snixzz.ChatDisplay:SetPos( 5, 25 )
4229 snixzz.ChatDisplay:SetSize( snixzz.Chatbox:GetWide() - 10, snixzz.Chatbox:GetTall() - 45 )
4230
4231 snixzz.ChatDisplay.PerformLayout = function( self )
4232
4233 self:SetFontInternal( "ChatFont" )
4234
4235 end
4236
4237 snixzz.GetChatData( LocalPlayer(), function()
4238
4239 snixzz.UpdateChatbox( true, function()
4240
4241 snixzz.Chatbox:MakePopup()
4242
4243 snixzz.ChatboxOpen = true
4244
4245 end )
4246
4247 end )
4248
4249 if snixzz.IsVIP() then
4250
4251 snixzz.UpdateWhosOnline( true, function()
4252
4253 if !snixzz.Chatbox:IsVisible() then return end
4254
4255 snixzz.OnlineFrame = G.vgui.Create( "DFrame" )
4256 snixzz.OnlineFrame:SetSize( 200, 120 )
4257 snixzz.OnlineFrame:SetTitle( "Online Users (" .. table.Count( snixzz.WhosOnline ) .. ")" )
4258 snixzz.OnlineFrame:SetPos( 20, ScrH() / 2 - snixzz.Chatbox:GetTall() - snixzz.OnlineFrame:GetTall() - 10 )
4259 snixzz.OnlineFrame:ShowCloseButton( false )
4260 snixzz.OnlineFrame:SetDraggable( false )
4261
4262 snixzz.OnlineFrame.Paint = function( self )
4263
4264 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 125 ) )
4265 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4266 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4267
4268 end
4269
4270 snixzz.OnlineList = G.vgui.Create( "DListLayout", snixzz.OnlineFrame )
4271 snixzz.OnlineList:SetPos( 5, 25 )
4272 snixzz.OnlineList:SetSize( snixzz.OnlineFrame:GetWide() - 10, snixzz.OnlineFrame:GetTall() - 35 )
4273
4274
4275 if table.Count( snixzz.WhosOnline ) >= 1 then
4276
4277 for k, v in G.next, snixzz.WhosOnline do
4278
4279 local pButton = snixzz.OnlineList:Add( "DButton" )
4280 pButton:SetText( v )
4281 pButton:SetSize( snixzz.OnlineList:GetWide() - 10, 15 )
4282 pButton:SetTextColor( color_white )
4283 pButton:SetFont( "ChatFont" )
4284
4285 pButton.Paint = function( self )
4286
4287 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 50 ) )
4288 G.surface.SetDrawColor( color_white )
4289 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4290
4291 end
4292
4293 pButton.DoClick = function( self )
4294
4295 gui.OpenURL( "http://steamcommunity.com/profiles/" .. util.NiceFloat( k ) )
4296
4297 end
4298
4299 end
4300
4301 else
4302
4303 local pButton = snixzz.OnlineList:Add( "DButton" )
4304 pButton:SetText( "No one :(" )
4305 pButton:SetSize( snixzz.OnlineList:GetWide() - 10, 15 )
4306 pButton:SetTextColor( Color( 255, 0, 0 ) )
4307 pButton:SetFont( "ChatFont" )
4308
4309 pButton.Paint = function( self )
4310
4311 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 50 ) )
4312 G.surface.SetDrawColor( Color( 255, 0, 0 ) )
4313 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4314
4315 end
4316
4317 end
4318
4319
4320 end )
4321
4322 end
4323
4324end
4325
4326/*
4327
4328
4329 Custom Console
4330
4331
4332*/
4333
4334snixzz.Cmds = {}
4335
4336snixzz.CmdDesc = {
4337
4338 ["bind"] = "bind: proper usage: bind <key> <command>",
4339 ["unbind"] = "unbind: proper usage: unbind <command>",
4340 ["binds"] = "binds: Displays a list of bindable commands",
4341 ["convars"] = "convars: Displays a list of changable convars",
4342 ["server"] = "server: Displays server information",
4343 ["players"] = "players: Displays a list of players & SteamIDs",
4344 ["lua_run"] = "lua_run: Run a Lua string",
4345 ["connect"] = "connect: Connect to the provided IP",
4346 ["clear"] = "clear: Clears the console",
4347
4348}
4349
4350function snixzz.ConsoleCommand( str )
4351
4352 if !snixzz.ConFrame then return end
4353
4354 local args = G.string.Explode( " ", str )
4355 local cmd = args[1]
4356 local cmdArgs = args[2]
4357
4358 G.table.remove( args, 1 )
4359
4360 snixzz.AddToConsole( "] " .. str )
4361
4362 -- Console Commands
4363 if snixzz.Cmds[cmd] then
4364
4365 snixzz.Cmds[cmd]( G.LocalPlayer(), cmd, args )
4366
4367 -- ConVars
4368 elseif snixzz.Bools[cmd] != nil then
4369
4370 cmdArgs = G.tobool( cmdArgs )
4371
4372 if cmdArgs != nil then
4373
4374 snixzz.Bools[cmd] = cmdArgs
4375 snixzz.Chat( snixzz.Colors.Green, "Set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) .. "'" )
4376
4377 else
4378
4379 snixzz.Chat( snixzz.Colors.Red, "Failed to set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) or "nil" )
4380
4381 end
4382
4383 elseif snixzz.Vars[cmd] != nil then
4384
4385 if cmdArgs != nil then
4386
4387 snixzz.Vars[cmd] = cmdArgs
4388 snixzz.Chat( snixzz.Colors,Green, "Set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) .. "'" )
4389
4390 else
4391
4392 snixzz.Chat( snixzz.Colors.Red, "Failed to set ConVar '" .. cmd .. "' to '" .. G.tostring( cmdArgs ) or "nil" )
4393
4394 end
4395
4396 elseif cmd == "lua_run" then
4397
4398 local lua_String = G.string.gsub( str, "lua_run ", "" )
4399
4400 snixzz.AddToConsole( "Running Lua String '" .. lua_String .. "'" )
4401
4402 snixzz.RunString( lua_String )
4403
4404 else
4405
4406 snixzz.AddToConsole( "Unknown command '" .. cmd .. "'" )
4407
4408 end
4409
4410 snixzz.cEntry:SetText( "" )
4411
4412end
4413
4414function snixzz.AddConsoleCommand( cmd, func )
4415
4416 snixzz.Cmds[cmd] = func
4417
4418end
4419
4420snixzz.AddConsoleCommand( "help", function( ply, cmd, args )
4421
4422 for k, v in G.next, snixzz.Cmds do
4423
4424 snixzz.AddToConsole( snixzz.CmdDesc[k] )
4425
4426 end
4427
4428end )
4429
4430snixzz.AddConsoleCommand( "ping", function( ply, cmd, args )
4431
4432 if snixzz.Membership == "dev" then
4433
4434 snixzz.PingServer( ply )
4435
4436 else
4437
4438 snixzz.AddToConsole( "You must be a developer to use this command." )
4439
4440 end
4441
4442end )
4443
4444snixzz.AddConsoleCommand( "chat", function( ply, cmd, args )
4445
4446 if snixzz.ConFrame then
4447
4448 snixzz.ConsoleOpen = false
4449 snixzz.ConFrame:Remove()
4450
4451 end
4452
4453 snixzz.OpenChat()
4454
4455end )
4456
4457
4458snixzz.AddConsoleCommand( "say", function( ply, cmd, args )
4459
4460 if snixzz.Membership == "dev" then
4461
4462 snixzz.SendChatMessage( ply, tostring( table.concat( args, " " ) ) )
4463
4464 else
4465
4466 snixzz.AddToConsole( "You must be a developer to use this command." )
4467
4468 end
4469
4470end )
4471
4472snixzz.AddConsoleCommand( "bind", function( ply, cmd, args )
4473
4474 if !args[1] or !args[2] then snixzz.AddToConsole( snixzz.CmdDesc["bind"] ) return end
4475
4476 local key = "KEY_" .. G.string.upper( args[1] )
4477 local cmd = args[2]
4478
4479 snixzz.BindKey( cmd, key, true )
4480
4481end )
4482
4483snixzz.AddConsoleCommand( "unbind", function( ply, cmd, args )
4484
4485 if !args[1] then snixzz.AddToConsole( "Unbind proper usage: unbind <command>" ) return end
4486
4487 local command = args[1]
4488
4489 snixzz.Unbind( command )
4490
4491end )
4492
4493snixzz.AddConsoleCommand( "convars", function( ply, cmd, args )
4494
4495 for k, v in G.next, snixzz.Bools do
4496
4497 snixzz.AddToConsole( "ConVar: " .. k .. " | Enabled: " .. G.tostring( v ) )
4498
4499 end
4500
4501 for k, v in G.next, snixzz.Vars do
4502
4503 snixzz.AddToConsole( "ConVar: " .. k .. " | Value: " .. G.tostring( v ) )
4504
4505 end
4506
4507end )
4508
4509snixzz.AddConsoleCommand( "binds", function( ply, cmd, args )
4510
4511 for k, v in G.next, snixzz.Binds do
4512
4513 snixzz.AddToConsole( "Command: " .. k .. " | Bound to: " .. G.input.GetKeyName( v ) )
4514
4515 end
4516
4517end )
4518
4519snixzz.AddConsoleCommand( "clear", function( ply, cmd, args )
4520
4521 if snixzz.ConFrame && snixzz.cHistory then
4522
4523 snixzz.cHistory:Clear()
4524
4525 end
4526
4527 snixzz.ConsoleHistory = {}
4528
4529 snixzz.AddToConsole( "Cleared console history." )
4530
4531end )
4532
4533snixzz.AddConsoleCommand( "connect", function( ply, cmd, args )
4534
4535 if args[1] != nil then
4536
4537 snixzz.AddToConsole( "Connecting to '" .. args[1] .. "'" )
4538
4539 G.RunConsoleCommand( "connect", args[1] )
4540
4541 else
4542
4543 snixzz.AddToConsole( "Unknown IP" )
4544
4545 end
4546
4547end )
4548
4549snixzz.ConsoleOpen = false
4550
4551function snixzz.Console()
4552
4553 snixzz.ConFrame = G.vgui.Create( "DFrame" )
4554 snixzz.ConFrame:SetSize( 700, 450 )
4555 snixzz.ConFrame:SetPos( 30, 30 )
4556 snixzz.ConFrame:SetTitle( "snixzz3 Console :: by 0xymoron" )
4557 snixzz.ConFrame:ShowCloseButton( false )
4558 snixzz.ConFrame:MakePopup()
4559 snixzz.ConFrame.Paint = function( self )
4560
4561 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), snixzz.Vars["misc_menucolor2"] )
4562 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4563 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
4564
4565 end
4566 snixzz.ConFrame.Think = function( self )
4567
4568 if G.input.IsKeyDown( KEY_ESCAPE ) then
4569
4570 snixzz.ConsoleOpen = false
4571 self:Remove()
4572
4573 end
4574
4575 end
4576
4577 local close = G.vgui.Create( "DButton", snixzz.ConFrame )
4578 close:SetSize( 50, 20 )
4579 close:SetPos( snixzz.ConFrame:GetWide() - 51, 1 )
4580 close:SetText( "x" )
4581 close:SetTextColor( G.Color( 255, 255, 255 ) )
4582 close:SetFont( "Trebuchet18" )
4583
4584 close.Paint = function( self )
4585
4586 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), G.Color( 168, 62, 62, 255 ) )
4587
4588 end
4589
4590 close.DoClick = function()
4591
4592 snixzz.ConsoleOpen = false
4593 snixzz.ConFrame:Remove()
4594 snixzz.Sound()
4595
4596 end
4597
4598 snixzz.cHistory = G.vgui.Create( "DListView", snixzz.ConFrame )
4599 snixzz.cHistory:SetPos( 5, 27 )
4600 snixzz.cHistory:SetSize( 690, 397 )
4601 snixzz.cHistory:SetSortable( false )
4602 snixzz.cHistory:AddColumn( "" )
4603 snixzz.cHistory:SetMultiSelect( false )
4604
4605 for k, v in pairs( snixzz.ConsoleHistory ) do
4606
4607 snixzz.cHistory:AddLine( v )
4608
4609 end
4610
4611 snixzz.cHistory.OnClickLine = function( prnt, line, self )
4612
4613 G.SetClipboardText( line:GetValue( 1 ) )
4614
4615 snixzz.Chat( snixzz.Colors.Green, "Copied selected line to clipboard.", true )
4616
4617 end
4618
4619 snixzz.cHistory:PerformLayout()
4620 snixzz.cHistory.VBar:SetScroll( snixzz.cHistory.VBar.CanvasSize )
4621
4622 -- command entry
4623 snixzz.cEntry = G.vgui.Create( "DTextEntry", snixzz.ConFrame )
4624 snixzz.cEntry:SetMultiline( false )
4625 snixzz.cEntry:SetSize( 690, 20 )
4626 snixzz.cEntry:SetPos( 5, 427 )
4627
4628 snixzz.cEntry.OnEnter = function( self )
4629
4630 snixzz.ConsoleCommand( self:GetValue() )
4631
4632 end
4633
4634 snixzz.cEntry.Think = function( self )
4635
4636 self:RequestFocus()
4637
4638 end
4639
4640end
4641
4642snixzz.MenuToggle = false
4643
4644function snixzz.DoMenuToggle()
4645
4646 snixzz.MenuOpen = true
4647 snixzz.Frame:SetVisible( true )
4648
4649end
4650
4651function snixzz.Menu()
4652
4653 local tabs, menuheight, menuwidth, w, h = {}, 430, 420, ScrW() / 2, ScrH() / 2
4654
4655 snixzz.Frame = G.vgui.Create( "DPropertySheet" )
4656 snixzz.Frame:SetParent( snixzz.Frame )
4657 snixzz.Frame:SetPos( 20, 80 )
4658 snixzz.Frame:SetSize( menuwidth, menuheight )
4659 snixzz.Frame:SetVisible( true )
4660 snixzz.Frame:MakePopup()
4661 snixzz.Frame.Think = function()
4662
4663 if snixzz.Binds["+menu"] == nil then return end
4664
4665 if !G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.MenuToggle then
4666
4667 snixzz.MenuOpen = false
4668 //snixzz.Changelog:SetVisible( false )
4669 //snixzz.LinksButton:SetVisible( false )
4670 snixzz.Frame:SetVisible( false )
4671
4672 end
4673
4674 end
4675 snixzz.Frame.Paint = function()
4676
4677 G.draw.RoundedBox( 0, 0, 30, snixzz.Frame:GetWide(), snixzz.Frame:GetTall(), snixzz.Vars["misc_menucolor"] )
4678 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4679 G.surface.DrawOutlinedRect( 0, 0, snixzz.Frame:GetWide(), snixzz.Frame:GetTall() )
4680
4681 end
4682
4683 -- Menu Toggle button
4684 local Toggle = G.vgui.Create( "DButton" )
4685 Toggle:SetParent( snixzz.Frame )
4686 Toggle:SetText( "Hold Open" )
4687 Toggle:SetTextColor( snixzz.Colors.Green )
4688 Toggle:SetPos( 0, 0 )
4689 Toggle:SetPos( snixzz.Frame:GetWide() - 60, 0 )
4690 Toggle:SetSize( 60, 30 )
4691 Toggle.DoClick = function()
4692
4693 snixzz.MenuToggle = !snixzz.MenuToggle
4694 snixzz.DoMenuToggle()
4695
4696 if snixzz.MenuToggle == true then
4697
4698 Toggle:SetText( "Close" )
4699 Toggle:SetTextColor( Color( 255, 255, 0 ) )
4700 snixzz.Sound()
4701
4702 else
4703
4704 Toggle:SetText( "Hold Open" )
4705 Toggle:SetTextColor( snixzz.Colors.Green )
4706 snixzz.Sound()
4707
4708 end
4709
4710 end
4711 Toggle.Paint = function()
4712
4713 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4714 G.surface.DrawOutlinedRect( 0, 0, Toggle:GetWide(), Toggle:GetTall() )
4715
4716 end
4717
4718 /*snixzz.LinksButton = G.vgui.Create( "DButton" )
4719 snixzz.LinksButton:SetText( "Links" )
4720 snixzz.LinksButton:SetPos( snixzz.Frame:GetWide() - 205, 60 )
4721 snixzz.LinksButton:SetSize( 35, 18 )
4722 snixzz.LinksButton:SetFont( "snixzz_logo_small" )
4723 snixzz.LinksButton:SetTextColor( color_white )
4724
4725 snixzz.LinksButton.DoClick = function()
4726
4727 if !snixzz.linksMenu then
4728
4729 snixzz.Sound()
4730 snixzz.OpenLinksMenu()
4731
4732 end
4733
4734 end
4735 snixzz.LinksButton.Paint = function()
4736
4737 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4738 G.surface.DrawOutlinedRect( 0, 0, snixzz.LinksButton:GetWide(), snixzz.LinksButton:GetTall() )
4739
4740 end*/
4741
4742 -- Parents for the tabs
4743 tabs.aimbot = G.vgui.Create( "DLabel", snixzz.Frame )
4744 tabs.aimbot:SetPos( 0, 0 )
4745 tabs.aimbot:SetText( "" )
4746
4747 tabs.esp = G.vgui.Create( "DLabel", snixzz.Frame )
4748 tabs.esp:SetPos( 0, 0 )
4749 tabs.esp:SetText( "" )
4750
4751 tabs.misc = G.vgui.Create( "DLabel", snixzz.Frame )
4752 tabs.misc:SetPos( 0, 0 )
4753 tabs.misc:SetText( "" )
4754
4755 tabs.lists = G.vgui.Create( "DLabel", snixzz.Frame )
4756 tabs.lists:SetPos( 0, 0 )
4757 tabs.lists:SetText( "" )
4758
4759 tabs.log = G.vgui.Create( "DLabel", snixzz.Frame )
4760 tabs.log:SetPos( 0, 0 )
4761 tabs.log:SetText( "" )
4762
4763 tabs.config = G.vgui.Create( "DLabel", snixzz.Frame )
4764 tabs.config:SetPos( 0, 0 )
4765 tabs.config:SetText( "" )
4766
4767 snixzz.Frame:AddSheet( "Aimbot", tabs.aimbot, "icon16/lightning.png", false, false )
4768 snixzz.Frame:AddSheet( "Visual", tabs.esp, "icon16/eye.png", false, false )
4769 snixzz.Frame:AddSheet( "Misc", tabs.misc, "icon16/plugin.png", false, false )
4770 snixzz.Frame:AddSheet( "Lists", tabs.lists, "icon16/user_add.png", false, false )
4771 snixzz.Frame:AddSheet( "Detours", tabs.log, "icon16/application_xp_terminal.png", false, false )
4772 snixzz.Frame:AddSheet( "Config", tabs.config, "icon16/wrench.png", false, false )
4773
4774 -- Aimbot Settings
4775 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aimbot Toggle", "aim_toggle", 5, 5 )
4776 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Autoshoot", "aim_autoshoot", 5, 25 )
4777 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Silent Aim", "aim_silent", 5, 45 )
4778 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Spread Prediction", "aim_nospread", 5, 65 )
4779 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aim Prediction", "aim_prediction", 5, 85 )
4780 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Remove Recoil", "aim_norecoil", 5, 105 )
4781 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Miss random shots", "aim_badshots", 5, 125 )
4782 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Hold Target", "aim_holdtarget", 5, 145 )
4783
4784 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Team", "aim_ignoreteam", 130, 5 )
4785 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Admins", "aim_ignoreadmins", 130, 25 )
4786 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Steam Friends", "aim_ignoresteam", 130, 45 )
4787 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Bots", "aim_ignorebots", 130, 65 )
4788 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore LOS", "aim_ignorelos", 130, 85 )
4789 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friends", "aim_ignorefriends", 130, 105 )
4790 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friendly Traitors", "aim_ignoretraitors", 130, 125 )
4791 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Target Only Traitors", "aim_onlytraitors", 130, 145 )
4792
4793 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti Anti-Aim", "aim_antiantiaim", 275, 5 )
4794 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti-Aim", "aim_anti", 275, 25 )
4795
4796 snixzz.CreateOption( "Slider", tabs.aimbot, "Spinbot Speed", "aim_anti_spin_speed", 10, 50, 420, 5, 325, 0 )
4797 snixzz.CreateOption( "Slider", tabs.aimbot, "Field of View", "aim_fov", 1, 180, 420, 5, 345, 0 )
4798 snixzz.CreateOption( "Slider", tabs.aimbot, "Aimspot Offset", "aim_offset", -20, 20, 425, 5, 365, 0 )
4799
4800
4801 snixzz.CreateOption( "Label", tabs.aimbot, "Prediction Method", 115, 250 )
4802
4803 local PredictionMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
4804 PredictionMethod:SetPos( 115, 265 )
4805 PredictionMethod:SetSize( 105, 20 )
4806 PredictionMethod:SetText( snixzz.Vars["aim_prediction_method"] )
4807 PredictionMethod:SetTextColor( color_white )
4808
4809 for k, v in G.next, snixzz.PredictionMethods do
4810
4811 PredictionMethod:AddChoice( v )
4812
4813 end
4814
4815 PredictionMethod.OnSelect = function( self )
4816
4817 snixzz.Vars["aim_prediction_method"] = self:GetValue()
4818 snixzz.Chat( Color( 0, 255, 255 ), "Set prediction method to '" .. self:GetValue() .. "'" )
4819 snixzz.Sound()
4820
4821 end
4822
4823 PredictionMethod.Paint = function()
4824
4825 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4826 G.surface.DrawOutlinedRect( 0, 0, PredictionMethod:GetWide(), PredictionMethod:GetTall() )
4827
4828 end
4829
4830 snixzz.CreateOption( "Label", tabs.aimbot, "Target Type", 225, 250 )
4831
4832 local TargetType = G.vgui.Create( "DComboBox", tabs.aimbot )
4833 TargetType:SetPos( 225, 265 )
4834 TargetType:SetSize( 105, 20 )
4835 TargetType:SetText( snixzz.Vars["aim_target_type"] )
4836 TargetType:SetTextColor( color_white )
4837
4838 for k, v in G.next, { "Players", "NPC", "Both" } do
4839
4840 TargetType:AddChoice( v )
4841
4842 end
4843
4844 TargetType.OnSelect = function( self )
4845
4846 snixzz.Vars["aim_target_type"] = self:GetValue()
4847 snixzz.Chat( Color( 0, 255, 255 ), "Set target type to '" .. self:GetValue() .. "'" )
4848 snixzz.Sound()
4849
4850 end
4851
4852 TargetType.Paint = function()
4853
4854 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4855 G.surface.DrawOutlinedRect( 0, 0, TargetType:GetWide(), TargetType:GetTall() )
4856
4857 end
4858
4859 // AntiAim Method
4860 snixzz.CreateOption( "Label", tabs.aimbot, "Anti-Aim Method", 5, 250 )
4861 local AntiAimMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
4862 AntiAimMethod:SetPos( 5, 265 )
4863 AntiAimMethod:SetSize( 105, 20 )
4864 AntiAimMethod:SetText( snixzz.Vars["aim_anti_method"] )
4865 AntiAimMethod:SetTextColor( color_white )
4866
4867 for k, v in G.next, snixzz.AntiAimMethods do
4868
4869 AntiAimMethod:AddChoice( v )
4870
4871 end
4872
4873 AntiAimMethod.OnSelect = function( self )
4874
4875 snixzz.Vars["aim_anti_method"] = self:GetValue()
4876 snixzz.Chat( Color( 0, 255, 255 ), "Set anti-aim method to '" .. self:GetValue() .. "'" )
4877 snixzz.Sound()
4878
4879 end
4880
4881 AntiAimMethod.Paint = function()
4882
4883 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4884 G.surface.DrawOutlinedRect( 0, 0, AntiAimMethod:GetWide(), AntiAimMethod:GetTall() )
4885
4886 end
4887
4888 -- Aimbot hitbox/bone method & spot selection
4889 snixzz.CreateOption( "Label", tabs.aimbot, "Aimbot Method", 5, 290 )
4890
4891 local AimbotMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
4892 AimbotMethod:SetPos( 5, 305 )
4893 AimbotMethod:SetSize( 105, 20 )
4894 AimbotMethod:SetText( snixzz.Vars["aim_method"] )
4895 AimbotMethod:AddChoice( "Hitbox" )
4896 AimbotMethod:AddChoice( "Bone" )
4897 AimbotMethod:AddChoice( "Hitscan" )
4898 AimbotMethod:SetTextColor( color_white )
4899 AimbotMethod.OnSelect = function( self )
4900
4901 snixzz.Vars["aim_method"] = self:GetValue()
4902 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot method to '" .. self:GetValue() .. "'" )
4903 snixzz.Sound()
4904
4905 -- Close to menu to avoid bugs.
4906 snixzz.Frame:SetVisible( false )
4907 //snixzz.Changelog:SetVisible( false )
4908 //snixzz.LinksButton:SetVisible( false )
4909 snixzz.MenuOpen = false
4910 snixzz.MenuToggle = false
4911
4912 end
4913
4914 AimbotMethod.Paint = function()
4915
4916 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4917 G.surface.DrawOutlinedRect( 0, 0, AimbotMethod:GetWide(), AimbotMethod:GetTall() )
4918
4919 end
4920
4921 -- Aimspot & aim method selection
4922 snixzz.CreateOption( "Label", tabs.aimbot, "Aim Spot", 115, 290 )
4923
4924 local Aimspot = G.vgui.Create( "DComboBox", tabs.aimbot )
4925 Aimspot:SetPos( 115, 305 )
4926 Aimspot:SetSize( 105, 20 )
4927 Aimspot:SetTextColor( color_white )
4928
4929 if snixzz.Vars["aim_method"] == "Hitbox" then
4930
4931 Aimspot:SetText( snixzz.Vars["aim_hitbox"] )
4932
4933 Aimspot:SetDisabled( false )
4934
4935 for k, v in G.next, snixzz.Hitboxes do
4936
4937 Aimspot:AddChoice( k )
4938
4939 end
4940
4941 elseif snixzz.Vars["aim_method"] == "Bone" then
4942
4943 Aimspot:SetText( snixzz.Vars["aim_bone"] )
4944
4945 Aimspot:SetDisabled( false )
4946
4947 for k, v in G.next, snixzz.Bones do
4948
4949 Aimspot:AddChoice( k )
4950
4951
4952 end
4953
4954 elseif snixzz.Vars["aim_method"] == "Hitscan" then
4955
4956 Aimspot:SetText( "Auto" )
4957 Aimspot:SetDisabled( true )
4958
4959 end
4960
4961 Aimspot.OnSelect = function( self )
4962
4963 if snixzz.Vars["aim_method"] == "Hitbox" then
4964
4965 snixzz.Vars["aim_hitbox"] = self:GetValue()
4966 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
4967
4968 elseif snixzz.Vars["aim_method"] == "Bone" then
4969
4970 snixzz.Vars["aim_bone"] = self:GetValue()
4971 snixzz.Chat( Color( 0, 255, 255 ), "Set aimbot bone to '" .. self:GetValue() .. "'" )
4972
4973 end
4974
4975 snixzz.Sound()
4976 end
4977
4978 Aimspot.Paint = function()
4979
4980 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
4981 G.surface.DrawOutlinedRect( 0, 0, Aimspot:GetWide(), Aimspot:GetTall() )
4982
4983 end
4984
4985 // Target method
4986 snixzz.CreateOption( "Label", tabs.aimbot, "Target Method", 225, 290 )
4987
4988 local TargetMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
4989 TargetMethod:SetPos( 225, 305 )
4990 TargetMethod:SetSize( 105, 20 )
4991 TargetMethod:SetText( snixzz.Vars["aim_target_method"] )
4992 TargetMethod:SetTextColor( color_white )
4993 TargetMethod:AddChoice( "Distance" )
4994 TargetMethod:AddChoice( "Crosshair" )
4995 TargetMethod.OnSelect = function( self )
4996
4997 snixzz.Vars["aim_target_method"] = self:GetValue()
4998 snixzz.Chat( Color( 0, 255, 255 ), "Set target method to '" .. self:GetValue() .. "'" )
4999 snixzz.Sound()
5000
5001 end
5002
5003 TargetMethod.Paint = function()
5004
5005 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5006 G.surface.DrawOutlinedRect( 0, 0, TargetMethod:GetWide(), TargetMethod:GetTall() )
5007
5008 end
5009
5010 -- Visual Settings
5011 snixzz.CreateOption( "Checkbox", tabs.esp, "Enable Visuals", "esp_enabled", 5, 5 )
5012 snixzz.CreateOption( "Checkbox", tabs.esp, "Name Text", "esp_name", 5, 45 )
5013 snixzz.CreateOption( "Checkbox", tabs.esp, "Health Text", "esp_health_text", 5, 65 )
5014 snixzz.CreateOption( "Checkbox", tabs.esp, "Weapon Text", "esp_weapon", 5, 85 )
5015 snixzz.CreateOption( "Checkbox", tabs.esp, "Distance Text", "esp_distance", 5, 105 )
5016 snixzz.CreateOption( "Checkbox", tabs.esp, "Bounding Box", "esp_box", 5, 125 )
5017 snixzz.CreateOption( "Checkbox", tabs.esp, "Chams", "esp_chams", 5, 145 )
5018 snixzz.CreateOption( "Checkbox", tabs.esp, "Health Bar", "esp_health_bar", 5, 165 )
5019
5020 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair", "esp_crosshair", 130, 5 )
5021 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair Box", "esp_crosshair_box", 130, 25 )
5022 snixzz.CreateOption( "Checkbox", tabs.esp, "Remove Hands", "esp_nohands", 130, 45 )
5023 snixzz.CreateOption( "Checkbox", tabs.esp, "Aimbot Status", "esp_status", 130, 65 )
5024 snixzz.CreateOption( "Checkbox", tabs.esp, "Laser Sights", "esp_laser", 130, 85 )
5025 snixzz.CreateOption( "Checkbox", tabs.esp, "Aim Snaplines", "esp_snaplines", 130, 105 )
5026 snixzz.CreateOption( "Checkbox", tabs.esp, "Dynamic Light", "esp_dynamiclight", 130, 125 )
5027 snixzz.CreateOption( "Checkbox", tabs.esp, "Wireframe Weapon", "esp_wireweapon", 130, 145 )
5028 snixzz.CreateOption( "Checkbox", tabs.esp, "Draw Aimbot Position", "esp_aimpos", 130, 165 )
5029
5030 snixzz.CreateOption( "Slider", tabs.esp, "Field of View", "esp_fov", 90, 140, 420, 5, 325, 1 )
5031 snixzz.CreateOption( "Slider", tabs.esp, "Box Width", "esp_box_width", 1, 2.5, 420, 5, 345, 1 )
5032 snixzz.CreateOption( "Slider", tabs.esp, "Render Distance", "esp_distance", 0, 7500, 415, 5, 365, 0 )
5033
5034
5035 snixzz.CreateOption( "Label", tabs.esp, "Chams Material", 5, 290 )
5036
5037 local ChamsType = G.vgui.Create( "DComboBox", tabs.esp )
5038 ChamsType:SetPos( 5, 305 )
5039 ChamsType:SetSize( 105, 20 )
5040 ChamsType:SetText( snixzz.Vars["esp_chams_material"] )
5041 ChamsType:AddChoice( "Solid" )
5042 ChamsType:AddChoice( "Wireframe" )
5043 ChamsType:AddChoice( "XQZ" )
5044 ChamsType:SetTextColor( color_white )
5045 ChamsType.OnSelect = function( self )
5046
5047 snixzz.Vars["esp_chams_material"] = self:GetValue()
5048 snixzz.Chat( Color( 0, 255, 255 ), "Set chams material to '" .. self:GetValue() .. "'" )
5049 snixzz.Sound()
5050
5051 end
5052
5053 ChamsType.Paint = function()
5054
5055 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5056 G.surface.DrawOutlinedRect( 0, 0, ChamsType:GetWide(), ChamsType:GetTall() )
5057
5058 end
5059
5060 snixzz.CreateOption( "Label", tabs.esp, "ESP Type", 115, 290 )
5061
5062 local ESPType = G.vgui.Create( "DComboBox", tabs.esp )
5063 ESPType:SetPos( 115, 305 )
5064 ESPType:SetSize( 105, 20 )
5065 ESPType:SetText( snixzz.Vars["esp_type"] )
5066 ESPType:AddChoice( "Players" )
5067 ESPType:AddChoice( "NPC" )
5068 ESPType:AddChoice( "Entities" )
5069 ESPType:AddChoice( "All" )
5070 ESPType:SetTextColor( color_white )
5071 ESPType.OnSelect = function( self )
5072
5073 snixzz.Vars["esp_type"] = self:GetValue()
5074 snixzz.Chat( Color( 0, 255, 255 ), "Set ESP type to '" .. self:GetValue() .. "'" )
5075 snixzz.Sound()
5076
5077 end
5078
5079 ESPType.Paint = function()
5080
5081 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5082 G.surface.DrawOutlinedRect( 0, 0, ESPType:GetWide(), ESPType:GetTall() )
5083
5084 end
5085
5086 --------------
5087 -- Misc tab --
5088 --------------
5089 snixzz.CreateOption( "Checkbox", tabs.misc, "Bunnyhop", "misc_bhop", 5, 5 )
5090 snixzz.CreateOption( "Checkbox", tabs.misc, "Autostrafe", "misc_autostrafe", 5, 25 )
5091 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot", "misc_triggerbot", 5, 45 )
5092 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot NoSpread", "misc_triggerbot_nospread", 5, 65 )
5093 snixzz.CreateOption( "Checkbox", tabs.misc, "Thirdperson", "misc_thirdperson", 5, 85 )
5094 snixzz.CreateOption( "Checkbox", tabs.misc, "Traitor Finder", "misc_traitor_finder", 5, 105 )
5095 snixzz.CreateOption( "Checkbox", tabs.misc, "Murder Finder", "misc_murder_finder", 5, 125 )
5096 snixzz.CreateOption( "Checkbox", tabs.misc, "Prophunt Finder", "misc_prophunt_finder", 5, 145 )
5097 snixzz.CreateOption( "Checkbox", tabs.misc, "Chat Spam", "misc_chat_spam", 5, 165 )
5098 snixzz.CreateOption( "Checkbox", tabs.misc, "Rapid Fire", "misc_rapidfire", 5, 185 )
5099 snixzz.CreateOption( "Slider", tabs.misc, "Thirdperson Distance", "misc_thirdperson_distance", 50, 180, 415, 5, 345, 1 )
5100
5101 snixzz.CreateOption( "Label", tabs.misc, "Triggerbot Method", 5, 290 )
5102
5103 local Trigmethod = G.vgui.Create( "DComboBox", tabs.misc )
5104 Trigmethod:SetPos( 5, 305 )
5105 Trigmethod:SetSize( 105, 20 )
5106 Trigmethod:SetText( snixzz.Vars["misc_triggerbot_method"] )
5107 Trigmethod:AddChoice( "Body" )
5108 Trigmethod:AddChoice( "Hitbox" )
5109 Trigmethod:SetTextColor( color_white )
5110 Trigmethod.OnSelect = function( self )
5111
5112 snixzz.Vars["misc_triggerbot_method"] = self:GetValue()
5113 snixzz.Chat( Color( 0, 255, 255 ), "Set triggerbot method to '" .. self:GetValue() .. "'" )
5114 snixzz.Sound()
5115
5116 end
5117 Trigmethod.Paint = function()
5118
5119 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5120 G.surface.DrawOutlinedRect( 0, 0, Trigmethod:GetWide(), Trigmethod:GetTall() )
5121
5122 end
5123
5124 snixzz.CreateOption( "Label", tabs.misc, "Triggerbot Type", 115, 290 )
5125
5126 local TrigType = G.vgui.Create( "DComboBox", tabs.misc )
5127 TrigType:SetPos( 115, 305 )
5128 TrigType:SetSize( 105, 20 )
5129 TrigType:SetText( snixzz.Vars["misc_triggerbot_type"] )
5130 TrigType:AddChoice( "Players" )
5131 TrigType:AddChoice( "NPC" )
5132 TrigType:AddChoice( "Both" )
5133 TrigType:SetTextColor( color_white )
5134 TrigType.OnSelect = function( self )
5135
5136 snixzz.Vars["misc_triggerbot_type"] = self:GetValue()
5137 snixzz.Chat( Color( 0, 255, 255 ), "Set triggerbot type to '" .. self:GetValue() .. "'" )
5138 snixzz.Sound()
5139
5140 end
5141 TrigType.Paint = function()
5142
5143 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5144 G.surface.DrawOutlinedRect( 0, 0, TrigType:GetWide(), TrigType:GetTall() )
5145
5146 end
5147
5148 snixzz.CreateOption( "Label", tabs.misc, "Chat Spam Method", 225, 290 )
5149
5150 local SpamMethod = G.vgui.Create( "DComboBox", tabs.misc )
5151 SpamMethod:SetPos( 225, 305 )
5152 SpamMethod:SetSize( 105, 20 )
5153 SpamMethod:SetText( snixzz.Vars["misc_chat_spam_method"] )
5154 SpamMethod:AddChoice( "Advertise" )
5155 SpamMethod:AddChoice( "Jokes" )
5156 SpamMethod:SetTextColor( color_white )
5157 SpamMethod.OnSelect = function( self )
5158
5159 snixzz.Vars["misc_chat_spam_method"] = self:GetValue()
5160 snixzz.Chat( Color( 0, 255, 255 ), "Set chat spam method to '" .. self:GetValue() .. "'" )
5161 snixzz.Sound()
5162
5163 end
5164
5165 SpamMethod.Paint = function()
5166
5167 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5168 G.surface.DrawOutlinedRect( 0, 0, SpamMethod:GetWide(), SpamMethod:GetTall() )
5169
5170 end
5171
5172 ---------------
5173 -- Lists Tab --
5174 ---------------
5175
5176 -- Friends/enemies
5177
5178 local Enemies = G.vgui.Create( "DListView", tabs.lists )
5179 Enemies:SetPos( 5, 5 )
5180 Enemies:SetSize( 170, 180 )
5181 Enemies:AddColumn( "Enemies" )
5182
5183 for k, v in G.next, G.player.GetAll() do
5184
5185 if !snixzz.Friends[v:Nick()] && v != G.LocalPlayer() then
5186
5187 Enemies:AddLine( v:Nick() )
5188
5189 end
5190
5191 end
5192
5193 local Friends = G.vgui.Create( "DListView", tabs.lists )
5194 Friends:SetPos( 230, 5 )
5195 Friends:SetSize( 170, 180 )
5196 Friends:AddColumn( "Friends" )
5197
5198 for k, v in G.next, snixzz.Friends do
5199
5200 Friends:AddLine( k )
5201
5202 end
5203
5204 local AddFriend = G.vgui.Create( "DButton", tabs.lists )
5205 AddFriend:SetText( "-->" )
5206 AddFriend:SetSize( 30, 20 )
5207 AddFriend:SetPos( 187.5, 140 )
5208 AddFriend:SetTextColor( color_white )
5209 AddFriend.DoClick = function()
5210
5211 local line = Enemies:GetSelectedLine()
5212
5213 if line != nil then
5214
5215 local ply = Enemies:GetLine( line ):GetValue(1)
5216
5217 if !snixzz.Friends[ply] then
5218
5219 snixzz.Friends[ply] = true
5220 snixzz.Chat( snixzz.Colors.Green, "Added '" .. ply .. "' to friends list." )
5221 Friends:AddLine( ply )
5222 Enemies:RemoveLine( line )
5223 snixzz.Sound()
5224
5225 end
5226
5227 end
5228
5229 end
5230
5231 AddFriend.Paint = function()
5232
5233 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5234 G.surface.DrawOutlinedRect( 0, 0, AddFriend:GetWide(), AddFriend:GetTall() )
5235
5236 end
5237
5238 local RemoveFriend = G.vgui.Create( "DButton", tabs.lists )
5239 RemoveFriend:SetText("<--")
5240 RemoveFriend:SetSize( 30, 20 )
5241 RemoveFriend:SetPos( 187.5, 165 )
5242 RemoveFriend:SetTextColor( color_white )
5243 RemoveFriend.DoClick = function()
5244
5245 local line = Friends:GetSelectedLine()
5246
5247 if line != nil then
5248
5249 local ply = Friends:GetLine( line ):GetValue( 1 )
5250
5251 if snixzz.Friends[ply] then
5252
5253 for k, v in G.next, snixzz.Friends do
5254
5255 if k == ply then
5256
5257 snixzz.Friends[k] = nil
5258 snixzz.Chat( snixzz.Colors.Red, "Removed '" .. ply .. "' from the friends list." )
5259 snixzz.Sound()
5260
5261 end
5262
5263 end
5264
5265 Enemies:AddLine( ply )
5266 Friends:RemoveLine( line )
5267
5268 end
5269
5270 end
5271
5272 end
5273
5274 RemoveFriend.Paint = function()
5275
5276 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5277 G.surface.DrawOutlinedRect( 0, 0, RemoveFriend:GetWide(), RemoveFriend:GetTall() )
5278
5279 end
5280
5281 local AllEnts = G.vgui.Create( "DListView", tabs.lists )
5282 AllEnts:SetPos( 5, 190 )
5283 AllEnts:SetSize( 170, 180 )
5284 AllEnts:AddColumn( "All Entities" )
5285
5286 local addedEnts = {}
5287
5288 for k, v in G.next, G.ents.GetAll() do
5289
5290 if !addedEnts[v:GetClass()] && !v:IsPlayer() && !v:IsNPC() && !snixzz.Entities[v:GetClass()] && !snixzz.BadEntities[v:GetClass()] then
5291
5292 AllEnts:AddLine( v:GetClass() )
5293 addedEnts[v:GetClass()] = true
5294
5295 end
5296
5297 end
5298
5299 local DrawEnts = G.vgui.Create( "DListView", tabs.lists )
5300 DrawEnts:SetPos( 230, 190 )
5301 DrawEnts:SetSize( 170, 180 )
5302 DrawEnts:AddColumn( "Entities to Draw" )
5303
5304 for k, v in G.next, snixzz.Entities do
5305
5306 DrawEnts:AddLine( k )
5307
5308 end
5309
5310 local AddEntity = G.vgui.Create( "DButton", tabs.lists )
5311 AddEntity:SetText( "-->" )
5312 AddEntity:SetSize( 30, 20 )
5313 AddEntity:SetPos( 187.5, 315 )
5314 AddEntity:SetTextColor( color_white )
5315 AddEntity.DoClick = function()
5316
5317 local line = AllEnts:GetSelectedLine()
5318
5319 if line != nil then
5320
5321 local ent = AllEnts:GetLine( line ):GetValue(1)
5322
5323 if !snixzz.Entities[ply] then
5324
5325 snixzz.Entities[ent] = true
5326 snixzz.Chat( snixzz.Colors.Green, "Added '" .. ent .. "' to entities list." )
5327 DrawEnts:AddLine( ent )
5328 AllEnts:RemoveLine( line )
5329 snixzz.Sound()
5330
5331 end
5332
5333 end
5334
5335 end
5336
5337 AddEntity.Paint = function()
5338
5339 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5340 G.surface.DrawOutlinedRect( 0, 0, AddEntity:GetWide(), AddEntity:GetTall() )
5341
5342 end
5343
5344 local RemoveEntity = G.vgui.Create( "DButton", tabs.lists )
5345 RemoveEntity:SetText("<--")
5346 RemoveEntity:SetSize( 30, 20 )
5347 RemoveEntity:SetPos( 187.5, 350 )
5348 RemoveEntity:SetTextColor( color_white )
5349 RemoveEntity.DoClick = function()
5350
5351 local line = DrawEnts:GetSelectedLine()
5352
5353 if line != nil then
5354
5355 local ent = DrawEnts:GetLine( line ):GetValue( 1 )
5356
5357 if snixzz.Entities[ent] then
5358
5359 for k, v in G.next, snixzz.Entities do
5360
5361 if k == ent then
5362
5363 snixzz.Entities[k] = nil
5364 snixzz.Chat( snixzz.Colors.Red, "Removed '" .. ent .. "' from the entities list." )
5365 snixzz.Sound()
5366
5367 end
5368
5369 end
5370
5371 AllEnts:AddLine( ent )
5372 DrawEnts:RemoveLine( line )
5373
5374 end
5375
5376 end
5377
5378 end
5379
5380 RemoveEntity.Paint = function()
5381
5382 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5383 G.surface.DrawOutlinedRect( 0, 0, RemoveEntity:GetWide(), RemoveEntity:GetTall() )
5384
5385 end
5386
5387 -----------------
5388 -- Log Tab --
5389 -----------------
5390
5391 snixzz.LogTab = G.vgui.Create( "DListView", tabs.log )
5392 snixzz.LogTab:SetPos( 5, 5 )
5393 snixzz.LogTab:SetSize( snixzz.Frame:GetWide() - 25, snixzz.Frame:GetTall() - 70 )
5394 snixzz.LogTab:AddColumn( "snixzz3 Logs" )
5395 snixzz.LogTab:SetSortable( false )
5396 snixzz.LogTab:SetMultiSelect( false )
5397
5398 for k, v in G.next, snixzz.Lines do
5399 snixzz.LogTab:AddLine( v )
5400
5401 end
5402
5403 snixzz.LogTab.OnClickLine = function( parent, line, isselected )
5404
5405 G.SetClipboardText( line:GetValue( 1 ) )
5406
5407 end
5408
5409 local ConsoleClear = G.vgui.Create( "DButton", tabs.log )
5410 ConsoleClear:SetText( "Clear Log" )
5411 ConsoleClear:SetSize( snixzz.Frame:GetWide() - 25, 23 )
5412 ConsoleClear:SetPos( 5, 370 )
5413 ConsoleClear:SetTextColor( color_white )
5414
5415 ConsoleClear.DoClick = function()
5416
5417 snixzz.Lines = {}
5418 snixzz.LogTab:Clear()
5419
5420 end
5421
5422 ConsoleClear.Paint = function()
5423
5424 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5425 G.surface.DrawOutlinedRect( 0, 0, ConsoleClear:GetWide(), ConsoleClear:GetTall() )
5426
5427 end
5428
5429 ----------------
5430 -- Config Tab --
5431 ----------------
5432 --Menu Settings
5433 snixzz.CreateOption( "Label", tabs.config, "Menu Color", 230, 5 )
5434
5435 local MenuColor = G.vgui.Create( "DColorMixer", tabs.config )
5436 MenuColor:SetPos( 230, 20 )
5437 MenuColor:SetSize( 170, 100 )
5438 MenuColor:SetPalette( false )
5439 MenuColor:SetAlphaBar( true )
5440 MenuColor:SetWangs( false )
5441 MenuColor:SetColor( snixzz.Vars["misc_menucolor"] )
5442
5443 MenuColor.ValueChanged = function()
5444
5445 snixzz.Vars["misc_menucolor"] = MenuColor:GetColor()
5446
5447 end
5448
5449 snixzz.CreateOption( "Label", tabs.config, "Secondary Menu Color", 230, 125 )
5450
5451 local MenuColor2 = G.vgui.Create( "DColorMixer", tabs.config )
5452 MenuColor2:SetPos( 230, 140 )
5453 MenuColor2:SetSize( 170, 100 )
5454 MenuColor2:SetPalette( false )
5455 MenuColor2:SetAlphaBar( true )
5456 MenuColor2:SetWangs( false )
5457 MenuColor2:SetColor( snixzz.Vars["misc_menucolor2"] )
5458
5459 MenuColor2.ValueChanged = function()
5460
5461 snixzz.Vars["misc_menucolor2"] = MenuColor2:GetColor()
5462
5463 end
5464
5465 snixzz.CreateOption( "Label", tabs.config, "Laser Color", 230, 245 )
5466
5467 local LaserCol = G.vgui.Create( "DColorMixer", tabs.config )
5468 LaserCol:SetPos( 230, 260 )
5469 LaserCol:SetSize( 170, 100 )
5470 LaserCol:SetPalette( false )
5471 LaserCol:SetAlphaBar( false )
5472 LaserCol:SetWangs( false )
5473 LaserCol:SetColor( snixzz.Vars["misc_lasercolor"] )
5474
5475 LaserCol.ValueChanged = function()
5476
5477 snixzz.Vars["misc_lasercolor"] = LaserCol:GetColor()
5478
5479 end
5480
5481 local CfgList = G.vgui.Create( "DListView", tabs.config )
5482 CfgList:SetPos( 5, 5 )
5483 CfgList:SetMultiSelect( false )
5484 CfgList:SetSize( 220, 80 )
5485 CfgList:AddColumn( "Config" )
5486
5487 for k, v in G.next, snixzz.Configs do
5488
5489 CfgList:AddLine( v )
5490
5491 end
5492
5493 CfgList.DoDoubleClick = function()
5494
5495 local line = CfgList:GetSelectedLine()
5496
5497 if line != nil then
5498
5499 local config = CfgList:GetLine( line ):GetValue( 1 )
5500 snixzz.LoadConfig( config )
5501 snixzz.Sound()
5502
5503 end
5504
5505 end
5506
5507 -- Right from gInject. Im lazy with menus. I'll re-write it later
5508 local CreateConfig = G.vgui.Create( "DButton", tabs.config )
5509 CreateConfig:SetText( "Create New" )
5510 CreateConfig:SetSize( 105, 30 )
5511 CreateConfig:SetPos( 5, 90 )
5512 CreateConfig:SetTextColor( color_white )
5513 CreateConfig.DoClick = function()
5514
5515 G.Derma_StringRequest( "New Config", "Name of the new config", "", function( txt )
5516
5517 snixzz.SaveConfig( txt )
5518 snixzz.Sound()
5519
5520 end )
5521
5522 end
5523
5524 CreateConfig.Paint = function()
5525
5526 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5527 G.surface.DrawOutlinedRect( 0, 0, CreateConfig:GetWide(), CreateConfig:GetTall() )
5528
5529 end
5530
5531 local RenameConfig = G.vgui.Create( "DButton", tabs.config )
5532 RenameConfig:SetText( "Rename" )
5533 RenameConfig:SetSize( 105, 30 )
5534 RenameConfig:SetPos( 5, 125 )
5535 RenameConfig:SetTextColor( color_white )
5536 RenameConfig.DoClick = function()
5537
5538 G.Derma_StringRequest( "Rename Config", "Name of the new config", "", function( NewConfig )
5539
5540 local line = CfgList:GetSelectedLine()
5541
5542 if line != nil then
5543
5544 local OldConfig = CfgList:GetLine( line ):GetValue( 1 )
5545
5546 if OldConfig != "default" then
5547
5548 snixzz.RenameConfig( OldConfig, NewConfig )
5549 G.table.remove( snixzz.Configs, CfgList:GetSelectedLine() )
5550 G.table.insert( snixzz.Configs, NewConfig )
5551 snixzz.Sound()
5552
5553 end
5554
5555 end
5556
5557 end )
5558
5559 end
5560
5561 RenameConfig.Paint = function()
5562
5563 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5564 G.surface.DrawOutlinedRect( 0, 0, RenameConfig:GetWide(), RenameConfig:GetTall() )
5565
5566 end
5567
5568 local DeleteConfig = G.vgui.Create( "DButton", tabs.config )
5569 DeleteConfig:SetText( "Delete" )
5570 DeleteConfig:SetSize( 105, 30 )
5571 DeleteConfig:SetPos( 118, 90 )
5572 DeleteConfig:SetTextColor( color_white )
5573 DeleteConfig.DoClick = function()
5574
5575 local line = CfgList:GetSelectedLine()
5576
5577 if line != nil then
5578
5579 local config = CfgList:GetLine( line ):GetValue( 1 )
5580 if config != "default" then
5581
5582 for k, v in G.next, snixzz.Configs do
5583
5584 if v == config then
5585
5586 snixzz.DeleteConfig( config )
5587 G.table.remove( snixzz.Configs, k )
5588 snixzz.Sound()
5589
5590 end
5591
5592 end
5593
5594 end
5595
5596 end
5597
5598 end
5599
5600 DeleteConfig.Paint = function()
5601
5602 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5603 G.surface.DrawOutlinedRect( 0, 0, DeleteConfig:GetWide(), DeleteConfig:GetTall() )
5604
5605 end
5606
5607
5608 local LoadConfig = G.vgui.Create( "DButton", tabs.config )
5609 LoadConfig:SetText( "Load" )
5610 LoadConfig:SetSize( 105, 30 )
5611 LoadConfig:SetPos( 118, 125 )
5612 LoadConfig:SetTextColor( color_white )
5613 LoadConfig.DoClick = function()
5614
5615 local line = CfgList:GetSelectedLine()
5616
5617 if line != nil then
5618 local config = CfgList:GetLine( line ):GetValue( 1 )
5619 snixzz.LoadConfig( config )
5620 snixzz.Frame:SetVisible( false )
5621 //snixzz.Changelog:SetVisible( false )
5622 //snixzz.LinksButton:SetVisible( false )
5623 snixzz.MenuOpen = false
5624 snixzz.MenuToggle = false
5625 snixzz.Sound()
5626
5627 end
5628
5629 end
5630
5631 LoadConfig.Paint = function()
5632
5633 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5634 G.surface.DrawOutlinedRect( 0, 0, LoadConfig:GetWide(), LoadConfig:GetTall() )
5635
5636 end
5637
5638 local SetDefaultCfg = G.vgui.Create( "DButton", tabs.config )
5639 SetDefaultCfg:SetText( "Set Default" )
5640 SetDefaultCfg:SetSize( 105, 30 )
5641 SetDefaultCfg:SetPos( 118, 160 )
5642 SetDefaultCfg:SetTextColor( color_white )
5643 SetDefaultCfg.DoClick = function()
5644
5645 local line = CfgList:GetSelectedLine()
5646
5647 if line != nil then
5648
5649 local config = CfgList:GetLine( line ):GetValue( 1 )
5650
5651 snixzz.SetDefaultConfig( config )
5652 snixzz.LoadConfig( config )
5653 snixzz.Sound()
5654
5655 end
5656
5657 end
5658
5659 SetDefaultCfg.Paint = function()
5660
5661 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5662 G.surface.DrawOutlinedRect( 0, 0, SetDefaultCfg:GetWide(), SetDefaultCfg:GetTall() )
5663
5664 end
5665
5666 local UpdateConfig = G.vgui.Create( "DButton", tabs.config )
5667 UpdateConfig:SetText( "Save Changes" )
5668 UpdateConfig:SetSize( 105, 35 )
5669 UpdateConfig:SetPos( 118, 195 )
5670 UpdateConfig:SetTextColor( color_white )
5671 UpdateConfig.DoClick = function()
5672
5673 snixzz.Sound()
5674 snixzz.UpdateConfig()
5675
5676 end
5677
5678 UpdateConfig.Paint = function()
5679
5680 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5681 G.surface.DrawOutlinedRect( 0, 0, UpdateConfig:GetWide(), UpdateConfig:GetTall() )
5682
5683 end
5684
5685 // Binds
5686 local BindCommands = G.vgui.Create( "DComboBox", tabs.config )
5687 BindCommands:SetPos( 5, 160 )
5688 BindCommands:SetSize( 105, 20 )
5689 BindCommands:SetTextColor( color_white )
5690
5691 for k, v in G.next, snixzz.Binds do
5692
5693 BindCommands:AddChoice( k )
5694
5695 end
5696
5697 BindCommands.Paint = function()
5698
5699 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5700 G.surface.DrawOutlinedRect( 0, 0, BindCommands:GetWide(), BindCommands:GetTall() )
5701
5702 end
5703
5704 local BindKeys = G.vgui.Create( "DComboBox", tabs.config )
5705 BindKeys:SetPos( 5, 185 )
5706 BindKeys:SetSize( 105, 20 )
5707 BindKeys:SetTextColor( color_white )
5708
5709 for k, v in G.next, snixzz.Keys do
5710
5711 BindKeys:AddChoice( v.Name )
5712
5713 end
5714
5715 BindKeys.Paint = function()
5716
5717 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5718 G.surface.DrawOutlinedRect( 0, 0, BindKeys:GetWide(), BindKeys:GetTall() )
5719
5720 end
5721
5722 local RebindKey = G.vgui.Create( "DButton", tabs.config )
5723 RebindKey:SetText( "Bind" )
5724 RebindKey:SetSize( 105, 20 )
5725 RebindKey:SetPos( 5, 210 )
5726 RebindKey:SetTextColor( color_white )
5727 RebindKey.DoClick = function()
5728
5729 local Key = BindKeys:GetValue()
5730 local Command = BindCommands:GetValue()
5731
5732 if ( BindKeys:GetValue() != "" && BindCommands:GetValue() != "" ) then
5733
5734 snixzz.Frame:SetVisible( false )
5735 //snixzz.Changelog:SetVisible( false )
5736 //snixzz.LinksButton:SetVisible( false )
5737 snixzz.MenuOpen = false
5738 snixzz.MenuToggle = false
5739 snixzz.BindKey( Command, Key )
5740 snixzz.Sound()
5741
5742 end
5743
5744 end
5745
5746 RebindKey.Paint = function()
5747
5748 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5749 G.surface.DrawOutlinedRect( 0, 0, RebindKey:GetWide(), RebindKey:GetTall() )
5750
5751 end
5752
5753 local JoinHvH = G.vgui.Create( "DButton", tabs.config )
5754 JoinHvH:SetText( "Join OFFICIAL Hack VS Hack Server" )
5755 JoinHvH:SetSize( 218, 30 )
5756 JoinHvH:SetPos( 5, 235 )
5757 JoinHvH:SetTextColor( color_white )
5758 JoinHvH:SetFont( "snixzz_logo_small" )
5759 JoinHvH.DoClick = function()
5760
5761 Derma_Query(
5762
5763 "Would you like to join Hack VS Hack?", "Join Hack VS Hack",
5764
5765 "Yes", function()
5766
5767 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." )
5768
5769 timer.Simple( 15, function()
5770
5771 G.LocalPlayer():ConCommand( "connect 66.150.164.192:27015" )
5772
5773 end )
5774
5775 end,
5776
5777 "No", function()
5778
5779 snixzz.Chat( Color( 0, 255, 255 ), "Hack VS Hack is a great place to test & configure your cheat or compete against other cheaters!" )
5780
5781 end )
5782
5783 end
5784
5785 JoinHvH.Paint = function()
5786
5787 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5788 G.surface.DrawOutlinedRect( 0, 0, JoinHvH:GetWide(), JoinHvH:GetTall() )
5789
5790 end
5791
5792 snixzz.Changelog = G.vgui.Create( "DButton", tabs.config )
5793 snixzz.Changelog:SetText( "Changelog and News" )
5794 snixzz.Changelog:SetPos( 5, 270 )
5795 snixzz.Changelog:SetSize( 218, 30 )
5796 snixzz.Changelog:SetFont( "snixzz_logo" )
5797 snixzz.Changelog:SetTextColor( color_white )
5798
5799 snixzz.Changelog.DoClick = function()
5800
5801 if !snixzz.CFrame then
5802
5803 snixzz.Sound()
5804 snixzz.CMenu()
5805
5806 end
5807
5808 end
5809 snixzz.Changelog.Paint = function()
5810
5811 //G.draw.RoundedBox( 0, 0, 0, snixzz.Changelog:GetWide(), snixzz.Changelog:GetTall(), Color( 40, 40, 40, 145 ) )
5812 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5813 G.surface.DrawOutlinedRect( 0, 0, snixzz.Changelog:GetWide(), snixzz.Changelog:GetTall() )
5814
5815 end
5816
5817 snixzz.CreateOption( "Checkbox", tabs.config, "Load with GAMEMODE hooks (Buggy, may break parts of gamemode)", "load_unhooked", 5, 375 )
5818
5819end
5820
5821/*
5822
5823 Open Steam Group & Forum once
5824
5825*/
5826
5827/*
5828function snixzz.RequestLinks()
5829
5830 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!",
5831 "Okay!", function()
5832
5833 snixzz.OpenLinksMenu()
5834
5835 end )
5836
5837end
5838
5839function snixzz.OpenLinksMenu()
5840
5841 snixzz.linksMenu = G.vgui.Create( "DFrame" )
5842 snixzz.linksMenu:SetSize( 260, 60 )
5843 snixzz.linksMenu:Center()
5844 snixzz.linksMenu:SetTitle( "Links" )
5845 snixzz.linksMenu:ShowCloseButton( false )
5846 snixzz.linksMenu:MakePopup()
5847 snixzz.linksMenu.Paint = function( self )
5848
5849 G.draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), snixzz.Vars["misc_menucolor2"] )
5850 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
5851 G.surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() )
5852
5853 end
5854
5855 local close = G.vgui.Create( "DButton", snixzz.linksMenu )
5856 close:SetSize( 50, 20 )
5857 close:SetPos( snixzz.linksMenu:GetWide() - 51, 1 )
5858 close:SetText( "x" )
5859 close:SetTextColor( G.Color( 255, 255, 255 ) )
5860 close:SetFont( "Trebuchet18" )
5861
5862 close.Paint = function()
5863
5864 G.draw.RoundedBox( 0, 0, 0, close:GetWide(), close:GetTall(), Color( 168, 62, 62, 255 ) )
5865
5866 end
5867
5868 close.DoClick = function()
5869
5870 snixzz.linksMenu:Close()
5871 snixzz.Sound()
5872 snixzz.linksMenu = nil
5873
5874 end
5875
5876 local website = G.vgui.Create( "DButton", snixzz.linksMenu )
5877 website:SetSize( 120, 30 )
5878 website:SetPos( 5, 25 )
5879 website:SetText( "Forums" )
5880 website:SetTextColor( color_white )
5881
5882 website.Paint = function()
5883
5884 G.surface.SetDrawColor( Color( 230, 30, 30 ) )
5885 G.surface.DrawOutlinedRect( 0, 0, website:GetWide(), website:GetTall() )
5886
5887 end
5888
5889 website.DoClick = function( self )
5890
5891 G.gui.OpenURL( "https://bit.ly/1UiOwAC" )
5892
5893 end
5894
5895 local group = G.vgui.Create( "DButton", snixzz.linksMenu )
5896 group:SetSize( 120, 30 )
5897 group:SetPos( 130, 25 )
5898 group:SetText( "Steam Group" )
5899 group:SetTextColor( color_white )
5900
5901 group.Paint = function()
5902
5903 G.surface.SetDrawColor( Color( 0, 255, 153 ) )
5904 G.surface.DrawOutlinedRect( 0, 0, group:GetWide(), group:GetTall() )
5905
5906 end
5907
5908 group.DoClick = function( self )
5909
5910 G.gui.OpenURL( "https://bit.ly/1VzMroY" )
5911
5912 end
5913
5914end
5915
5916if !G.file.Exists( snixzz.DataFolder .. "/asktojoin.txt", "DATA" ) then
5917
5918 snixzz.RequestLinks()
5919
5920 file.Write( snixzz.DataFolder .. "/asktojoin.txt", "Confirmed, asked to join website/steam group on " .. G.os.date() .. "\n" )
5921
5922end
5923*/
5924
5925/*
5926
5927 Hooking & loading.
5928
5929*/
5930
5931function snixzz.LoadHooks()
5932
5933 snixzz.GMHooks = { -- Return the server's original hooks for selected types
5934
5935 ["CreateMove"] = GAMEMODE.CreateMove,
5936 ["HUDPaint"] = GAMEMODE.HUDPaint,
5937 ["StartChat"] = GAMEMODE.StartChat,
5938 ["FinishChat"] = GAMEMODE.FinishChat,
5939
5940 }
5941
5942 function GAMEMODE:StartChat()
5943
5944 snixzz.Typing = true
5945
5946 return snixzz.GMHooks.StartChat()
5947 end
5948
5949 function GAMEMODE:FinishChat()
5950
5951 snixzz.Typing = false
5952
5953 return snixzz.GMHooks.FinishChat()
5954 end
5955
5956 function GAMEMODE:ShouldDrawLocalPlayer( ply )
5957
5958 return snixzz.Bools["misc_thirdperson"]
5959
5960 end
5961
5962 if snixzz.Bools["load_unhooked"] then
5963
5964 function GAMEMODE:CreateMove( ucmd )
5965
5966 snixzz.CreateMove( ucmd )
5967
5968 return snixzz.GMHooks.CreateMove( ucmd )
5969 end
5970
5971 function GAMEMODE:HUDPaint( self, ... )
5972
5973 snixzz.HUDPaint()
5974
5975 return snixzz.GMHooks.HUDPaint( self, ... )
5976 end
5977
5978 function GAMEMODE:CalcView( ply, origin, angles, fov )
5979
5980 return snixzz.CalcView( ply, origin, angles, fov )
5981
5982 end
5983
5984 function GAMEMODE:Move()
5985
5986 return snixzz.Move()
5987
5988 end
5989
5990 snixzz.AddToConsole( "Hooking functions into the gamemode's hook system." )
5991
5992 else
5993
5994 snixzz.AddHook( "CreateMove", snixzz.CreateMove )
5995 snixzz.AddHook( "HUDPaint", snixzz.HUDPaint )
5996 snixzz.AddHook( "CalcView", snixzz.CalcView )
5997 snixzz.AddHook( "Move", snixzz.Move )
5998
5999 snixzz.AddToConsole( "Loading unsecured hooks. More detectable but more reliable." )
6000
6001 end
6002
6003end
6004
6005function snixzz.PingServer( ply ) -- This was overly complicated & I ended up having to do it a really dumb way for now.
6006
6007 snixzz.AddToConsole( "Attempting to ping snixzz server" )
6008
6009 G.http.Fetch( "http://snixzz.net/cheats/snixzz3/ping.php?steamid=" .. ply:SteamID64(),
6010
6011 function( body )
6012
6013 snixzz.AddToConsole( "snixzz server responded to ping with '" .. body .. "'" )
6014
6015 if body == "Error: Retry" then
6016
6017 snixzz.PingServer( LocalPlayer() )
6018
6019 end
6020
6021 end,
6022
6023 function( error )
6024
6025 snixzz.AddToConsole( "ping received, pinging server again in 250 seconds." )
6026
6027 G.timer.Simple( 250, function()
6028
6029 snixzz.PingServer( LocalPlayer() )
6030
6031 end )
6032
6033 end
6034
6035 )
6036
6037end
6038
6039function snixzz.CreateTimers()
6040
6041 if snixzz.IsTTT then
6042
6043 snixzz.RegisterTimer( 10, 0, snixzz.GetTraitors )
6044
6045 end
6046
6047 /*if snixzz.IsDarkRP then
6048
6049 snixzz.RegisterTimer( 10, 0, snixzz.Namechanger )
6050
6051 else
6052
6053 snixzz.RegisterTimer( G.GetConVarNumber( "sv_namechange_cooldown_seconds" ) + 0.5, 0, snixzz.Namechanger )
6054
6055 end*/
6056
6057 snixzz.RegisterTimer( 1, 0, snixzz.ChatSpam )
6058
6059end
6060
6061function snixzz.LoadAllFunctions()
6062
6063 snixzz.UpdateChangelog()
6064
6065 snixzz.FileSystem()
6066
6067 snixzz.Configs = snixzz.GetConfigs()
6068
6069 if !snixzz.ConfigExists( "default" ) then
6070
6071 snixzz.SaveConfig( "default" )
6072
6073 end
6074
6075 snixzz.UpdateAllConfigs()
6076
6077 snixzz.LoadConfig( snixzz.DefaultConfig, true )
6078
6079 snixzz.AntiCheats()
6080 snixzz.CreateDetours()
6081 snixzz.LoadModules()
6082 snixzz.CreateTimers()
6083 snixzz.LoadHooks()
6084
6085 snixzz.PingServer( LocalPlayer() )
6086
6087end
6088
6089function snixzz.Ban( ply, bantype )
6090
6091 if bantype == "ip" then
6092
6093 snixzz.Chat( Color( 255, 0, 0 ), "You have been IP banned from the snixzz.net services." )
6094
6095 elseif bantype == "id" then
6096
6097 snixzz.Chat( Color( 255, 0, 0 ), "You have been banned from the snixzz.net services." )
6098
6099 end
6100
6101 if snixzz.loadFrame && snixzz.loadProgress then
6102
6103 snixzz.loadProgress:SetFraction( 1 )
6104
6105 snixzz.loadFrame:SetTitle( "Banned." )
6106
6107 snixzz.loadFrame:Close()
6108 snixzz.loadProgress = nil
6109 snixzz.loadFrame = nil
6110
6111 gui.EnableScreenClicker( false )
6112
6113 end
6114
6115
6116 if _G.snixzz then _G.snixzz = nil end
6117
6118end
6119
6120function snixzz.LoadCheat( bool )
6121
6122 if snixzz.loadProgress then
6123
6124 snixzz.loadProgress:SetFraction( 0.4 )
6125 snixzz.loadFrame:SetTitle( "Logged in, sending stats." )
6126
6127 end
6128
6129 if snixzz.Banned then
6130
6131 snixzz.Ban( LocalPlayer(), "id" )
6132
6133 return
6134
6135 end
6136
6137 snixzz.Stats( LocalPlayer(), true, function()
6138
6139 G.chat.AddText( "\n\n\n\n" )
6140
6141 if bool then
6142
6143 snixzz.Chat( Color( 255, 0, 0 ), "Failed to connect to login server, running as guest." )
6144
6145 end
6146
6147 snixzz.logEvent( "Load", "Playing " .. GAMEMODE.Name .. " on " .. GetHostName() )
6148
6149 snixzz.Chat( snixzz.Colors.Green, "Press '" .. G.input.GetKeyName( snixzz.Binds["+menu"] ) .. "' to open the menu & hold TAB+Q to open the console." )
6150
6151 G.chat.AddText(
6152 snixzz.Colors.DarkRed, "[snixzz3] ",
6153 snixzz.Colors.Cyan, "Loaded lua. ",
6154 snixzz.Colors.Purple, snixzz.Info.Version .. ", ",
6155 snixzz.Colors.White, "Last updated ",
6156 snixzz.Colors.Green, snixzz.Info.Updated .. ", ",
6157 Color( 255, 255, 0 ), snixzz.Info.Size .. ", ",
6158 Color( 0, 100, 240 ), snixzz.Info.Lines .. " ",
6159 snixzz.Colors.White, "lines long. ",
6160 snixzz.Colors.Green, "Membership Status: ",
6161 color_white, snixzz.Membership )
6162
6163 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." )
6164
6165 snixzz.Sound()
6166
6167 snixzz.Users = {}
6168
6169 // Some shit
6170 for k, v in G.next, G.player.GetAll() do
6171
6172 if v != G.LocalPlayer() then
6173
6174 if snixzz.IsDev( v ) then
6175
6176 snixzz.Chat( Color( 0, 255, 255 ), "The developer of snixzz3 is on the server! Suck " .. v:Nick() .. "'s cock!" ) -- im a faggot
6177
6178 end
6179
6180 end
6181
6182 end
6183
6184
6185 snixzz.loadProgress:SetFraction( 1 )
6186
6187 snixzz.loadFrame:SetTitle( "Done!" )
6188
6189 G.timer.Simple( 0.5, function()
6190
6191 snixzz.loadFrame:Close()
6192 snixzz.loadProgress = nil
6193 snixzz.loadFrame = nil
6194
6195 gui.EnableScreenClicker( false )
6196
6197 /*if !snixzz.IsVIP() then
6198
6199 snixzz.OpenMOTDgdAd( true ) -- Cheat is loaded after the ad
6200
6201 else
6202 */
6203
6204 snixzz.LoadAllFunctions()
6205
6206 //end
6207
6208 end )
6209
6210 end )
6211
6212end
6213
6214snixzz.Login( LocalPlayer() )