· 7 years ago · Feb 22, 2019, 08:13 AM
1/*
2
3 _________ (_) __________ |__ \
4 / ___/ __ \/ / |/_/_ /_ / __/ /
5 (__ ) / / / /> < / /_/ /_/ __/
6 /____/_/ /_/_/_/|_| /___/___/____/
7 by 0xymoron
8
9
10
11 If you have successfully stolen, cracked, or leaked this; congratulations buddy.
12 I hope it fuels your ego & helps grow your tiny e-penis.
13 The "encryption" was just there to fool people who don't know basic Lua.
14 Don't let OJ get ahold of it, he'll rename it and claim it as his own.
15
16 Yes, there is some borrowed code/methods in here, but not much at all.
17 I reused a bunch of stuff from snixzz1 & that has since been removed, but some still remains.
18
19 !!! You do not have permission to redistribute this. !!!
20 !!! You do not have permission to modify this, use any of this, or manipulate it in any way. !!!
21
22 -----------------
23
24 Credits
25
26 -----------------
27
28 fr1kin <3 - for teaching me Lua in the first place & tons of help along the way.
29 Function - for helping test shit, small fixes, dragon dildos, & bae
30 Styler - for Silent aim method
31 thedynesty2 - for testing & shit
32 OJ - pasting everything he's ever seen & telling people he coded shit until it gets leaked.
33 crdriza - general help & shit
34
35 daz - some stuff
36 & whoever else gave me fancy methods of doing shit
37
38
39 --------------------------
40
41 TODO List & Ideas
42
43 --------------------------
44
45 - *** [Slowly replace userdata shit with _R.Entity]
46 e.g: _R.Entity.GetPos( player ) instead of player:GetPos()
47
48 - [Continue optimizing ESP]
49 Ideas:
50 - Use OnEntityCreated/Removed to shorten needed loops
51 - Only update loop when an entity is created or removed
52 - Separate functions for each feature with "if !bool then return end" instead of "if bool then (doshit) end"
53 - New fonts?
54 - Buy a new fucking graphics card. <-- <-- <-- <-- <--
55
56 - [Get Coder/Code a C++ login & loader] <- implying i'll ever do this
57 - Use SteamID verification, 1 SteamID per customer
58 - IP whitelist on source file
59 - AES? encryption for module
60 - Auto download gmcl_modules or add needed functions to injected .dll
61 - Load before autorun & hide logged location of source.
62 - encrypt lua before running
63 - GarrysMod/ data directory, or SQL.
64
65 ------------------------------
66
67 Interesting functions
68
69 ------------------------------
70
71 gcinfo() - Get Lua memory usage in KB
72 AngRand() - Generates a random pitch, yaw, & roll -90 to 90 & -180 to 180
73 IsUselessModel( mdl ) -
74 JoinServer( ip )
75 HSVToColor( RealTime() * 120 % 360, 1, 1 ) - Rainbow! ~ I forgot who gave me this, but thanks.
76
77*/
78
79local dickheads = {
80 ["STEAM_0:0:103305234"] = true,
81}
82
83if dickheads[_G.debug.getregistry().Player.SteamID( _G.Entity( _G.LocalPlayer():EntIndex() ) )] then g.MsgN( "Blacklisted." ) return end
84
85if _G.snixzz then
86 _G.snixzz = nil
87 MsgC( Color( 255, 0, 0 ), "[snixzz2] Detected an anti-cheat, or snixzz2 was reloaded.\n" )
88end
89
90local snixzz = {}
91snixzz.DataFolder = "advdupe2 - Copy" -- sneaky sneaky :^)
92snixzz.Info = {
93 ["Version"] = "build 1.4.0",
94 ["Updated"] = "9/22/15",
95 ["Size"] = "95kb",
96 ["Lines"] = "3,071",
97}
98
99local G = table.Copy( _G ) -- fuck listing all functions manually, this is quicker.
100local _R = G.debug.getregistry()
101
102snixzz.Detours = {
103 ["net.Start"] = {
104 ["checksaum"] = true,
105 ["checksum"] = true,
106 ["gcontrolled_vars"] = true,
107 ["controlled_vars"] = true,
108 ["quack"] = true,
109 ["leyac_cmd"] = true, -- old but blocks old versions
110 },
111 ["Commands"] = {
112 },
113}
114snixzz["Spoof"] = {
115 ["sv_allowcslua"] = G.GetConVarNumber( "sv_allowcslua" ), // some anti-cheats man..
116 ["sv_cheats"] = 0,
117 ["host_timescale"] = 1,
118 ["host_framerate"] = 0,
119}
120
121// Aimbot vars nd shit
122snixzz.Target = nil
123snixzz.Typing = false
124snixzz.Locked = false
125
126snixzz.Bools = {
127
128 -- Load settings
129 ["load_unhooked"] = false,
130
131 -- Aimbot & view settings
132 ["aim_toggle"] = false,
133 ["aim_autoshoot"] = true,
134 ["aim_antiaim"] = true,
135 ["aim_silent"] = true,
136 ["aim_psilent"] = false,
137 ["aim_anti"] = false,
138 ["aim_nospread"] = true,
139 ["aim_norecoil"] = true,
140 ["aim_prediction"] = true,
141 ["aim_antiantiaim"] = false,
142 ["aim_checkfov"] = false,
143 ["aim_ignorelos"] = false,
144 ["aim_ignoresteam"] = true,
145 ["aim_ignoreadmins"] = false,
146 ["aim_ignorebots"] = false,
147 ["aim_ignoreteam"] = false,
148 ["aim_ignorefriends"] = true,
149
150 -- ESP settings
151 ["esp_enabled"] = true,
152 ["esp_name"] = true,
153 ["esp_health_text"] = true,
154 ["esp_health_bar"] = true,
155 ["esp_chams"] = true,
156 ["esp_chams_weapon"] = true,
157 ["esp_weapon"] = true,
158 ["esp_box"] = true,
159 ["esp_crosshair"] = false,
160 ["esp_crosshair_box"] = false,
161 ["esp_laser"] = true,
162 ["esp_nohands"] = true,
163 ["esp_status"] = true,
164 ["esp_list"] = true,
165 ["esp_snaplines"] = false,
166 ["esp_distance"] = false,
167 ["esp_dynamiclight"] = false,
168 ["esp_wireweapon"] = false,
169 ["esp_aimpos"] = false,
170
171 ["misc_bhop"] = true,
172 ["misc_bhop_autostrafe"] = false,
173 ["misc_namechanger"] = false,
174 ["misc_debug"] = true,
175 ["misc_triggerbot"] = false,
176 ["misc_triggerbot_nospread"] = true,
177 ["misc_fakelag"] = false,
178 ["misc_thirdperson"] = false,
179
180}
181
182snixzz.Vars = {
183
184 -- Aimbot Vars
185 ["aim_distance"] = 2147483647,
186 ["aim_fov"] = 180,
187 ["aim_offset"] = 0,
188 ["aim_method"] = "Hitbox",
189 ["aim_anti_method"] = "Classic",
190 ["aim_hitbox"] = "Head",
191 ["aim_bone"] = "Head",
192 ["aim_target_method"] = "Distance",
193 ["aim_prediction_method"] = "Engine Vlocity",
194 ["aim_anti_spin_speed"] = 10,
195
196 -- ESP Vars
197 ["esp_distance"] = 3000,
198 ["esp_chams_material"] = "Solid",
199 ["esp_asus_alpha"] = 0.95,
200 ["esp_box_width"] = 1.5,
201 ["esp_fov"] = 90,
202 ["esp_laser_attachment"] = "Iron Sights",
203
204 -- Misc Vars
205 ["speedhack_speed"] = 3.5,
206 ["speedhack_type"] = "pSpeed",
207
208 ["misc_triggerbot_method"] = "Hitbox",
209 ["misc_menucolor"] = Color( 0, 188, 255, 75 ),
210 ["misc_menucolor2"] = Color( 255, 0, 0, 90 ),
211 ["misc_lasercolor"] = Color( 255, 0, 0, 255 ),
212 ["misc_thirdperson_distance"] = 90,
213 ["misc_fakelag_rate"] = 9,
214
215}
216
217snixzz.Binds = {
218 ["+aimbot"] = KEY_F,
219 ["+menu"] = KEY_INSERT,
220 ["+speedhack"] = KEY_B,
221 ["+triggerbot"] = KEY_G,
222}
223
224snixzz.Entities = {}
225snixzz.Friends = {}
226snixzz.BadEntities = {
227 ["env_sprite"] = true,
228 ["player"] = true,
229 ["prop_physics"] = true,
230 ["prop_door_rotating"] = true,
231 ["prop_dynamic"] = true,
232 ["viewmodel"] = true,
233 ["weapon_physgun"] = true,
234 ["weapon_physcannon"] = true,
235 ["keys"] = true,
236 ["pocket"] = true,
237 ["gmod_tool"] = true,
238 ["physgun_beam"] = true,
239 ["func_door_rotating"] = true,
240 ["func_breakable_surf"] = true,
241 ["worldspawn"] = true,
242}
243
244snixzz.Keys = {
245 [1] = { Name = "A", Key = KEY_A },
246 [2] = { Name = "B", Key = KEY_B },
247 [3] = { Name = "C", Key = KEY_C },
248 [4] = { Name = "D", Key = KEY_D },
249 [5] = { Name = "E", Key = KEY_E },
250 [6] = { Name = "F", Key = KEY_F },
251 [7] = { Name = "G", Key = KEY_G },
252 [8] = { Name = "H", Key = KEY_H },
253 [9] = { Name = "I", Key = KEY_I },
254 [10] = { Name = "J", Key = KEY_J },
255 [11] = { Name = "K", Key = KEY_K },
256 [12] = { Name = "L", Key = KEY_L },
257 [13] = { Name = "M", Key = KEY_M },
258 [14] = { Name = "N", Key = KEY_N },
259 [15] = { Name = "O", Key = KEY_O },
260 [16] = { Name = "P", Key = KEY_P },
261 [17] = { Name = "Q", Key = KEY_Q },
262 [18] = { Name = "R", Key = KEY_R },
263 [19] = { Name = "S", Key = KEY_S },
264 [20] = { Name = "T", Key = KEY_T },
265 [21] = { Name = "U", Key = KEY_U },
266 [22] = { Name = "V", Key = KEY_V },
267 [23] = { Name = "W", Key = KEY_W },
268 [24] = { Name = "X", Key = KEY_X },
269 [25] = { Name = "Y", Key = KEY_Y },
270 [26] = { Name = "Z", Key = KEY_Z },
271 [27] = { Name = "SPACE", Key = KEY_SPACE },
272 [28] = { Name = "TAB", Key = KEY_TAB },
273 [29] = { Name = "Left Shift", Key = KEY_LSHIFT },
274 [30] = { Name = "Right Shift", Key = KEY_RSHIFT },
275 [31] = { Name = "Left Alt", Key = KEY_LALT },
276 [32] = { Name = "Right Alt", Key = KEY_RALT },
277 [33] = { Name = "Delete", Key = KEY_DELETE },
278 [34] = { Name = ".", Key = KEY_PERIOD },
279 [35] = { Name = "/", Key = KEY_SLASH },
280 [36] = { Name = "[", Key = KEY_LBRACKET },
281 [37] = { Name = ";", Key = KEY_SEMICOLON },
282 [38] = { Name = "'", Key = KEY_APOSTROPHE },
283 [39] = { Name = ",", Key = KEY_COMMA },
284 [40] = { Name = "Insert", Key = KEY_INSERT },
285}
286
287snixzz.DefaultConfig = G.file.Read( snixzz.DataFolder .. "/defaultconfig.txt", "DATA" ) or "default"
288
289// nospread shit
290snixzz.RecoilBackup = {}
291
292snixzz.BadWeapons = {
293 ["gmod_tool"] = true,
294 ["gmod_camera"] = true,
295 ["weapon_physgun"] = true,
296 ["weapon_crowbar"] = true,
297 ["keys"] = true,
298 ["pocket"] = true,
299}
300
301snixzz["Colors"] = {
302 ["White"] = Color( 255, 255, 255, 255 ),
303 ["Black"] = Color( 0, 0, 0, 255 ),
304 ["Green"] = Color( 0, 255, 0, 255 ),
305 ["Red"] = Color( 255, 0, 0, 255 ),
306 ["DarkRed"] = Color( 200, 50, 50, 255 ),
307 ["Cyan"] = Color( 0, 255, 255, 255 ),
308 ["Purple"] = Color( 255, 0, 255 ),
309}
310
311snixzz.AdminGroups = {
312 ["trialmod"] = true,
313 ["tmod"] = true,
314 ["trial-mod"] = true,
315 ["trialmoderator"] = true,
316 ["t-mod"] = true,
317 ["mod"] = true,
318 ["moderator"] = true,
319 ["operator"] = true,
320 ["vipmod"] = true,
321 ["vipmoderator"] = true,
322 ["admin"] = true,
323 ["vipadmin"] = true,
324 ["head-admin"] = true,
325 ["headadmin"] = true,
326 ["manager"] = true,
327 ["developer"] = true,
328 ["dev"] = true,
329 ["superadmin"] = true,
330 ["sadmin"] = true,
331 ["super"] = true,
332 ["vipsuperadmin"] = true, -- i cry
333 ["owner"] = true,
334 ["root_user"] = true,
335 ["vipowner"] = true, -- wouldn't be surprised it
336 ["doubleadmin"] = true, -- what the fuck is this
337}
338
339G.surface.CreateFont( "snixzz_status", { font = "coolvetica", size = 20, antialias = true } ) -- HudHintTextLarge
340G.surface.CreateFont( "snixzz_logo", { size = 25, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
341G.surface.CreateFont( "snixzz_logo_small", { size = 13, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
342G.surface.CreateFont( "ESPFont", { size = 14, weight = 200, antialias = false, shadow = true, font = "Arial" } )
343
344/* General notification/display functions */
345
346local sound
347function snixzz.Sound( Error )
348 if Error then
349 sound = G.Sound( "/HL1/fvox/buzz.wav" )
350 else
351 sound = G.Sound( "/buttons/button17.wav" )
352 end
353 local createSound = G.CreateSound( G.LocalPlayer(), sound )
354 createSound:Play()
355end
356
357function snixzz.Message( col, text )
358 G.MsgC( snixzz.Colors.Cyan, "[snixzz2]: " )
359 G.MsgC( col, text .. "\n" )
360end
361
362function snixzz.ACNotify( text )
363 G.MsgC( snixzz.Colors.White, "[snixzz2]: " )
364 G.MsgC( snixzz.Colors.Red, text .. "\n" )
365 snixzz.logEvent( "anticheat", text )
366 snixzz.Sound( Error )
367end
368
369function snixzz.Debug( text )
370 if snixzz.Bools["misc_debug"] then
371 G.MsgC( snixzz.Colors.Purple, "[snixzz2Debug]: " )
372 G.MsgC( Color( 255, 255, 255 ), text .. "\n" )
373 end
374 snixzz.logEvent( "Debug", text )
375end
376
377function snixzz.LogDetour( text )
378 if snixzz.Bools["misc_debug"] then
379 G.MsgC( snixzz.Colors.White, "[snixzz2Detour]: " )
380 G.MsgC( Color( 255, 255, 255 ), text .. "\n" )
381 end
382 snixzz.logEvent( "Detour", text )
383end
384
385/* Detour function */
386function snixzz.Detour( Old, New )
387 snixzz.Detours[New] = Old
388 snixzz.Message( Color( 200, 150, 255 ), "Detouring function " .. G.tostring( Old ) .. "." )
389 snixzz.logEvent( "Load", "Detouring function " .. G.tostring( Old ) .. "." )
390 return New
391end
392
393-- Load the modules
394G.require( "bsendpacket" ) bSendPacket = true
395G.require( "snixzz2" )
396G.require( "pspeed" )
397G.require( "name_enabler" )
398
399-- C++ Module functions
400snixzz.Functions = {
401
402 -- gmcl_frozen
403 ["PredictSpread"] = _G.NHTable.ZeroSpread,
404 ["SetMuted"] = _G.NHTable.SetMuted,
405 ["LocalPlayer"] = _G.NHTable.SetLPIndex,
406 ["SetCvarName"] = _G.NHTable.SetCvarName,
407 ["ConCommand"] = _G.NHTable.ClientCMD,
408 ["IsMuted"] = _G.NHTable.IsMuted,
409 ["NoDraw"] = _G.NHTable.NoDraw,
410 ["RawGet"] = _G.NHTable.RawGet,
411 ["SetViewAngles"] = _G.NHTable.SetViewAngles,
412 ["AsusWalls"] = _G.NHTable.AsusWalls,
413 ["GetCvar"] = _G.NHTable.GetCvar,
414 ["IsDormant"] = _G.NHTable.IsDormant,
415 ["GetServerIP"] = _G.NHTable.GetServerIP,
416 ["Changename"] = _G.NHTable.Changename,
417 ["IsVisible"] = _G.NHTable.IsVisible,
418 ["SetCvarValue"] = _G.NHTable.SetCvarValue,
419
420 -- gmcl_pspeed
421 ["SetSpeed"] = _G.SetSpeed,
422
423}
424
425snixzz.ACStatus = {
426 ["CAC"] = "DETECTED",
427 ["LeyAC"] = "DETECTED",
428 ["TAC v4"] = "UNDETECTED",
429 ["HERP-AC"] = "BYPASSED",
430 ["TAC v2"] = "BYPASSED",
431 ["QAC"] = "BYPASSED",
432 ["VAC"] = "UNDETECTED", -- Shut up, it does exist. it's a tiny blacklist.
433 ["GAC"] = "UNDETECTED",
434 ["Kevlar"] = "UNDETECTED",
435 ["Daz's AC"] = "UNDETECTED",
436 ["GModZ AC"] = "UNDETECTED",
437 ["VBAC"] = "UNDETECTED",
438}
439
440/*
441 Logging system
442*/
443snixzz.LogCache = {}
444snixzz.ConsoleLogs = {}
445snixzz.LastLog = 0
446snixzz.MaxLogs = 15
447snixzz.NoLog = { -- Types of logs to not save in data/
448 ["Setting"] = true,
449 ["Load"] = true,
450 ["Detours"] = true,
451 ["Config"] = true,
452 ["Info"] = true,
453 ["debug"] = true,
454 ["Timer"] = true,
455 ["Hook"] = true,
456 ["Main"] = true,
457}
458
459snixzz.Lines = {}
460function snixzz.logEvent( Type, str )
461
462 G.table.insert( snixzz.Lines, str )
463 if snixzz.Console then
464 snixzz.Console:AddLine( str )
465 end
466
467 snixzz.LogCache[Type] = str
468
469 snixzz.ConsoleLogs[snixzz.LastLog + 1] = str
470 snixzz.LastLog = snixzz.LastLog + 1
471
472 if snixzz.LastLog == snixzz.MaxLogs then
473 snixzz.ConsoleLogs = {}
474 snixzz.LastLog = 0
475 end
476
477 if !snixzz.NoLog[Type] then
478 local logFile = "[" .. G.os.date() .. "] " .. str .. "\n"
479 G.file.Append( snixzz.DataFolder .. "/logs/" .. Type .. ".txt", logFile )
480 end
481end
482
483/* Anti-Cheat bypass functions */
484-- This is all really outdated. TODO: Update thhis
485snixzz.Backup = {}
486function snixzz.AntiCheats()
487
488 -- Notify of detoured functions i guess
489 for k, v in G.pairs( snixzz.Functions ) do
490 snixzz.Message( Color( 200, 255, 0 ), "Copied function " .. G.tostring( v ) .. " '" .. k .. "'" )
491 v = nil
492 end
493
494 -- HERP-AC c+p shitty ac
495 if _G.CheckVars then
496 snixzz.ACNoitfy( "function CheckVars exists, detouring the scan." )
497 _G.CheckVars = snixzz.Detour( _G.CheckVars, function()
498 snixzz.Message( Color( 50, 255, 50 ), "HERP-AC attempted to scan cvars, stopping that..." )
499 end )
500 end
501
502 -- Tyler's Anti-Cheat v2 (shameless bypass of my own anti-cheat)
503 if _G.RunCheck then
504 snixzz.ACNoitfy( "function RunCheck exists, detouring." )
505 _G.RunCheck = snixzz.Detour( _G.RunCheck, function()
506 snixzz.Message( Color( 50, 255, 50 ), "TAC attempted to run a check, returning no information." )
507 end )
508 end
509
510 -- Prestige Gaming CAC
511 if _G.CAC then
512 snixzz.ACNoitfy( "table CAC exists, bypassing anti-cheat." )
513 function CAC:FilePlayer() snixzz.ACNoitfy( "CAC:FilePlayer() Attempted to run" ) end
514 G.timer.Destroy( "CAC" )
515 end
516
517 -- Some shitty PERP anti-cheat
518 G.concommand.Remove( "0_u_found" )
519 G.concommand.Add( "0_u_found", function()
520 snixzz.ACNoitfy( "anti-cheat concommand 0_u_found blocked" )
521 end )
522 G.hook.Remove( "InitPostEntity", "detrp" )
523
524 -- Anti-cheat current detection status
525 for k, v in G.pairs( snixzz.ACStatus ) do
526 G.MsgC( Color( 255, 150, 0 ), "[snixzz2] " )
527 G.MsgC( Color( 255, 255, 255 ), k .. ": " )
528 if v == "DETECTED" then
529 G.MsgC( Color( 255, 0, 0 ), v .. "\n" )
530 elseif v == "BYPASSED" then
531 G.MsgC( Color( 255, 255, 0 ), v .. "\n" )
532 elseif v == "UNDETECTED" then
533 G.MsgC( Color( 0, 255, 0 ), v .. "\n" )
534 end
535 end
536
537 G.hook.Remove( "OnGamemodeLoaded", "___scan_g_init" )
538 G.hook.GetTable()["OnGamemodeLoaded"]["___scan_g_init"] = function() end
539
540end
541snixzz.AntiCheats()
542
543-- TODO: Add runstring section to menu
544local compiledString
545function snixzz.RunString( str )
546
547 compiledString = G.CompileString( str, "[C]", false )
548
549 if G.type( compiledString ) == "string" then
550 snixzz.Message( Color( 0, 255, 255 ), "Failed to run Lua. '" .. str .. "'" )
551 return
552 end
553
554 compiledString()
555
556end
557
558local Name
559snixzz.Hooks = {}
560function snixzz.AddHook( Type, Func )
561 Name = G.tostring( Func )
562 snixzz.Message( Color( 255, 255, 0 ), "Adding unsecure hook '" .. Name .. "'" )
563 snixzz.Hooks[Type] = Name
564 return G.hook.Add( Type, Name, Func )
565end
566
567snixzz.TimerCache = {}
568function snixzz.RegisterTimer( delay, rep, func )
569 Name = G.tostring( func )
570 snixzz.Message( Color( 125, 0, 282 ), "Adding timer " .. Name .. " with delay '" .. Name .. "'" )
571 snixzz.logEvent( "Load", "Adding timer " .. Name .. " with delay '" .. Name .. "'" )
572 G.table.insert( snixzz.TimerCache, Name )
573 return G.timer.Create( Name, delay, rep, func )
574end
575
576function snixzz.ForceCvar( cvar, value ) -- removed until further notice
577 if snixzz.Spoof[cvar] == nil then
578 snixzz.Spoof[cvar] = G.GetConVarNumber( cvar )
579 end
580 --G.GetConVar( cvar ):SetValue( value )
581end
582
583/*
584
585 Settings & Menu backend.
586 Config system recycled from hake v2
587 Re-wrote a bit of it.
588
589*/
590
591function snixzz.CreateOption( dtype, parent, oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec, func )
592 local addx, addy = 3, 3.5
593
594 if dtype == "Checkbox" then
595 dtype = "DCheckBoxLabel"
596 local text, bool, x, y = oText, oBool, xPos, yPos
597 local checkbox = G****ui.Create( dtype, parent )
598 checkbox:SetText( text )
599 checkbox:SetPos( x + addx, y + addy )
600 checkbox:SizeToContents()
601 checkbox:SetTextColor( G.color_white )
602 checkbox:SetChecked( snixzz.Bools[bool] )
603 checkbox.OnChange = function( check )
604 snixzz.Bools[bool] = checkbox:GetChecked()
605 end
606
607 elseif dtype == "Slider" then
608 dtype = "DNumSlider"
609 local text, var, min, max, wide, x, y, Dec = oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec
610 local slider = G****ui.Create( dtype, parent )
611 slider:SetPos( x + addx, y + addy )
612 slider:SetWide( wide )
613 slider:SetText( text )
614 slider:SetMin( min )
615 slider:SetMax( max )
616 slider:SetDecimals( Dec )
617 slider:SetValue( snixzz.Vars[var] )
618 slider.OnValueChanged = function( p, v )
619 snixzz.Vars[var] = v
620 end
621
622 elseif dtype == "Label" then
623 dtype = "DLabel"
624 local text, x, y = oText, oBool, xPos
625 local label = G****ui.Create( dtype, parent )
626 label:SetPos( x, y )
627 label:SetText( text )
628 label:SizeToContents()
629 label:SetTextColor( G.color_white )
630
631 end
632end
633
634function snixzz.ConfigExists( cfg )
635 if G.file.Exists( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) then
636 return true
637 else
638 return false
639 end
640end
641
642function snixzz.SaveConfig( cfg )
643 local save = {}
644 save.Vars = snixzz.Vars
645 save.Bools = snixzz.Bools
646 save.Binds = snixzz.Binds
647 save.Entities = snixzz.Entities
648 save.Friends = snixzz.Friends
649 cfg = G.string.gsub( cfg, " ", "_" )
650 if !snixzz.ConfigExists( cfg ) then
651 G.table.insert( snixzz.Configs, cfg )
652 G.file.Write( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
653 snixzz.Message( snixzz.Colors.Green, "Created config " .. cfg .. "!" )
654 snixzz.logEvent( "Config", "Created config '" .. cfg .. "'" )
655 else
656 snixzz.Message( snixzz.Colors.Red, "Config " .. cfg .. " already exists!" )
657 snixzz.logEvent( "Config", "Config " .. cfg .. " already exists" )
658 end
659end
660
661function snixzz.UpdateConfig()
662 local cfg = snixzz.CurrentConfig
663 if cfg != "default" then
664 if snixzz.ConfigExists( cfg ) then
665 local save = {}
666 save.Vars = snixzz.Vars
667 save.Bools = snixzz.Bools
668 save.Binds = snixzz.Binds
669 save.Entities = snixzz.Entities
670 save.Friends = snixzz.Friends
671 G.file.Write( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
672 snixzz.Message( snixzz.Colors.Green, "Updated '" .. cfg .. "' with current settings" )
673 snixzz.logEvent( "Config", "Updated '" .. cfg .. "' with current settings" )
674 else
675 snixzz.Message( snixzz.Colors.Red, "Config " .. cfg .. " wasn't found!" )
676 snixzz.logEvent( "Config", "Config '" .. cfg .. "' wasn't found" )
677 end
678 else
679 snixzz.Message( snixzz.Colors.Red, "You can't modify 'default' config!" )
680 snixzz.logEvent( "Config", "You can't modify 'default' config!" )
681 end
682end
683
684function snixzz.LoadConfig( cfg )
685 cfg = G.string.lower( cfg )
686 if snixzz.CurrentConfig != cfg then
687 if snixzz.ConfigExists( cfg ) then
688 local ToRead = G.util.JSONToTable( G.file.Read( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) )
689 snixzz.Vars = ToRead.Vars
690 snixzz.Bools = ToRead.Bools
691 snixzz.Binds = ToRead.Binds
692 snixzz.Entities = ToRead.Entities
693 snixzz.Friends = ToRead.Friends
694 snixzz.CurrentConfig = cfg
695 snixzz.Message( snixzz.Colors.Green, "Loaded config '" .. cfg .. "'" )
696 snixzz.logEvent( "Config", "Loaded config '" .. cfg .."'" )
697 else
698 snixzz.LoadConfig( "default" )
699 snixzz.CurrentConfig = "default"
700 snixzz.Message( Color( 255, 0, 0 ), "Invalid config file! '" .. cfg .. "' Loading default!" )
701 snixzz.logEvent( "Config", "Invalid config file '" .. cfg .."' Loading default!" )
702 end
703 else
704 snixzz.Message( snixzz.Colors["White"], "Config " .. cfg .. " is already loaded!" )
705 snixzz.logEvent( "Config", "Config '" .. cfg .."' is already loaded." )
706 end
707end
708
709function snixzz.DeleteConfig( cfg )
710 cfg = G.string.lower( cfg )
711 if cfg != snixzz.DefaultConfig then
712 if G.file.Exists( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) then
713 G.file.Delete( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. cfg .. ".txt" )
714 snixzz.Message( snixzz.Colors["DarkRed"], "Deleted config " .. cfg )
715 snixzz.logEvent( "Config", "Deleted config '" .. cfg .. "'" )
716 else
717 snixzz.Message( Color( 255, 0, 0 ), "Unable to find config " .. cfg "!" )
718 snixzz.logEvent( "Config", "Unable to find config '" .. cfg .."'" )
719 end
720 else
721 snixzz.Message( snixzz.Colors["Red"], "You cannot delete the default config!" )
722 snixzz.logEvent( "Config", "You cannot delete the default config" )
723 end
724end
725
726function snixzz.RenameConfig( Old, New )
727 New = G.string.gsub( New, " ", "_" )
728 New = G.string.lower( New )
729 if Old != snixzz.DefaultConfig then
730 if !snixzz.ConfigExists( New ) then
731 local OldConfig = G.file.Read( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. Old .. ".txt", "DATA" )
732 if snixzz.ConfigExists( Old ) then
733 G.file.Delete( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. Old .. ".txt", "DATA" )
734 end
735 G.file.Write( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/" .. New .. ".txt", OldConfig )
736 snixzz.Message( snixzz.Colors["DarkRed"], "Renamed " .. Old .. " to " .. New .. "." )
737 snixzz.logEvent( "Config", "Renamed config '" .. Old .. "' to '" .. New .. "'" )
738 else
739 snixzz.Message( Color( 255, 0, 0 ), "Config " .. New .. " already exists! Pick a different name." )
740 snixzz.logEvent( "Config", "Config '" .. New .. "' already exists, pick a different name" )
741 end
742 else
743 snixzz.Message( snixzz.Colors["Red"], "You cannot rename the default config!" )
744 snixzz.logEvent( "Config", "You cannot rename the default config" )
745 end
746end
747
748function snixzz.SetDefaultConfig( cfg )
749 if cfg != snixzz.DefaultConfig then
750 if snixzz.ConfigExists( cfg ) then
751 snixzz.DefaultConfig = cfg
752 G.file.Write( snixzz.DataFolder .. "/defaultconfig.txt", snixzz.DefaultConfig )
753 snixzz.Message( Color( 255, 255, 0 ), "Set '" .. cfg .. "' as the default config." )
754 snixzz.logEvent( "Config", "Set '" .. cfg .. "' as the default config" )
755 else
756 snixzz.Message( Color( 255, 0, 0 ), "'" .. cfg .. "' is not a valid config!" )
757 snixzz.logEvent( "Config", "Config '" .. cfg .. "' is not a valid config" )
758 end
759 else
760 snixzz.Message( Color( 255, 0, 0 ), "'" .. cfg .. "' is already the default config!" )
761 snixzz.logEvent( "Config", "Config '" .. cfg .."' is already the default config" )
762 end
763end
764
765function snixzz.BindKey( Bind, Key )
766 if snixzz.Binds[Bind] then
767 for _, v in G.pairs( snixzz.Keys ) do
768 if Key == v.Name then
769 snixzz.Binds[ Bind ] = v.Key
770 snixzz.Message( snixzz.Colors["Green"], "Bound " .. Bind .. " to " .. Key .. "!" )
771 snixzz.logEvent( "Config", "Bound '" .. Bind .. "' to '" .. Key .. "'" )
772 end
773 end
774 end
775end
776
777function snixzz.Unbind( Bind )
778 if snixzz.Binds[ Bind ] then
779 snixzz.Binds[ Bind ] = nil
780 snixzz.Message( snixzz.Colors["DarkRed"], "Unbound " .. Bind .. "!" )
781 snixzz.logEvent( "Config", "Unbound '" .. Bind .. "'" )
782 end
783end
784
785function snixzz.GetConfigs()
786 local files = G.file.Find( snixzz.DataFolder .. "/configs/" .. snixzz.Info.Version .. "/*.txt", "DATA")
787 for k, v in G.pairs( files ) do
788 files[ k ] = G.string.Replace( v, ".txt", "" )
789 end
790 return files
791end
792snixzz.Configs = snixzz.GetConfigs()
793
794/*
795
796 filesystem
797
798*/
799
800snixzz.DataFiles = {
801 "defaultconfig.txt",
802 "logs/Main.txt",
803 "logs/AntiCheat.txt",
804 "logs/Detour.txt",
805 "logs/Debug.txt",
806}
807snixzz.DataFolders = {
808 "configs",
809 "configs/" .. snixzz.Info.Version,
810 "logs",
811}
812
813function snixzz.FileSystem()
814
815 if !G.file.IsDir( snixzz.DataFolder, "DATA" ) then
816 G.file.CreateDir( snixzz.DataFolder )
817 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "' main data folder." )
818 end
819
820 for k, v in G.next, snixzz.DataFolders do
821 if !G.file.IsDir( snixzz.DataFolder .. "/" .. v, "DATA" ) then
822 G.file.CreateDir( snixzz.DataFolder .. "/" .. v )
823 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "/" .. v .. "' data folder." )
824 end
825 end
826
827 for k, v in G.next, snixzz.DataFiles do
828 if !G.file.Exists( snixzz.DataFolder .. "/" .. v, "DATA" ) then
829 if v == "defaultconfig.txt" then
830 G.file.Write( snixzz.DataFolder .. "/" .. v, snixzz.DefaultConfig )
831 else
832 G.file.Write( snixzz.DataFolder .. "/" .. v, "=== snixzz2 by 0xymoron ===\n\n" )
833 end
834 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "/" .. v .. "' data file." )
835 end
836 end
837
838 if !snixzz.ConfigExists( "default" ) then
839 snixzz.SaveConfig( "default" )
840 end
841end
842snixzz.Message( Color( 255, 255, 0 ), "Loading filesystem.." )
843snixzz.FileSystem()
844
845/*
846 ESP functions
847*/
848
849-- borrowed from snipwnage2's cheat with permission
850function snixzz.GetBounds( v )
851
852 local eyePos = v:EyeAngles()
853 local min = v:OBBMins()
854 local max = v:OBBMaxs()
855
856 local corners = {
857 G.Vector( min.x, min.y, min.z ),
858 G.Vector( min.x, min.y, max.z ),
859 G.Vector( min.x, max.y, min.z ),
860 G.Vector( min.x, max.y, max.z ),
861 G.Vector( max.x, min.y, min.z ),
862 G.Vector( max.x, min.y, max.z ),
863 G.Vector( max.x, max.y, min.z ),
864 G.Vector( max.x, max.y, max.z ),
865 }
866
867 local minx = G.math.huge
868 local miny = G.math.huge
869 local maxx = -G.math.huge
870 local maxy = -G.math.huge
871
872 for _, corner in G.next, corners do
873 local screen = v:LocalToWorld( corner ):ToScreen()
874 minx = G.math.min( minx, screen.x )
875 miny = G.math.min( miny, screen.y )
876 maxx = G.math.max( maxx, screen.x )
877 maxy = G.math.max( maxy, screen.y )
878 end
879
880 return minx, miny, maxx, maxy
881end
882
883-- Thanks gmod wiki!
884function snixzz.DrawOutlinedBox( x, y, w, h, thickness, color )
885 G.surface.SetDrawColor( color )
886 for i = 0, thickness - 1 do
887 G.surface.DrawOutlinedRect( x + i, y + i, w - i * 2, h - i * 2 )
888 end
889end
890
891function snixzz.IsAdmin( v )
892
893 if v:IsAdmin() then
894 return true
895 end
896
897 if snixzz.AdminGroups[v:GetUserGroup()] then
898 return true
899 end
900
901end
902
903function snixzz.ShouldDraw( v )
904
905 // better fps maybe
906 local distance = v:GetPos():Distance( G.LocalPlayer():GetPos() )
907 if snixzz.Vars["esp_distance"] != 0 && distance >= snixzz.Vars["esp_distance"] then
908 return false
909 end
910
911 if !v:IsPlayer() or !v:Alive() or v == G["LocalPlayer"]() then
912 return false
913 end
914
915 if ( v:Team() == TEAM_SPECTATOR or G.string.find( G.team.GetName( v:Team() ), "spectator" ) ) then
916 return false
917 end
918
919 if snixzz.Functions.IsDormant( v:EntIndex() ) then
920 return false
921 end
922
923 return true
924end
925
926/********************/
927/* */
928/* Aimbot functions */
929/* */
930/********************/
931
932
933function snixzz.IsValid( v )
934
935 if !G.IsValid( v ) or v == G.LocalPlayer() or !v:IsPlayer() then
936 return false
937 end
938
939 // visible check
940 if !snixzz.Bools["aim_ignorelos"] then
941 if !snixzz.IsVisible( v ) then
942 return false
943 end
944 end
945
946 if snixzz.Bools["aim_checkfov"] then
947 if !snixzz.InFov( v ) then
948 return false
949 end
950 end
951
952 if snixzz.Bools["aim_ignoreadmins"] then
953 if snixzz.IsAdmin( v ) then
954 return false
955 end
956 end
957
958 if snixzz.Bools["aim_ignorefriends"] then
959 if snixzz.Friends[v:Nick()] then
960 return false
961 end
962 end
963
964 if snixzz["IsDormant"]( v:EntIndex() ) then
965 return false
966 end
967
968 if snixzz.Bools["aim_ignorebots"] && v:IsBot() then
969 return false
970 end
971
972 if ( !v:Alive() || !v:IsPlayer() || v:InVehicle() ) then
973 return false
974 end
975
976 if ( G.GetConVarNumber( "sbox_noclip" ) == 0 && v:GetMoveType() == MOVETYPE_NOCLIP ) then
977 return false
978 end
979
980 -- Ignore Steam friends
981 if snixzz.Bools["aim_ignoresteam"] then
982 if v:GetFriendStatus() == "friend" then
983 return false
984 end
985 end
986
987 -- Friendly Fire
988 if snixzz.Bools["aim_ignoreteam"] then
989 if ( v:Team() == G.LocalPlayer():Team() ) then
990 return false
991 end
992 end
993
994 if ( v:GetMoveType() == MOVETYPE_OBSERVER || v:Team() == TEAM_SPECTATOR ) then
995 return false
996 end
997
998 // ignore T buddies
999 if G.string.find( G.GAMEMODE.Name, "Trouble in Terror" ) then
1000 if ( G.LocalPlayer():IsTraitor() && v:IsTraitor() ) then
1001 return false
1002 end
1003 end
1004
1005 // spawn protection (multiple server detection methods)
1006 local col = v:GetColor()
1007 if col.a < 255 then
1008 return false
1009 end
1010 if G.LocalPlayer():GetColor().a < 255 then
1011 return false
1012 end
1013
1014 // gun game server
1015 if v:GetMaterial() == "models/props_combine/stasisshield_sheet" then
1016 return false
1017 end
1018
1019 return true
1020end
1021
1022
1023snixzz.Cones = {
1024 ["HL2"] = {
1025 ["weapon_pistol"] = G.Vector( 0.01, 0.01, 0.01 ),
1026 ["weapon_smg1"] = G.Vector( 0.04362, 0.04362, 0.04362 ),
1027 ["weapon_ar2"] = G.Vector( 0.02618, 0.02618, 0.02618 ),
1028 ["weapon_shotgun"] = G.Vector( 0.08716, 0.08716, 0.08716 ),
1029 },
1030 ["Normal"] = {}
1031}
1032
1033snixzz.SimpleSpread = {
1034 ["weapon_cs_base"] = true,
1035 ["weapon_zs_base"] = true,
1036}
1037local wepCone
1038function snixzz.GetCone( wep )
1039
1040 if !G.IsValid( wep ) then
1041 return 0
1042 end
1043
1044 if snixzz.Cones.Normal[wep:GetClass()] then
1045 return snixzz.Cones.Normal[wep:GetClass()]
1046
1047 elseif snixzz.SimpleSpread[wep.Base] then
1048 return wep.Cone or wep.Primary.Cone or 0
1049
1050 elseif snixzz.Cones.HL2[wep:GetClass()] then
1051 return snixzz.Cones.HL2[wep:GetClass()]
1052
1053 else
1054 wepCone = wep.Cone
1055 if !wepCone then
1056 wepCone = wep.Primary && wep.Primary.Cone or 0
1057 end
1058 end
1059
1060 return wepCone or 0
1061
1062end
1063
1064local spreadCone = G.Vector( 0, 0, 0 )
1065local getCone = G.Vector( 0, 0, 0 )
1066function snixzz.PredictSpread( cmd, ang )
1067 local wep = G.LocalPlayer():GetActiveWeapon() or NULL
1068
1069 if !G.IsValid( wep ) then
1070 return ang
1071 end
1072
1073 if G.type( wep.Initialize ) == "function" then
1074 getCone = snixzz.GetCone( wep )
1075
1076 if G.type( getCone ) == "number" then
1077 spreadCone = G.Vector( -getCone, -getCone, -getCone )
1078 elseif G.type( getCone ) == "Vector" then
1079 spreadCone = getCone * -1
1080 end
1081 else
1082 if snixzz.Cones.HL2[wep:GetClass()] then
1083 spreadCone = snixzz.Cones.HL2[wep:GetClass()]
1084 end
1085 end
1086
1087 return snixzz.Functions.PredictSpread( cmd, ang, spreadCone )
1088end
1089
1090snixzz.PunchWeps = {
1091 ["weapon_pistol"] = true,
1092 ["weapon_smg1"] = true,
1093 ["weapon_ar2"] = true,
1094 ["weapon_shotgun"] = true,
1095}
1096
1097local wep
1098local punchAngle
1099function snixzz.CorrectRecoil( ucmd )
1100 wep = G.LocalPlayer():GetActiveWeapon()
1101
1102 if G.IsValid( wep ) then
1103 if snixzz.PunchWeps[wep:GetClass()] then
1104 punchAngle = ucmd:GetViewAngles() - G.LocalPlayer():GetPunchAngle()
1105 snixzz.Functions.SetViewAngles( ucmd, punchAngle )
1106 end
1107 end
1108end
1109
1110snixzz.Bones = {
1111 ["Head"] = "ValveBiped.Bip01_Head1",
1112 ["Neck"] = "ValveBiped.Bip01_Neck1",
1113 ["Spine"] = "ValveBiped.Bip01_Spine",
1114 ["Spine2"] = "ValveBiped.Bip01_Spine2",
1115 ["Spine4"] = "ValveBiped.Bip01_Spine4",
1116 ["Pelvis"] = "ValveBiped.Bip01_Pelvis",
1117 ["R Upperarm"] = "ValveBiped.Bip01_R_UpperArm",
1118 ["R Forearm"] = "ValveBiped.Bip01_R_Forearm",
1119 ["R Hand"] = "ValveBiped.Bip01_R_Hand",
1120 ["L Upperarm"] = "ValveBiped.Bip01_L_UpperArm",
1121 ["L Forearm"] = "ValveBiped.Bip01_L_Forearm",
1122 ["L Hand"] = "ValveBiped.Bip01_L_Hand",
1123 ["R Thigh"] = "ValveBiped.Bip01_R_Thigh",
1124 ["R Calf"] = "ValveBiped.Bip01_R_Calf",
1125 ["R Foot"] = "ValveBiped.Bip01_R_Foot",
1126 ["R Toes"] = "ValveBiped.Bip01_R_Toe0",
1127 ["L Thigh"] = "ValveBiped.Bip01_L_Thigh",
1128 ["L Calf"] = "ValveBiped.Bip01_L_Calf",
1129 ["L Foot"] = "ValveBiped.Bip01_L_Foot",
1130 ["L Toes"] = "ValveBiped.Bip01_L_Toe0",
1131}
1132
1133snixzz.Hitboxes = {
1134 ["Head"] = 0,
1135 ["L Upperarm"] = 1,
1136 ["L Forearm"] = 2,
1137 ["L Hand"] = 3,
1138 ["R Upperarm"] = 4,
1139 ["R Forearm"] = 5,
1140 ["R Hand"] = 6,
1141 ["L Thigh"] = 7,
1142 ["L Calf"] = 8,
1143 ["F Foot"] = 9,
1144 ["L Toe"] = 10,
1145 ["R Thigh"] = 11,
1146 ["R Calf"] = 12,
1147 ["R Foot"] = 13,
1148 ["R Toe"] = 14,
1149 ["Pelvis"] = 15,
1150 ["Spine"] = 16,
1151}
1152
1153snixzz.Hitgroups = {
1154 [HITGROUP_HEAD] = "Head",
1155 [HITGROUP_CHEST] = "Chest",
1156 [HITGROUP_STOMACH] = "Stomach",
1157 [HITGROUP_LEFTARM] = "Left Arm",
1158 [HITGROUP_RIGHTARM] = "Right Arm",
1159 [HITGROUP_LEFTLEG] = "Left Leg",
1160 [HITGROUP_RIGHTLEG] = "Right Leg",
1161}
1162
1163function snixzz.GetPos( v )
1164 if snixzz.Vars["aim_method"] == "Hitbox" then
1165
1166 local Hitbox = v:GetHitBoxBone( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
1167 local HitboxPos = v:GetBonePosition( Hitbox )
1168
1169 local min, max = v:GetHitBoxBounds( snixzz.Hitboxes[snixzz.Vars["aim_hitbox"]], 0 )
1170
1171 return HitboxPos + ( min + max ) / 2
1172
1173 elseif snixzz.Vars["aim_method"] == "Bone" then
1174 local Bone = snixzz.Bones[snixzz.Vars["aim_bone"]]
1175 local BonePos = v:LookupBone( Bone )
1176 if BonePos then
1177 local pos, ang = v:GetBonePosition( BonePos )
1178 return pos, ang
1179 end
1180 end
1181 return v:LocalToWorld( v:OBBCenter() )
1182end
1183
1184function snixzz.InFov( v )
1185 -- wip
1186 return true
1187end
1188
1189-- thanks asutorea
1190function snixzz.CanFire()
1191 local wep = G.LocalPlayer():GetActiveWeapon()
1192 if snixzz.properCurTime == nil then return false end
1193 return G.IsValid( wep ) && !snixzz.BadWeapons[wep:GetClass()] && wep:GetActivity() != ACT_RELOAD && wep:GetNextPrimaryFire() < snixzz.properCurTime && G.LocalPlayer():Alive()
1194end
1195
1196-- pAntiAnti Aim
1197function snixzz.FixAngle( v )
1198 local eyeAngles = _R.Entity.EyeAngles( v )
1199
1200 if eyeAngles.p < -89 then
1201 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p + 180 )
1202 _R.Entity.InvalidateBoneCache( v )
1203 elseif eyeAngles.p > 89 then
1204 _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p - 180 )
1205 _R.Entity.InvalidateBoneCache( v )
1206 end
1207
1208end
1209
1210function snixzz.IsVisible( v )
1211 if snixzz.Bools["aim_antiantiaim"] then
1212 snixzz.FixAngle( v )
1213 end
1214 return snixzz.Functions.IsVisible( G.LocalPlayer():GetShootPos(), snixzz.GetPos( v ), v:EntIndex() )
1215end
1216
1217function snixzz.OnScreen( v )
1218 local a, f = _R.Player.GetAimVector( G.LocalPlayer() ):Angle() - ( v:GetPos() - G.LocalPlayer():GetShootPos() ):Angle(), _R.Player.GetFOV( G.LocalPlayer() )
1219 return ( G.math.NormalizeAngle( a.y ) < f + 2 && G.math.NormalizeAngle( a.p ) < f + 2 )
1220end
1221
1222function snixzz.IsDormant( index )
1223 return snixzz.Functions.IsDormant( index )
1224end
1225
1226function snixzz.FixMove( ucmd, aa )
1227 local fixAngle = G.Vector( ucmd:GetForwardMove(), ucmd:GetSideMove(), 0 )
1228 fixAngle = (( fixAngle:GetNormal() ):Angle() + ( ucmd:GetViewAngles() - G.Angle( 0, snixzz.Silent.y, 0 ) ) ):Forward() * fixAngle:Length()
1229
1230 if aa then
1231 ucmd:SetForwardMove( fixAngle.x )
1232 ucmd:SetSideMove( fixAngle.y * -1 )
1233 return
1234 end
1235
1236 ucmd:SetForwardMove( fixAngle.x )
1237 ucmd:SetSideMove( fixAngle.y )
1238end
1239
1240function snixzz.NormalizeAngles( ang )
1241 ang.p = G.math.NormalizeAngle( ang.p )
1242 ang.y = G.math.NormalizeAngle( ang.y )
1243 ang.r = 0
1244 return ang
1245end
1246
1247snixzz.PredPositions = {}
1248local tbl = snixzz.PredPositions[v] or {}
1249
1250function snixzz.GetPredictionPos( v, pos )
1251 tbl.pos = tbl.pos or pos or _R.Entity.GetPos( v )
1252
1253 local realTime = G.RealTime()
1254 if tbl.realTime != realTime then
1255 tbl.realTime = realTime
1256 tbl.pos = pos or _R.Entity.GetPos( v )
1257 end
1258
1259 tbl.velocity = v:GetVelocity()
1260 snixzz.PredPositions = tbl
1261
1262 return tbl.pos
1263end
1264
1265snixzz.PredictionMethods = { "Velocity 0.0075", "Engine Velocity", "Classic", "Herpes", "ColdFire", "FapHack" }
1266snixzz.PredWeapons = {
1267 ["weapon_crossbow"] = 3110,
1268 ["weapon_frag"] = 3110,
1269}
1270local tPos, lVelocity, tVelocity, tDistance, predTime
1271-- Some methods are BASED on other cheat's methods, I suck at prediction.
1272function snixzz.Prediction( Pos, v )
1273
1274 local wep = G.LocalPlayer():GetActiveWeapon()
1275 lVelocity = _R.Entity.GetVelocity( G.LocalPlayer() )
1276 tVelocity = _R.Entity.GetVelocity( v )
1277 tPos = _R.Entity.GetPos( v )
1278 lPos = _R.Entity.GetPos( G.LocalPlayer() )
1279 tDistance = lPos:Distance( tPos )
1280
1281 if G.IsValid( v ) && G.type( tVelocity ) == "Vector" && G.type( tPos ) == "Vector" then
1282
1283 if wep && G.IsValid( wep ) && snixzz.PredWeapons[wep:GetClass()] then
1284 predTime = distance / snixzz.PredWeapons[wep:GetClass()]
1285 Pos = Pos + tVelocity * predTime
1286 else
1287
1288 if snixzz.Vars["aim_prediction_method"] == "Velocity 0.0075" then
1289 Pos = Pos + lVelocity * 0.0075 + tVelocity * 0.0075
1290
1291 elseif snixzz.Vars["aim_prediction_method"] == "Engine Velocity" then
1292 Pos = Pos + tVelocity * G.engine.TickInterval() - lVelocity * G.engine.TickInterval()
1293
1294 elseif snixzz.Vars["aim_prediction_method"] == "Classic" then
1295 Pos = Pos + tVelocity / 45 - lVelocity / 45
1296
1297 elseif snixzz.Vars["aim_prediction_method"] == "Herpes" then
1298 tPos = snixzz.GetPredictionPos( v, Pos ) - Pos
1299 Pos = Pos + ( tPos * 2 ) - ( lVelocity / 50 )
1300
1301 elseif snixzz.Vars["aim_prediction_method"] == "ColdFire" then
1302 Pos = Pos - tVelocity:GetNormal() / 5.8 + lVelocity:GetNormal() / 3
1303
1304 elseif snixzz.Vars["aim_prediction_method"] == "FapHack" then
1305 Pos = Pos + tVelocity * 0.02 - lVelocity * 0.05
1306
1307 end
1308 end
1309
1310 else
1311 Pos = Pos
1312 end
1313
1314 return Pos
1315end
1316
1317function snixzz.GetTarget()
1318
1319 local x, y = G.ScrW(), G.ScrH()
1320 local vPos
1321 local oldPos = G.LocalPlayer():EyePos():ToScreen()
1322 local distance = G.math.huge
1323 local AngA
1324 local AngB
1325
1326 for k, v in G.next, G.player.GetAll() do
1327
1328 vPos = v:GetPos():ToScreen()
1329 distance2 = v:GetPos():DistToSqr( G.LocalPlayer():GetPos() )
1330 AngA = G.math.Dist( x / 2, y / 2, oldPos.x, oldPos.y )
1331 AngB = G.math.Dist( x / 2, y / 2, vPos.x, vPos.y )
1332
1333 if snixzz.IsValid( v ) then
1334
1335 if snixzz.Vars["aim_target_method"] == "Distance" then
1336 if distance2 < distance then
1337 distance = distance2
1338 snixzz["Target"] = v
1339 end
1340
1341 elseif snixzz.Vars["aim_target_method"] == "Crosshair" then
1342 if AngB <= AngA then
1343 snixzz.Target = v
1344 end
1345
1346 end
1347 else
1348 continue
1349 end
1350 end
1351 return snixzz["Target"]
1352end
1353
1354snixzz.Firing = false
1355function snixzz.Fire( ucmd )
1356 if snixzz.Firing then
1357 ucmd:RemoveKey( G.IN_ATTACK )
1358 snixzz.Firing = false
1359 else
1360 ucmd:SetButtons( G.bit.bor( ucmd:GetButtons(), G.IN_ATTACK ) )
1361 snixzz.Firing = true
1362 end
1363end
1364
1365snixzz.FakeSwitch = false
1366snixzz.FakeAngle = G.Angle()
1367snixzz.AntiAimMethods = { "Classic", "Classic Inverted", "Static", "Jitter", "Random Pitch", "Fake Angles", "Fake Jitter", "Spin", "Fake Spin" }
1368function snixzz.AntiAim( ucmd )
1369 local pitches = { -181, 541, 262 }
1370 local yaws = { 262, -262, 181, -181, 541, -541 }
1371
1372 -- OG anti-aim
1373 if snixzz.Vars["aim_anti_method"] == "Classic" then
1374 snixzz.Functions.SetViewAngles( ucmd, G.Angle( 181, ucmd:GetViewAngles().y, 180 ) )
1375 snixzz.FixMove( ucmd )
1376
1377 -- Looking down instead of up
1378 elseif snixzz.Vars["aim_anti_method"] == "Classic Inverted" then
1379 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -181, ucmd:GetViewAngles().y, 180 ) )
1380 snixzz.FixMove( ucmd )
1381
1382 -- Static
1383 elseif snixzz.Vars["aim_anti_method"] == "Static" then
1384 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -snixzz.Angles.p + 900, snixzz.Angles.y + 180, 0 ) )
1385 snixzz.FixMove( ucmd, true )
1386
1387 -- Jitter - credits to cdriza
1388 elseif snixzz.Vars["aim_anti_method"] == "Jitter" then
1389 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.table.Random( pitches ), G.table.Random( yaws ), 0 ) )
1390 snixzz.FixMove( ucmd, true )
1391
1392 -- Randomized pitch
1393 elseif snixzz.Vars["aim_anti_method"] == "Random Pitch" then
1394 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ucmd:GetViewAngles().y, 180 ) )
1395 snixzz.FixMove( ucmd, true )
1396
1397 -- bSendPacket Fake Angles
1398 elseif snixzz.Vars["aim_anti_method"] == "Fake Angles" then
1399 snixzz.FakeAngle = ucmd:GetViewAngles()
1400 if snixzz.FakeSwitch then
1401 bSendPacket = true
1402 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y + 90, 0 ) )
1403 else
1404 bSendPacket = false
1405 snixzz.Functions.SetViewAngles( ucmd, G.Angle( -192, snixzz.FakeAngle.y - 90, 0 ) )
1406 end
1407 snixzz.FixMove( ucmd, true )
1408 snixzz.FakeSwitch = !snixzz.FakeSwitch
1409
1410 -- bSendPacket Fake Jitter
1411 elseif snixzz.Vars["aim_anti_method"] == "Fake Jitter" then
1412 snixzz.FakeAngle = ucmd:GetViewAngles()
1413 if snixzz.FakeSwitch then
1414 bSendPacket = true
1415 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y + 90, 0 ) )
1416 else
1417 bSendPacket = false
1418 snixzz.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), snixzz.FakeAngle.y - 90, 0 ) )
1419 end
1420 snixzz.FixMove( ucmd, true )
1421 snixzz.FakeSwitch = !snixzz.FakeSwitch
1422
1423 -- Simple spinbot with -192 pitch
1424 elseif snixzz.Vars["aim_anti_method"] == "Spin" then
1425 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
1426 snixzz.FixMove( ucmd, false )
1427
1428 -- bSendPacket Spinbot
1429 elseif snixzz.Vars["aim_anti_method"] == "Fake Spin" then
1430 snixzz.FakeAngle = ucmd:GetViewAngles()
1431 if FakeSwitch then
1432 bSendPacket = true
1433 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
1434 else
1435 bSendPacket = false
1436 snixzz.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, -G.math.fmod( G.CurTime() / .1 * 2 * snixzz.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
1437 end
1438 snixzz.FixMove( ucmd, false )
1439 end
1440
1441end
1442
1443-- To shorten up my aimbot checks a bit.
1444function snixzz.ShouldAim( ucmd, isToggled )
1445 return snixzz.Target && snixzz.IsValid( snixzz.Target ) && ucmd:CommandNumber() != 0
1446end
1447
1448/*=======================
1449
1450
1451Hooked functions below
1452
1453
1454=========================*/
1455snixzz.Status = "Waiting..."
1456snixzz.StatusColor = Color( 255, 255, 0, 150 )
1457snixzz.Silent = G.Angle()
1458snixzz.BulletTime = true
1459snixzz.pDelay = 0
1460//snixzz.SpreadPos = G.Vector( 0, 0, 0 )
1461
1462function snixzz.CreateMove( ucmd )
1463
1464 snixzz.Target = snixzz.GetTarget()
1465 snixzz.Offset = G.Vector( 0, 0, snixzz.Vars["aim_offset"] )
1466
1467 // Silent aim
1468 if snixzz.Bools["aim_silent"] then
1469 snixzz.Silent = snixzz.Silent + G.Angle( ucmd:GetMouseY() * 0.023, -ucmd:GetMouseX() * 0.023, 0 )
1470 snixzz.Silent.p = G.math.Clamp( snixzz.Silent.p, -89, 89 )
1471 if ucmd:CommandNumber() == 0 then
1472 ucmd:SetViewAngles( snixzz.Silent )
1473 return
1474 end
1475 snixzz.Angles = snixzz.Silent
1476 else
1477 snixzz.Angles = ucmd:GetViewAngles()
1478 end
1479
1480 // Aimbot core
1481 if ( G.input.IsKeyDown( snixzz.Binds["+aimbot"] ) && !snixzz.Typing && snixzz.ShouldAim( ucmd ) or snixzz.Bools["aim_toggle"] ) && snixzz.ShouldAim( ucmd ) then
1482
1483 if snixzz.Bools["aim_prediction"] then
1484 snixzz.Angles = snixzz.Prediction( snixzz.GetPos( snixzz.Target ) - snixzz.Offset, snixzz.Target )
1485 else
1486 snixzz.Angles = snixzz.GetPos( snixzz.Target ) - snixzz.Offset
1487 end
1488
1489 snixzz.Angles = ( snixzz.Angles - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
1490
1491 -- Normalize that shit
1492 snixzz["NormalizeAngles"]( snixzz["Angles"] )
1493
1494 -- View punch fix
1495 if snixzz.Bools["aim_norecoil"] then
1496 snixzz.CorrectRecoil( ucmd )
1497 end
1498
1499 -- Spread Prediction
1500 if snixzz.Bools["aim_nospread"] then
1501 snixzz.SetAngle = snixzz.PredictSpread( ucmd, G.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
1502 else
1503 snixzz.SetAngle = snixzz.Angles
1504 end
1505
1506 if snixzz.Bools["aim_psilent"] then
1507
1508 if G.LocalPlayer():Alive() && G.IsValid( G.LocalPlayer():GetActiveWeapon() ) then
1509
1510 if G.LocalPlayer():GetActiveWeapon():GetNextPrimaryFire() >= snixzz.properCurTime then
1511 snixzz.BulletTime = false
1512 else
1513 snixzz.BulletTime = true
1514 end
1515
1516 if ucmd:CommandNumber() == 0 then
1517 if snixzz.Vars["aim_psilent_method"] == "bSendPacket" then
1518 bSendPacket = true
1519 end
1520 else
1521 if snixzz.Vars["aim_psilent_method"] == "bSendPacket" then
1522 bSendPacket = false
1523 end
1524 snixzz.pDelay = snixzz.pDelay + 1
1525 end
1526 end
1527
1528 if snixzz.BulletTime && !bSendPacket then
1529 if snixzz.pDelay >= 4 then
1530 snixzz.Functions.SetViewAngles( ucmd, snixzz.SetAngle )
1531 snixzz.pDelay = 0
1532 end
1533 end
1534 else
1535 snixzz.Functions.SetViewAngles( ucmd, snixzz.SetAngle )
1536 end
1537
1538 if snixzz.Bools["aim_autoshoot"] && snixzz.CanFire( ucmd ) then
1539 snixzz.Fire( ucmd )
1540 end
1541
1542 -- Silent aim view correction
1543 if snixzz.Bools["aim_silent"] then
1544 snixzz.FixMove( ucmd )
1545 end
1546
1547 -- status bullshit
1548 snixzz.Status = "Locked! (" .. snixzz.Target:Nick() .. ")"
1549 snixzz.StatusColor = Color( 255, 0, 0, 150 )
1550 snixzz["Locked"] = true
1551
1552 else
1553 -- More status bullshit, aimbot not active.
1554 snixzz.Status = "Searching..."
1555 snixzz.StatusColor = Color( 0, 255, 0, 150 )
1556 snixzz.Locked = false
1557 end
1558
1559 -- Triggerbot
1560 if snixzz.Bools["misc_triggerbot"] or G.input.IsKeyDown( snixzz.Binds["+triggerbot"] ) then
1561 snixzz.StatusColor = Color( 255, 255, 0, 150 )
1562 snixzz.Status = "Triggerbot Searching.."
1563 local hitgroup = G.LocalPlayer():GetEyeTrace().HitGroup
1564 local entity = G.LocalPlayer():GetEyeTrace().Entity
1565 snixzz.SpreadPos = G.LocalPlayer():GetEyeTrace().HitPos
1566
1567 if snixzz.Vars["misc_triggerbot_method"] == "Body" then
1568 if snixzz.IsValid( entity ) then
1569
1570 if snixzz.Bools["misc_triggerbot_nospread"] then
1571 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
1572 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
1573 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
1574 end
1575
1576 snixzz.StatusColor = Color( 255, 0, 0, 150 )
1577 snixzz.Status = "Firing! (" .. entity:Nick() .. ")"
1578 if snixzz.CanFire() then
1579 snixzz.Fire( ucmd )
1580 end
1581 end
1582
1583 elseif snixzz.Vars["misc_triggerbot_method"] == "Hitbox" then
1584 if snixzz.Hitgroups[hitgroup] != nil && snixzz.IsValid( entity ) then
1585
1586 if snixzz.Bools["misc_triggerbot_nospread"] then
1587 snixzz.NoSpreadAng = ( snixzz.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
1588 snixzz.NoSpreadAng = snixzz.PredictSpread( ucmd, snixzz.NoSpreadAng )
1589 snixzz.Functions.SetViewAngles( ucmd, snixzz.NoSpreadAng )
1590 end
1591
1592 snixzz.StatusColor = Color( 255, 0, 0, 150 )
1593 snixzz.Status = "Firing! (" .. entity:Nick() or hitbox .. ")"
1594 if snixzz.CanFire() then
1595 snixzz.Fire( ucmd )
1596 end
1597 end
1598 end
1599 end
1600
1601 -- Anti-Aim
1602 if snixzz.Bools["aim_anti"] && !snixzz.Locked && !G.LocalPlayer():KeyDown( G.IN_ATTACK ) && G.LocalPlayer():GetMoveType() != G.MOVETYPE_LADDER then
1603 snixzz.AntiAim( ucmd )
1604 end
1605
1606 if snixzz.Bools["misc_fakelag"] then
1607 snixzz.LagTicks = snixzz.LagTicks + 1
1608
1609 if snixzz.LagTicks >= snixzz.Vars["misc_fakelag_rate"] then
1610 snixzz.ForceCvar( "host_timescale", 0 )
1611 snixzz.LagTicks = 0
1612 else
1613 snixzz.ForceCvar( "host_timescale", 1 )
1614 end
1615
1616 end
1617
1618 // Bunnyhop & autostrafe
1619 if snixzz.Bools["misc_bhop"] then
1620 if !G.LocalPlayer():GetMoveType() != G.MOVETYPE_NOCLIP && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !snixzz.Typing then
1621 if !G.LocalPlayer():IsOnGround() then
1622 ucmd:SetButtons( G.bit.band( ucmd:GetButtons(), G.bit.bnot( G.IN_JUMP ) ) )
1623 end
1624 if snixzz.Bools["misc_bhop_autostrafe"] then
1625 if ucmd:GetMouseX() < 0 then
1626 ucmd:SetSideMove( -10000 )
1627 elseif ucmd:GetMouseX() > 0 then
1628 ucmd:SetSideMove( 10000 )
1629 end
1630 end
1631 end
1632 end
1633
1634 -- SpeedHack (pSpeed method)
1635 if G.input.IsKeyDown( snixzz.Binds["+speedhack"] ) && !snixzz.Typing then
1636 if snixzz.Vars["speedhack_type"] == "pSpeed" then
1637 snixzz.Functions.SetSpeed( snixzz.Vars["speedhack_speed"] )
1638 elseif snixzz.Vars["speedhack_type"] == "Cvar" then
1639 snixzz.ForceCvar( "sv_cheats", 1 )
1640 snixzz.ForceCvar( "host_timescale", snixzz.Vars["speedhack_speed"] )
1641 end
1642 else
1643 if snixzz.Vars["speedhack_type"] == "pSpeed" then
1644 snixzz.Functions.SetSpeed( 0 )
1645 elseif snixzz.Vars["speedhack_type"] == "Cvar" then
1646 snixzz.ForceCvar( "sv_cheats", 0 )
1647 snixzz.ForceCvar( "host_timescale", 1 )
1648 end
1649 end
1650
1651 // No hands
1652 if snixzz.Bools["esp_nohands"] then
1653 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), true )
1654 else
1655 snixzz.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), false )
1656 end
1657
1658end
1659
1660function snixzz.CalcView( ply, origin, angles, fov )
1661
1662 local ply = G.LocalPlayer()
1663 local wep = ply:GetActiveWeapon()
1664 local view = { ply = ply, origin = pos, angles = angles, fov = fov }
1665
1666 // Advanced NoRecoil. TODO: Recoil Control System
1667 if snixzz.Bools["aim_norecoil"] then
1668 if wep.Primary then
1669 if !snixzz.RecoilBackup[wep:GetClass()] then
1670 snixzz.RecoilBackup[wep:GetClass()] = wep.Primary.Recoil
1671 end
1672 wep.Primary.Recoil = 0
1673 elseif wep.Secondary then
1674 if !snixzz.RecoilBackup then
1675 snixzz.RecoilBackup[wep:GetClass()] = wep.Secondary.Recoil
1676 end
1677 wep.Secondary.Recoil = 0
1678 end
1679 else
1680 if wep.Primary then
1681 if wep.Primary.Recoil == 0 then
1682 wep.Primary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
1683 end
1684 else
1685 if wep.Secondary then
1686 if wep.Secondary.Recoil == 0 then
1687 wep.Secondary.Recoil = snixzz.RecoilBackup[wep:GetClass()]
1688 end
1689 end
1690 end
1691 end
1692
1693 // Silent aim
1694 if snixzz.Bools["aim_silent"] then
1695 view.angles = snixzz.Silent
1696 view.vm_angles = snixzz.Silent
1697 else
1698 view.angles = G.LocalPlayer():EyeAngles()
1699 view.angles.r = 0
1700 end
1701
1702 view.fov = snixzz.Vars["esp_fov"]
1703
1704 if snixzz.Bools["misc_thirdperson"] then
1705 view.origin = G.LocalPlayer():GetShootPos() - snixzz.Silent:Forward() * snixzz.Vars["misc_thirdperson_distance"]
1706 else
1707 view.origin = origin
1708 end
1709
1710 return view
1711end
1712
1713snixzz.LaserAttachments = { -- WIP
1714 ["Barrel"] = "muzzle",
1715 ["Iron Sights"] = "2",
1716 ["fuk"] = "1",
1717}
1718function snixzz.HUDPaint()
1719
1720 local vwep;
1721 local textpos;
1722 local x1, y1, x2, y2;
1723 local diff;
1724 local diff2;
1725 local color;
1726 local boxcolor;
1727 local startx;
1728 local starty;
1729 local endpos;
1730 local pos;
1731 local wep = G.LocalPlayer():GetActiveWeapon()
1732 local viewmodel = G.LocalPlayer():GetViewModel()
1733 local weapon
1734 local dynLight
1735
1736 -- Menu header
1737 if snixzz.MenuOpen then
1738 G.surface.SetDrawColor( snixzz.Vars["misc_menucolor2"] )
1739 G.surface.DrawRect( 20, 50, 420, 60 )
1740
1741 G.surface.SetDrawColor( Color( 0, 0, 0, 255 ) )
1742 G.surface.DrawOutlinedRect( 20, 50, 420, 60, 2 )
1743
1744 G.draw.SimpleTextOutlined( "snixzz2", "snixzz_logo", 25, 55, snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1.5, Color( 0, 0, 0 ) )
1745 G.draw.SimpleTextOutlined( "by 0xymoron", "snixzz_logo_small", 95, 65, snixzz.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 ) )
1746
1747 -- Big ass shit
1748 G.draw.SimpleTextOutlined(
1749 snixzz.Info.Version .. " Last Updated: " .. snixzz.Info.Updated,
1750 "snixzz_logo_small",
1751 snixzz.Frame:GetWide() + 15, 65,
1752 snixzz.Colors.White, TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, Color( 30, 30, 30, 255 )
1753 )
1754
1755 end
1756
1757 if !snixzz.Bools["esp_enabled"] then return end
1758
1759 -- Laser Sight
1760 if snixzz.Bools["esp_laser"] then
1761
1762 if viewmodel && G.IsValid( wep ) && G.IsValid( viewmodel ) then
1763 if wep:GetClass() != "weapon_physgun" then
1764
1765 local muzzle = viewmodel:LookupAttachment( "muzzle" )
1766 if muzzle == 0 then
1767 muzzle = viewmodel:LookupAttachment( "1" )
1768 end
1769
1770 local trace = G.LocalPlayer():GetEyeTrace().HitPos
1771
1772 if viewmodel:GetAttachment( muzzle ) then
1773 G.cam.Start3D( G.EyePos(), G.EyeAngles() )
1774
1775 local startpos = viewmodel:GetAttachment( muzzle ).Pos
1776 local endpos = trace
1777
1778 if snixzz.Bools["aim_silent"] && snixzz.Locked && G.IsValid( snixzz.Target ) then
1779 endpos = snixzz.GetPos( snixzz.Target )
1780 else
1781 endpos = trace
1782 end
1783
1784 -- Laser
1785 G.render.SetMaterial( G.Material( "trails/laser" ) )
1786 G.render.DrawBeam( startpos, endpos, 4, 0, 0, snixzz.Vars["misc_lasercolor"] )
1787
1788 -- HitPos Dot
1789 G.render.SetMaterial( G.Material( "Sprites/light_glow02_add_noz" ) )
1790 G.render.DrawQuadEasy(
1791 endpos, -- trace
1792 ( G.EyePos() - trace ):GetNormal(),
1793 25, 25,
1794 Color( 255, 255, 255, 255 ), 0
1795 )
1796
1797 G.cam.End3D()
1798 end
1799 end
1800 end
1801 end
1802
1803 -- Dynamic Light around player
1804 if snixzz.Bools["esp_dynamiclight"] then
1805 dynLight = G.DynamicLight( G.LocalPlayer():EntIndex() )
1806 dynLight.pos = G.LocalPlayer():GetShootPos()
1807 dynLight.r = 255
1808 dynLight.g = 255
1809 dynLight.b = 255
1810 dynLight.brightness = 1.75
1811 dynLight.Decay = 850
1812 dynLight.Size = 250
1813 dynLight.DieTime = G.CurTime() + 1
1814 end
1815
1816 if snixzz.Bools["esp_wireweapon"] then
1817 _R.Entity.SetMaterial( viewmodel, "models/wireframe" )
1818 _R.Entity.SetColor( viewmodel, snixzz.Vars["misc_lasercolor"] )
1819 else
1820 _R.Entity.SetMaterial( viewmodel, "" )
1821 _R.Entity.SetColor( viewmodel, Color( 255, 255, 255 ) )
1822 end
1823
1824 for k, v in G.next, G.player.GetAll() do
1825
1826 textpos = 0 -- -2
1827 x1, y1, x2, y2 = snixzz.GetBounds( v )
1828 diff = G.math.abs( x2 - x1 )
1829 diff2 = G.math.abs( y2 - y1 )
1830 if G.IsValid( v:GetActiveWeapon() ) then
1831 weapon = v:GetActiveWeapon():GetPrintName()
1832 else
1833 weapon = "Unknown"
1834 end
1835
1836 // Player esp
1837 if snixzz.ShouldDraw( v ) then
1838 color = G.team.GetColor( v:Team() )
1839
1840 // ESP text
1841 if snixzz.Bools["esp_name"] then
1842 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
1843 textpos = textpos + 12
1844 end
1845
1846 -- health text
1847 if snixzz.Bools["esp_health_text"] then
1848 G.draw.SimpleText( "HP: " .. v:Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
1849 textpos = textpos + 12
1850 end
1851
1852 -- ESP weapon
1853 if snixzz.Bools["esp_weapon"] then
1854 G.draw.SimpleText( weapon, "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
1855 textpos = textpos + 12
1856 end
1857
1858 -- Distance ESP
1859 if snixzz.Bools["esp_distance"] then
1860 G.draw.SimpleText( "D: " .. G.math****und( v:GetPos():Distance( G.LocalPlayer():GetPos() ) ), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
1861 textpos = textpos + 12
1862 end
1863
1864 // Box ESP
1865 if snixzz.Bools["esp_box"] then
1866 snixzz.DrawOutlinedBox( x1, y1, diff, diff2, snixzz.Vars["esp_box_width"], color )
1867 end
1868
1869 -- Health Bar
1870 if snixzz.Bools["esp_health_bar"] then
1871
1872 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
1873 G.surface.DrawRect( x1 -6, y1, 3, diff2 )
1874 G.surface.SetDrawColor( Color( 0, 255, 0 ) )
1875 G.surface.DrawRect( x1 - 6, y2 - diff2 / 100 * v:Health(), 3, diff2 / 100 * v:Health() )
1876
1877 end
1878
1879 -- Snaplines
1880 if snixzz.Bools["esp_snaplines"] then
1881
1882 startx = G.ScrW() / 2
1883 starty = G.ScrH() / 2
1884 endpos = snixzz.GetPos( v ):ToScreen()
1885
1886 G.surface.SetDrawColor( color )
1887 G.surface.DrawLine( startx, starty, endpos.x, endpos.y )
1888 end
1889
1890 -- Chams! Much faster than RenderScreenSpaceEffects
1891 if snixzz.Bools["esp_chams"] then
1892 G.cam.Start3D()
1893
1894 v:SetColor( color )
1895
1896 if snixzz.Vars["esp_chams_material"] == "Solid" then
1897 v:SetMaterial( "models/debug/debugwhite" )
1898 elseif snixzz.Vars["esp_chams_material"] == "Wireframe" then
1899 v:SetMaterial( "models/wireframe" )
1900 elseif snixzz.Vars["esp_chams_material"] == "XQZ" then
1901 v:SetMaterial( "" )
1902 end
1903
1904 -- Weapon Chams
1905 if G.IsValid( v:GetActiveWeapon() ) then
1906 v:GetActiveWeapon():DrawModel()
1907 end
1908
1909 -- Player chams
1910 if snixzz.Vars["esp_chams_material"] != "XQZ" then
1911 G.render.SetColorModulation( color.r / 255, color.g / 255, color.b / 255 )
1912 end
1913 v:DrawModel()
1914 v:SetColor( Color( 255, 255, 255 ) )
1915 v:SetMaterial( "" )
1916
1917 G.cam.End3D()
1918 end
1919
1920 -- For prediction testing & shit
1921 if snixzz.Bools["esp_aimpos"] then
1922 local predictedPos = snixzz.Prediction( snixzz.GetPos( v ), v ):ToScreen()
1923 G.draw****undedBox( 4, predictedPos.x, predictedPos.y, 7, 7, Color( 255, 0, 0, 255 ) )
1924 end
1925
1926 else
1927 continue;
1928 end
1929
1930 end
1931
1932 // Aim status & shit
1933 if snixzz.Bools["esp_status"] then
1934 G.draw.DrawText( snixzz.Status, "snixzz_status", G.ScrW() / 2, G.ScrH() * 0.5 + 50, snixzz.StatusColor, TEXT_ALIGN_CENTER )
1935 end
1936
1937 // Crosshair
1938 local x = ScrW() / 2
1939 local y = ScrH() / 2
1940
1941 local crosscolor = Color( 0, 0, 0, 255 )
1942 local crosslength = 50
1943 local gap = 2
1944
1945 local boxsize = 5
1946
1947 -- Box
1948 if snixzz.Bools["esp_crosshair_box"] then
1949 G.surface.SetDrawColor( Color( 255, 255, 255 ) )
1950 G.surface.DrawOutlinedRect( x - boxsize - 2, y - boxsize - 2, ( boxsize + 2 ) * 2 + 1, ( boxsize + 2 ) * 2 + 1 )
1951 end
1952
1953 -- Crosshair
1954 if snixzz.Bools["esp_crosshair"] then
1955 G.surface.SetDrawColor( 0, 0, 0, 255 )
1956 G.surface.DrawLine( x - crosslength, y, x - gap, y )
1957 G.surface.DrawLine( x + crosslength, y, x + gap, y )
1958
1959 G.surface.DrawLine( x, y - crosslength, x, y - gap )
1960 G.surface.DrawLine( x, y + crosslength, x, y + gap )
1961 end
1962end
1963
1964snixzz.properCurTime = 0
1965snixzz.LagVar = 12
1966snixzz.LagTicks = 0
1967local dynLight
1968function snixzz.Move()
1969
1970 if G.IsFirstTimePredicted() then return end
1971 snixzz.properCurTime = G.CurTime() + G.engine.TickInterval()
1972
1973 -- Menu opening
1974 if ( G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.Typing && !snixzz.MenuOpen && !gui.IsConsoleVisible() ) then
1975 snixzz.Menu()
1976 snixzz.MenuOpen = true
1977 end
1978
1979end
1980
1981function snixzz.Namechanger()
1982 if snixzz.Bools["misc_namechanger"] then
1983 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
1984 G.chat.AddText( Color( 0, 255, 255 ), "[snixzz2] Changed your name to " .. snixzz.NextName )
1985 if G.string.find( G.string.lower( G.GAMEMODE.Name ), "rp" ) or G.string.find( G.string.lower( GAMEMODE.Name ), "purge" ) then
1986 -- Overly comlpicated Steam name stealer & RP name stealer. Accuse 2 different people at once.
1987 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
1988 snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
1989 G.timer.Simple( 0.5, function()
1990 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
1991 snixzz.Functions.ConCommand( "darkrp rpname " .. snixzz.NextName .. "q" ) -- ** TODO: CHANGE q TO SOMETHING ELSE.
1992 end )
1993 else
1994 snixzz.NextName = G.table.Random( G.player.GetAll() ):Nick()
1995 snixzz.Functions.ConCommand( "name " .. snixzz.NextName .. " %" )
1996 end
1997 end
1998end
1999if G.string.find( G.string.lower( G.GAMEMODE.Name ), "rp" ) or G.string.find( G.string.lower( G.GAMEMODE.Name ), "purge" ) then
2000 snixzz.RegisterTimer( 10, 0, snixzz.Namechanger )
2001else
2002 snixzz.RegisterTimer( G.GetConVarNumber( "sv_namechange_cooldown_seconds" ), 0, snixzz.Namechanger )
2003end
2004
2005/*
2006 DETOURS
2007*/
2008
2009_R.Entity.FireBullets = snixzz.Detour( _R.Entity.FireBullets, function( e, bullet )
2010 snixzz.Cones.Normal[ G.LocalPlayer():GetActiveWeapon():GetClass() ] = bullet["Spread"]
2011 return snixzz.Detours[ _R.Entity.FireBullets ]( e, bullet )
2012end )
2013
2014_R.Player.IPAddress = snixzz.Detour( _R.Player.IPAddress, function()
2015 snixzz.FakeIP = G.tostring( G.math.random( 1, 99 ), G.math.random( 1, 99 ), G.math.random( 1, 99 ), G.math.random( 1, 99 ), ":27005" )
2016 snixzz.ACNotify( "Server tried to get _R.Player.IPAddress, returning '" .. snixzz.FakeIP .. "'" )
2017 snixzz.logEvent( "anticheat", "Tried getting player:IPAddress(), returnin fake IP '" .. snixzz.FakeIP .. "'" )
2018 return snixzz.FakeIP
2019end )
2020
2021_R.Entity.SetHands = snixzz.Detour( _R.Entity.SetHands, function( ent )
2022 if snixzz.Bools["esp_nohands"] then
2023 return
2024 else
2025 return ent
2026 end
2027end )
2028
2029_R.Player.GetHands = snixzz.Detour( _R.Player.GetHands, function()
2030 if snixzz.Bools["esp_nohands"] then
2031 return false
2032 else
2033 return true
2034 end
2035end )
2036
2037render.Capture = snixzz.Detour( render.Capture, function( data )
2038 snixzz.ACNotify( "An anti-cheat attempted to capture your screen." )
2039 return -- no.
2040end )
2041
2042file.Exists = snixzz.Detour( file.Exists, function( filename, dir )
2043 snixzz.LogDetour( "file.Exists( '" .. filename .. "', '" .. dir .. "' )" )
2044 if G.string.find( filename, "snixzz" ) then
2045 snixzz.ACNotify( "An anti-cheat attempted to search for snixzz" )
2046 return false
2047 else
2048 return snixzz.Detours[ file.Exists ]( filename, dir )
2049 end
2050end )
2051
2052file.Read = snixzz.Detour( file.Read, function( filename, dir )
2053 snixzz.LogDetour( "file.Read( '" .. filename .. "', '" .. dir .. "' )" )
2054 if G.string.find( filename, "snixzz" ) then
2055 snixzz.ACNotify( "An anti-cheat attempted to search for snixzz" )
2056 return "print( 'Hello World' )"
2057 else
2058 return snixzz.Detours[ file.Read ]( filename, dir )
2059 end
2060end )
2061
2062snixzz.FakeFiles = {
2063 "demo_recording.lua",
2064 "vgui/dbutton.lua",
2065 "vgui/dgrid.lua",
2066 "menu/menu.lua",
2067 "menu/mainmenu.lua",
2068 "menu/loading.lua",
2069 "menu/video.lua",
2070 "menu/errors.lua",
2071}
2072
2073file.Find = snixzz.Detour( file.Find, function( filename, dir )
2074 snixzz.LogDetour( "file.Find( '" .. filename .. "', '" .. dir .. "' )" )
2075 if G.string.find( filename, "snixzz" ) then
2076 return G.table.Random( snixzz.FakeFiles ) -- lol fuck you
2077 else
2078 return snixzz.Detours[ file.Find ]( filename, dir )
2079 end
2080end )
2081
2082net.Receive = snixzz.Detour( net.Receive, function( name, func )
2083 snixzz.LogDetour( "net.Receive( '" .. name .. "' )" )
2084 return snixzz.Detours[ net.Receive ]( name, func )
2085end )
2086
2087net.Start = snixzz.Detour( net.Start, function( name )
2088 if snixzz.Detours["net.Start"][name] then
2089 snixzz.ACNotify( "Blocked net.Start ( '" .. name .. "' )" )
2090 return
2091 else
2092 snixzz.LogDetour( "net.Start( '" .. name .. "' )" )
2093 return snixzz.Detours[ net.Start ]( name )
2094 end
2095end )
2096
2097net.WriteString = snixzz.Detour( net.WriteString, function( str )
2098 if G.string.find( str, "snixzz" ) then
2099 snixzz.ACNotify( "Blocked net.WriteString ( '" .. str .. "' )" )
2100 return "nil"
2101 else
2102 snixzz.LogDetour( "net.WriteString( " .. str .. " )" )
2103 return snixzz.Detours[ net.WriteString ]( str )
2104 end
2105end )
2106
2107_R.Player.ConCommand = snixzz.Detour( _R.Player.ConCommand, function( ply, args )
2108 snixzz.LogDetour( ply:Nick() .. " - _R.Player.ConCommand( '" .. args .. "' ) " )
2109 return snixzz.Detours[ _R.Player.ConCommand ]( ply, args )
2110end )
2111
2112/*
2113_R.ConVar.GetBool = snixzz.Detour( _R.Convar.GetBool, function( cvar )
2114 snixzz.LogDetour( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "'" )
2115 for k, v in G.pairs( snixzz.Spoof ) do
2116 if cvar:GetName() == k then
2117 snixzz.ACNotify( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "' ) returning " .. G.tostring( v ) )
2118 return v
2119 else
2120 return snixzz.Detours[_R.ConVar.GetBool]( cvar )
2121 end
2122 end
2123end )*/
2124
2125GetConVarNumber = snixzz.Detour( GetConVarNumber, function( cvar )
2126 if snixzz.Spoof[cvar] != nil then
2127 return snixzz.Spoof[cvar]
2128 else
2129 return snixzz.Detours[GetConVarNumber]( cvar )
2130 end
2131end )
2132
2133snixzz.IgnoreCMDs = {
2134 ["hvh_playheadshotsound"] = true,
2135 ["hvh_hitsound"] = true,
2136 ["r_cleardecals"] = true,
2137 ["ulx_showmotd"] = true,
2138}
2139RunConsoleCommand = snixzz.Detour( RunConsoleCommand, function( cmd, ... )
2140 local str = cmd
2141 if !snixzz.IgnoreCMDs[cmd] then
2142 if ... then
2143 local args = { ... }
2144 str = str .. ", " .. ( ... )
2145
2146 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. "' {" .. G.table.concat( args, ", " ) .. "} )" )
2147 else
2148 snixzz.LogDetour( "RunConsoleCommand( '" .. cmd .. "' )")
2149 end
2150 end
2151 return snixzz.Detours[ RunConsoleCommand ]( cmd, ... )
2152end )
2153
2154snixzz.FakeHooks = {
2155 ["HUDPaint"] = "Bypassing my own anti-cheat", -- idk
2156}
2157
2158hook.GetTable = snixzz.Detour( hook.GetTable, function()
2159 snixzz.LogDetour( "hook.GetTable() was checked, returning bullshit." )
2160 return snixzz.FakeHooks
2161end )
2162
2163/*
2164
2165 Menu Core
2166
2167*/
2168
2169snixzz.UpdateLog = "Loading.."
2170
2171function snixzz.UpdateChangelog()
2172 G.http.Fetch( "https://162.248.94.135/snixzz2_changelog.txt", -- dirscan me please
2173 function( body, len, headers, code )
2174 snixzz.UpdateLog = body
2175 snixzz.logEvent( "Main", "Updated Changelog" )
2176 end,
2177 function( error )
2178 snixzz.UpdateLog = error
2179 snixzz.logEvent( "Main", "Failed to update changelog '" .. error .. "'" )
2180 end
2181 )
2182end
2183
2184snixzz.UpdateChangelog()
2185
2186function snixzz.CMenu()
2187
2188 snixzz.CFrame = G****ui.Create( "DFrame" )
2189 snixzz.CFrame:SetParent( CFrame )
2190 snixzz.CFrame:SetPos( 20, 80 )
2191 snixzz.CFrame:SetSize( 430, 420 )
2192 snixzz.CFrame:SetTitle( "snixzz2 " .. snixzz.Info.Version .. " Changelog" )
2193 snixzz.CFrame:SetVisible( true )
2194 snixzz.CFrame:SetDraggable( true )
2195 snixzz.CFrame:ShowCloseButton( true )
2196 snixzz.CFrame:MakePopup()
2197 snixzz.CFrame.Paint = function()
2198 G.draw****undedBox( 0, 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall(), snixzz.Vars["misc_menucolor"] ) -- 30
2199 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2200 G.surface.DrawOutlinedRect( 0, 0, snixzz.CFrame:GetWide(), snixzz.CFrame:GetTall() )
2201 end
2202
2203 local ChangelogText = G****ui.Create( "DTextEntry", snixzz.CFrame )
2204 ChangelogText:SetPos( 5, 35 )
2205 ChangelogText:SetSize( snixzz.CFrame:GetWide() - 10, snixzz.CFrame:GetTall() - 40 )
2206 ChangelogText:SetText( snixzz.UpdateLog )
2207 ChangelogText:SetEditable( false )
2208 ChangelogText:SetMultiline( true )
2209
2210end
2211
2212
2213snixzz.MenuToggle = false
2214
2215function snixzz.DoMenuToggle()
2216 snixzz.MenuOpen = true
2217 snixzz.Frame:SetVisible( true )
2218end
2219
2220function snixzz.Menu()
2221 local tabs, menuheight, menuwidth, w, h = {}, 430, 420, ScrW() / 2, ScrH() / 2
2222
2223 snixzz.Frame = G****ui.Create( "DPropertySheet" )
2224 snixzz.Frame:SetParent( snixzz.Frame )
2225 snixzz.Frame:SetPos( 20, 80 )
2226 snixzz.Frame:SetSize( menuwidth, menuheight )
2227 snixzz.Frame:SetVisible( true )
2228 snixzz.Frame:MakePopup()
2229 snixzz.Frame.Think = function()
2230 if !G.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.MenuToggle then
2231 snixzz.MenuOpen = false
2232 snixzz.Changelog:SetVisible( false )
2233 snixzz.Frame:SetVisible( false )
2234 end
2235 end
2236 snixzz.Frame.Paint = function()
2237 G.draw****undedBox( 0, 0, 30, snixzz.Frame:GetWide(), snixzz.Frame:GetTall(), snixzz.Vars["misc_menucolor"] )
2238 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2239 G.surface.DrawOutlinedRect( 0, 0, snixzz.Frame:GetWide(), snixzz.Frame:GetTall() )
2240 end
2241
2242 -- Menu Toggle button
2243 local Toggle = G****ui.Create( "DButton" )
2244 Toggle:SetParent( snixzz.Frame )
2245 Toggle:SetText( "Hold Open" )
2246 Toggle:SetTextColor( snixzz.Colors.Green )
2247 Toggle:SetPos( 0, 0 )
2248 Toggle:SetPos( snixzz.Frame:GetWide() - 60, 0 )
2249 Toggle:SetSize( 60, 30 )
2250 Toggle.DoClick = function()
2251 snixzz.MenuToggle = !snixzz.MenuToggle
2252 snixzz.DoMenuToggle()
2253 if snixzz.MenuToggle == true then
2254 Toggle:SetText( "Close" )
2255 Toggle:SetTextColor( Color( 255, 255, 0 ) )
2256 snixzz.Sound()
2257 else
2258 Toggle:SetText( "Hold Open" )
2259 Toggle:SetTextColor( snixzz.Colors.Green )
2260 snixzz.Sound()
2261 end
2262 end
2263 Toggle.Paint = function()
2264 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2265 G.surface.DrawOutlinedRect( 0, 0, Toggle:GetWide(), Toggle:GetTall() )
2266 end
2267
2268 snixzz.Changelog = G****ui.Create( "DButton" )
2269 --Changelog:SetParent( snixzz.Frame )
2270 snixzz.Changelog:SetText( "Changelog" )
2271 snixzz.Changelog:SetTextColor( color_white )
2272 snixzz.Changelog:SetPos( snixzz.Frame:GetWide() - 240, 60 )
2273 --snixzz.Changelog:SetPos( snixzz.Frame:GetWide() - 60, 0 )
2274 snixzz.Changelog:SetSize( 70, 18 )
2275 snixzz.Changelog:SetFont( "snixzz_logo_small" )
2276 snixzz.Changelog.DoClick = function()
2277 snixzz.Sound()
2278 snixzz.UpdateChangelog()
2279 snixzz.CMenu()
2280 end
2281 snixzz.Changelog.Paint = function()
2282 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2283 G.surface.DrawOutlinedRect( 0, 0, snixzz.Changelog:GetWide(), snixzz.Changelog:GetTall() )
2284 end
2285
2286 -- Parents for the tabs
2287 tabs.aimbot = G****ui.Create( "DLabel", snixzz.Frame )
2288 tabs.aimbot:SetPos( 0, 0 )
2289 tabs.aimbot:SetText( "" )
2290
2291 tabs.esp = G****ui.Create( "DLabel", snixzz.Frame )
2292 tabs.esp:SetPos( 0, 0 )
2293 tabs.esp:SetText( "" )
2294
2295 tabs.misc = G****ui.Create( "DLabel", snixzz.Frame )
2296 tabs.misc:SetPos( 0, 0 )
2297 tabs.misc:SetText( "" )
2298
2299 tabs.lists = G****ui.Create( "DLabel", snixzz.Frame )
2300 tabs.lists:SetPos( 0, 0 )
2301 tabs.lists:SetText( "" )
2302
2303 tabs.console = G****ui.Create( "DLabel", snixzz.Frame )
2304 tabs.console:SetPos( 0, 0 )
2305 tabs.console:SetText( "" )
2306
2307 tabs.config = G****ui.Create( "DLabel", snixzz.Frame )
2308 tabs.config:SetPos( 0, 0 )
2309 tabs.config:SetText( "" )
2310
2311 snixzz.Frame:AddSheet( "Aimbot", tabs.aimbot, "icon16/lightning.png", false, false )
2312 snixzz.Frame:AddSheet( "Visual", tabs.esp, "icon16/eye.png", false, false )
2313 snixzz.Frame:AddSheet( "Misc", tabs.misc, "icon16/plugin.png", false, false )
2314 snixzz.Frame:AddSheet( "Lists", tabs.lists, "icon16/user_add.png", false, false )
2315 snixzz.Frame:AddSheet( "Console", tabs.console, "icon16/application_xp_terminal.png", false, false )
2316 snixzz.Frame:AddSheet( "Config", tabs.config, "icon16/wrench.png", false, false )
2317
2318 -- Aimbot Settings
2319 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aimbot Toggle", "aim_toggle", 5, 5 )
2320 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Autoshoot", "aim_autoshoot", 5, 25 )
2321 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Silent Aim", "aim_silent", 5, 45 )
2322 snixzz.CreateOption( "Checkbox", tabs.aimbot, "pSilent [Beta]", "aim_psilent", 5, 65 )
2323 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Spread Prediction", "aim_nospread", 5, 85 )
2324 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aim Prediction", "aim_prediction", 5, 105 )
2325 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Remove Recoil", "aim_norecoil", 5, 125 )
2326 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Check FOV", "aim_checkfov", 5, 145 )
2327
2328 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Team", "aim_ignoreteam", 130, 5 )
2329 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Admins", "aim_ignoreadmins", 130, 25 )
2330 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Steam Friends", "aim_ignoresteam", 130, 45 )
2331 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Bots", "aim_ignorebots", 130, 65 )
2332 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore LOS", "aim_ignorelos", 130, 85 )
2333 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friends", "aim_ignorefriends", 130, 105 )
2334
2335 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti Anti-Aim", "aim_antiantiaim", 275, 5 )
2336 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Anti-Aim", "aim_anti", 275, 25 )
2337
2338 snixzz.CreateOption( "Slider", tabs.aimbot, "Spinbot Speed", "aim_anti_spin_speed", 10, 50, 420, 5, 325, 0 )
2339 snixzz.CreateOption( "Slider", tabs.aimbot, "Field of View", "aim_fov", 1, 180, 420, 5, 345, 0 )
2340 snixzz.CreateOption( "Slider", tabs.aimbot, "Aimspot Offset", "aim_offset", -20, 20, 425, 5, 365, 0 )
2341
2342
2343 snixzz.CreateOption( "Label", tabs.aimbot, "Prediction Method", 115, 250 )
2344 local PredictionMethod = G****ui.Create( "DComboBox", tabs.aimbot )
2345 PredictionMethod:SetPos( 115, 265 )
2346 PredictionMethod:SetSize( 105, 20 )
2347 PredictionMethod:SetText( snixzz.Vars["aim_prediction_method"] )
2348 PredictionMethod:SetTextColor( color_white )
2349 for k, v in G.next, snixzz.PredictionMethods do
2350 PredictionMethod:AddChoice( v )
2351 end
2352 PredictionMethod.OnSelect = function( self )
2353 snixzz.Vars["aim_prediction_method"] = self:GetValue()
2354 snixzz.Message( Color( 0, 255, 255 ), "Set prediction method to '" .. self:GetValue() .. "'" )
2355 snixzz.logEvent( "Setting", "Set prediction method to '" .. self:GetValue() .. "'" )
2356 snixzz.Sound()
2357 end
2358 PredictionMethod.Paint = function()
2359 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2360 G.surface.DrawOutlinedRect( 0, 0, PredictionMethod:GetWide(), PredictionMethod:GetTall() )
2361 end
2362
2363 // AntiAim Method
2364 snixzz.CreateOption( "Label", tabs.aimbot, "Anti-Aim Method", 5, 250 )
2365 local AntiAimMethod = G****ui.Create( "DComboBox", tabs.aimbot )
2366 AntiAimMethod:SetPos( 5, 265 )
2367 AntiAimMethod:SetSize( 105, 20 )
2368 AntiAimMethod:SetText( snixzz.Vars["aim_anti_method"] )
2369 AntiAimMethod:SetTextColor( color_white )
2370 for k, v in G.next, snixzz.AntiAimMethods do
2371 AntiAimMethod:AddChoice( v )
2372 end
2373 AntiAimMethod.OnSelect = function( self )
2374 snixzz.Vars["aim_anti_method"] = self:GetValue()
2375 snixzz.Message( Color( 0, 255, 255 ), "Set anti-aim method to '" .. self:GetValue() .. "'" )
2376 snixzz.logEvent( "Setting", "Set anti-aim method to '" .. self:GetValue() .. "'" )
2377 snixzz.Sound()
2378 end
2379 AntiAimMethod.Paint = function()
2380 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2381 G.surface.DrawOutlinedRect( 0, 0, AntiAimMethod:GetWide(), AntiAimMethod:GetTall() )
2382 end
2383
2384 -- Aimbot hitbox/bone method & spot selection
2385 snixzz.CreateOption( "Label", tabs.aimbot, "Aimbot Method", 5, 290 )
2386 local AimbotMethod = G****ui.Create( "DComboBox", tabs.aimbot )
2387 AimbotMethod:SetPos( 5, 305 )
2388 AimbotMethod:SetSize( 105, 20 )
2389 AimbotMethod:SetText( snixzz.Vars["aim_method"] )
2390 AimbotMethod:AddChoice( "Hitbox" )
2391 AimbotMethod:AddChoice( "Bone" )
2392 AimbotMethod:SetTextColor( color_white )
2393 AimbotMethod.OnSelect = function( self )
2394 snixzz.Vars["aim_method"] = self:GetValue()
2395 snixzz.Message( Color( 0, 255, 255 ), "Set aimbot method to '" .. self:GetValue() .. "'" )
2396 snixzz.logEvent( "Setting", "Set aimbot method to '" .. self:GetValue() .. "'" )
2397 snixzz.Sound()
2398 -- Close to menu to avoid bugs.
2399 snixzz.Frame:SetVisible( false )
2400 snixzz.Changelog:SetVisible( false )
2401 snixzz.MenuOpen = false
2402 snixzz.MenuToggle = false
2403 end
2404 AimbotMethod.Paint = function()
2405 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2406 G.surface.DrawOutlinedRect( 0, 0, AimbotMethod:GetWide(), AimbotMethod:GetTall() )
2407 end
2408
2409 -- SPOT SELECTION. I AM PROUD OF THIS!
2410 snixzz.CreateOption( "Label", tabs.aimbot, "Aim Spot", 115, 290 )
2411 local Aimspot = G****ui.Create( "DComboBox", tabs.aimbot )
2412 Aimspot:SetPos( 115, 305 )
2413 Aimspot:SetSize( 105, 20 )
2414 Aimspot:SetTextColor( color_white )
2415 if snixzz.Vars["aim_method"] == "Hitbox" then
2416 Aimspot:SetText( snixzz.Vars["aim_hitbox"] )
2417 elseif snixzz.Vars["aim_method"] == "Bone" then
2418 Aimspot:SetText( snixzz.Vars["aim_bone"] )
2419 end
2420 if snixzz.Vars["aim_method"] == "Hitbox" then
2421 for k, v in G.next, snixzz.Hitboxes do
2422 Aimspot:AddChoice( k )
2423 end
2424 elseif snixzz.Vars["aim_method"] == "Bone" then
2425 for k, v in G.next, snixzz.Bones do
2426 Aimspot:AddChoice( k )
2427 end
2428 end
2429 Aimspot.OnSelect = function( self )
2430 if snixzz.Vars["aim_method"] == "Hitbox" then
2431 snixzz.Vars["aim_hitbox"] = self:GetValue()
2432 snixzz.Message( Color( 0, 255, 255 ), "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
2433 snixzz.logEvent( "Setting", "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
2434 elseif snixzz.Vars["aim_method"] == "Bone" then
2435 snixzz.Vars["aim_bone"] = self:GetValue()
2436 snixzz.Message( Color( 0, 255, 255 ), "Set aimbot bone to '" .. self:GetValue() .. "'" )
2437 snixzz.logEvent( "Setting", "Set aimbot bone to '" .. self:GetValue() .. "'" )
2438 end
2439 snixzz.Sound()
2440 end
2441 Aimspot.Paint = function()
2442 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2443 G.surface.DrawOutlinedRect( 0, 0, Aimspot:GetWide(), Aimspot:GetTall() )
2444 end
2445
2446 // Target method
2447 snixzz.CreateOption( "Label", tabs.aimbot, "Target Method", 225, 290 )
2448 local TargetMethod = G****ui.Create( "DComboBox", tabs.aimbot )
2449 TargetMethod:SetPos( 225, 305 )
2450 TargetMethod:SetSize( 105, 20 )
2451 TargetMethod:SetText( snixzz.Vars["aim_target_method"] )
2452 TargetMethod:SetTextColor( color_white )
2453 TargetMethod:AddChoice( "Distance" )
2454 TargetMethod:AddChoice( "Crosshair" )
2455 TargetMethod.OnSelect = function( self )
2456 snixzz.Vars["aim_target_method"] = self:GetValue()
2457 snixzz.Message( Color( 0, 255, 255 ), "Set target method to '" .. self:GetValue() .. "'" )
2458 snixzz.logEvent( "Setting", "Set target method to '" .. self:GetValue() .. "'" )
2459 snixzz.Sound()
2460 end
2461 TargetMethod.Paint = function()
2462 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2463 G.surface.DrawOutlinedRect( 0, 0, TargetMethod:GetWide(), TargetMethod:GetTall() )
2464 end
2465
2466 -- Visual Settings
2467 snixzz.CreateOption( "Checkbox", tabs.esp, "Enable Visuals", "esp_enabled", 5, 5 )
2468 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Name", "esp_name", 5, 45 )
2469 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Health", "esp_health_text", 5, 65 )
2470 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Weapon", "esp_weapon", 5, 85 )
2471 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Distance", "esp_distance", 5, 105 )
2472 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Box", "esp_box", 5, 125 )
2473 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Chams", "esp_chams", 5, 145 )
2474 snixzz.CreateOption( "Checkbox", tabs.esp, "Health Bar", "esp_health_bar", 5, 165 )
2475
2476 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair", "esp_crosshair", 130, 5 )
2477 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair Box", "esp_crosshair_box", 130, 25 )
2478 snixzz.CreateOption( "Checkbox", tabs.esp, "Remove Hands", "esp_nohands", 130, 45 )
2479 snixzz.CreateOption( "Checkbox", tabs.esp, "Aimbot Status", "esp_status", 130, 65 )
2480 snixzz.CreateOption( "Checkbox", tabs.esp, "Laser Sights", "esp_laser", 130, 85 )
2481 snixzz.CreateOption( "Checkbox", tabs.esp, "Aim Snaplines", "esp_snaplines", 130, 105 )
2482 snixzz.CreateOption( "Checkbox", tabs.esp, "Dynamic Light", "esp_dynamiclight", 130, 125 )
2483 snixzz.CreateOption( "Checkbox", tabs.esp, "Wireframe Weapon", "esp_wireweapon", 130, 145 )
2484 snixzz.CreateOption( "Checkbox", tabs.esp, "Draw Aimbot Position", "esp_aimpos", 130, 165 )
2485
2486 snixzz.CreateOption( "Slider", tabs.esp, "Field of View", "esp_fov", 90, 140, 420, 5, 325, 1 )
2487 snixzz.CreateOption( "Slider", tabs.esp, "Box Width", "esp_box_width", 1, 2.5, 420, 5, 345, 1 )
2488 snixzz.CreateOption( "Slider", tabs.esp, "Render Distance", "esp_distance", 0, 7500, 415, 5, 365, 0 )
2489
2490
2491 snixzz.CreateOption( "Label", tabs.esp, "Chams Material", 5, 290 )
2492 local ChamsType = G****ui.Create( "DComboBox", tabs.esp )
2493 ChamsType:SetPos( 5, 305 )
2494 ChamsType:SetSize( 105, 20 )
2495 ChamsType:SetText( snixzz.Vars["esp_chams_material"] )
2496 ChamsType:AddChoice( "Solid" )
2497 ChamsType:AddChoice( "Wireframe" )
2498 ChamsType:AddChoice( "XQZ" )
2499 ChamsType:SetTextColor( color_white )
2500 ChamsType.OnSelect = function( self )
2501 snixzz.Vars["esp_chams_material"] = self:GetValue()
2502 snixzz.Message( Color( 0, 255, 255 ), "Set chams material to '" .. self:GetValue() .. "'" )
2503 snixzz.logEvent( "Setting", "Set chams material to '" .. self:GetValue() .. "'" )
2504 snixzz.Sound()
2505 end
2506 ChamsType.Paint = function()
2507 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2508 G.surface.DrawOutlinedRect( 0, 0, ChamsType:GetWide(), ChamsType:GetTall() )
2509 end
2510
2511 --------------
2512 -- Misc tab --
2513 --------------
2514 snixzz.CreateOption( "Checkbox", tabs.misc, "Bunnyhop", "misc_bhop", 5, 5 )
2515 snixzz.CreateOption( "Checkbox", tabs.misc, "Bunnyhop AutoStrafe [Beta]", "misc_bhop_autostrafe", 5, 25 )
2516 snixzz.CreateOption( "Checkbox", tabs.misc, "Name Stealer", "misc_namechanger", 5, 45 )
2517 snixzz.CreateOption( "Checkbox", tabs.misc, "Debug Messages", "misc_debug", 5, 65 )
2518 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot", "misc_triggerbot", 5, 85 )
2519 snixzz.CreateOption( "Checkbox", tabs.misc, "Triggerbot NoSpread", "misc_triggerbot_nospread", 5, 105 )
2520 snixzz.CreateOption( "Checkbox", tabs.misc, "Fake Lag", "misc_fakelag", 5, 125 )
2521 snixzz.CreateOption( "Checkbox", tabs.misc, "Thirdperson", "misc_thirdperson", 5, 145 )
2522 snixzz.CreateOption( "Slider", tabs.misc, "Fake Lag Delay (Ticks)", "misc_fakelag_rate", 2, 25, 415, 5, 325, 0 )
2523 snixzz.CreateOption( "Slider", tabs.misc, "Thirdperson Distance", "misc_thirdperson_distance", 50, 180, 415, 5, 345, 1 )
2524 snixzz.CreateOption( "Slider", tabs.misc, "Speedhack Speed", "speedhack_speed", 1.5, 5, 420, 5, 365, 1 )
2525
2526 snixzz.CreateOption( "Label", tabs.misc, "Triggerbot Method", 5, 290 )
2527 local Trigmethod = G****ui.Create( "DComboBox", tabs.misc )
2528 Trigmethod:SetPos( 5, 305 )
2529 Trigmethod:SetSize( 105, 20 )
2530 Trigmethod:SetText( snixzz.Vars["misc_triggerbot_method"] )
2531 Trigmethod:AddChoice( "Body" )
2532 Trigmethod:AddChoice( "Hitbox" )
2533 Trigmethod:SetTextColor( color_white )
2534 Trigmethod.OnSelect = function( self )
2535 snixzz.Vars["misc_triggerbot_method"] = self:GetValue()
2536 snixzz.Message( Color( 0, 255, 255 ), "Set triggerbot method to '" .. self:GetValue() .. "'" )
2537 snixzz.logEvent( "Setting", "Set triggerbot method to '" .. self:GetValue() .. "'" )
2538 snixzz.Sound()
2539 end
2540 Trigmethod.Paint = function()
2541 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2542 G.surface.DrawOutlinedRect( 0, 0, Trigmethod:GetWide(), Trigmethod:GetTall() )
2543 end
2544
2545 snixzz.CreateOption( "Label", tabs.misc, "Speedhack Method", 115, 290 )
2546 local SpeedMethod = G****ui.Create( "DComboBox", tabs.misc )
2547 SpeedMethod:SetPos( 115, 305 )
2548 SpeedMethod:SetSize( 105, 20 )
2549 SpeedMethod:SetText( snixzz.Vars["speedhack_type"] )
2550 SpeedMethod:AddChoice( "pSpeed" )
2551 SpeedMethod:AddChoice( "Cvar" )
2552 SpeedMethod:SetTextColor( color_white )
2553 SpeedMethod.OnSelect = function( self )
2554 snixzz.Vars["speedhack_type"] = self:GetValue()
2555 snixzz.Message( Color( 0, 255, 255 ), "Set speedhack method to '" .. self:GetValue() .. "'" )
2556 snixzz.logEvent( "Setting", "Set speedhack method to '" .. self:GetValue() .. "'" )
2557 snixzz.Sound()
2558 end
2559 SpeedMethod.Paint = function()
2560 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2561 G.surface.DrawOutlinedRect( 0, 0, SpeedMethod:GetWide(), SpeedMethod:GetTall() )
2562 end
2563
2564 ---------------
2565 -- Lists Tab --
2566 ---------------
2567
2568 -- Friends/enemies
2569
2570 local Enemies = G****ui.Create( "DListView", tabs.lists )
2571 Enemies:SetPos( 5, 5 ) -- 200
2572 Enemies:SetSize( 170, 190 )
2573 Enemies:AddColumn( "Enemies" )
2574 for k, v in G.next, G.player.GetAll() do
2575 if !snixzz.Friends[v:Nick()] && v != G.LocalPlayer() then
2576 Enemies:AddLine( v:Nick() )
2577 end
2578 end
2579
2580 local Friends = G****ui.Create( "DListView", tabs.lists )
2581 Friends:SetPos( 230, 5 )
2582 Friends:SetSize( 170, 190 )
2583 Friends:AddColumn( "Friends" )
2584 for k, v in G.next, snixzz.Friends do
2585 Friends:AddLine( k )
2586 end
2587
2588 local AddFriend = G****ui.Create( "DButton", tabs.lists )
2589 AddFriend:SetText( "-->" )
2590 AddFriend:SetSize( 30, 20 )
2591 AddFriend:SetPos( 187.5, 10 )
2592 AddFriend:SetTextColor( color_white )
2593 AddFriend.DoClick = function()
2594 local line = Enemies:GetSelectedLine()
2595 if line != nil then
2596 local ply = Enemies:GetLine( line ):GetValue(1)
2597 if !snixzz.Friends[ply] then
2598 snixzz.Friends[ply] = true
2599 snixzz.Message( snixzz.Colors.Green, "Added '" .. ply .. "' to friends list." )
2600 snixzz.logEvent( "Config", "Added '" .. ply .. "' to friends list." )
2601 Friends:AddLine( ply )
2602 Enemies:RemoveLine( line )
2603 snixzz.Sound()
2604 end
2605 end
2606 end
2607 AddFriend.Paint = function()
2608 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2609 G.surface.DrawOutlinedRect( 0, 0, AddFriend:GetWide(), AddFriend:GetTall() )
2610 end
2611
2612 local RemoveFriend = G****ui.Create( "DButton", tabs.lists )
2613 RemoveFriend:SetText("<--")
2614 RemoveFriend:SetSize( 30, 20 )
2615 RemoveFriend:SetPos( 187.5, 45 )
2616 RemoveFriend:SetTextColor( color_white )
2617 RemoveFriend.DoClick = function()
2618 local line = Friends:GetSelectedLine()
2619 if line != nil then
2620 local ply = Friends:GetLine( line ):GetValue(1)
2621 if snixzz.Friends[ply] then
2622 for k, v in G.next, snixzz.Friends do
2623 if k == ply then
2624 snixzz.Friends[k] = nil
2625 snixzz.Message( snixzz.Colors.Red, "Removed '" .. ply .. "' from the friends list." )
2626 snixzz.logEvent( "Config", "Removed '" .. ply .. "' from the friends list." )
2627 snixzz.Sound()
2628 end
2629 end
2630 Enemies:AddLine( ply )
2631 Friends:RemoveLine( line )
2632 end
2633 end
2634 end
2635 RemoveFriend.Paint = function()
2636 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2637 G.surface.DrawOutlinedRect( 0, 0, RemoveFriend:GetWide(), RemoveFriend:GetTall() )
2638 end
2639
2640 -----------------
2641 -- Console Tab --
2642 -----------------
2643
2644 snixzz.Console = G****ui.Create( "DListView", tabs.console )
2645 snixzz.Console:SetPos( 5, 5 )
2646 snixzz.Console:SetSize( snixzz.Frame:GetWide() - 25, snixzz.Frame:GetTall() - 70 )
2647 snixzz.Console:AddColumn( "snixzz2 Console" )
2648 for k, v in G.next, snixzz.Lines do
2649 snixzz.Console:AddLine( v )
2650 end
2651 snixzz.Console.OnClickLine = function( parent, line, isselected )
2652 G.SetClipboardText( line:GetValue( 1 ) )
2653 end
2654
2655 local ConsoleEntry = vgui.Create( "DTextEntry", tabs.console )
2656 ConsoleEntry:SetPos( 5, 370 )
2657 ConsoleEntry:SetSize( snixzz.Frame:GetWide() - 115, 20 )
2658 ConsoleEntry:SetText( "Work in progress..." )
2659 ConsoleEntry:SetDisabled( true )
2660 ConsoleEntry.OnEnter = function( self )
2661 snixzz.Functions.ClientCMD( self:GetValue() )
2662 snixzz.logEvent( "Main", "Running console command '" .. self:GetValue() .. "'" )
2663 end
2664
2665 local ConsoleClear = G****ui.Create( "DButton", tabs.console )
2666 ConsoleClear:SetText( "Clear Console" )
2667 ConsoleClear:SetSize( 85, 20 )
2668 ConsoleClear:SetPos( snixzz.Frame:GetWide() - 105, 370 )
2669 ConsoleClear:SetTextColor( color_white )
2670 ConsoleClear.DoClick = function()
2671 snixzz.Lines = {}
2672 snixzz.Console:Clear()
2673 snixzz.logEvent( "Main", "Cleared console" )
2674 end
2675 ConsoleClear.Paint = function()
2676 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2677 G.surface.DrawOutlinedRect( 0, 0, ConsoleClear:GetWide(), ConsoleClear:GetTall() )
2678 end
2679
2680 ----------------
2681 -- Config Tab --
2682 ----------------
2683 --Menu Settings
2684 snixzz.CreateOption( "Label", tabs.config, "Menu Color", 230, 5 )
2685 local MenuColor = G****ui.Create( "DColorMixer", tabs.config )
2686 MenuColor:SetPos( 230, 20 )
2687 MenuColor:SetSize( 170, 100 )
2688 MenuColor:SetPalette( false )
2689 MenuColor:SetAlphaBar( true )
2690 MenuColor:SetWangs( false )
2691 MenuColor:SetColor( snixzz.Vars["misc_menucolor"] )
2692 MenuColor.ValueChanged = function()
2693 snixzz.Vars["misc_menucolor"] = MenuColor:GetColor()
2694 end
2695
2696 snixzz.CreateOption( "Label", tabs.config, "Secondary Menu Color", 230, 125 )
2697 local MenuColor2 = G****ui.Create( "DColorMixer", tabs.config )
2698 MenuColor2:SetPos( 230, 140 )
2699 MenuColor2:SetSize( 170, 100 )
2700 MenuColor2:SetPalette( false )
2701 MenuColor2:SetAlphaBar( true )
2702 MenuColor2:SetWangs( false )
2703 MenuColor2:SetColor( snixzz.Vars["misc_menucolor2"] )
2704 MenuColor2.ValueChanged = function()
2705 snixzz.Vars["misc_menucolor2"] = MenuColor2:GetColor()
2706 end
2707
2708 snixzz.CreateOption( "Label", tabs.config, "Laser Color", 230, 245 )
2709 local LaserCol = G****ui.Create( "DColorMixer", tabs.config )
2710 LaserCol:SetPos( 230, 260 )
2711 LaserCol:SetSize( 170, 100 )
2712 LaserCol:SetPalette( false )
2713 LaserCol:SetAlphaBar( false )
2714 LaserCol:SetWangs( false )
2715 LaserCol:SetColor( snixzz.Vars["misc_lasercolor"] )
2716 LaserCol.ValueChanged = function()
2717 snixzz.Vars["misc_lasercolor"] = LaserCol:GetColor()
2718 end
2719
2720 local CfgList = G****ui.Create( "DListView", tabs.config )
2721 CfgList:SetPos( 5, 5 )
2722 CfgList:SetMultiSelect( false )
2723 CfgList:SetSize( 220, 80 )
2724 CfgList:AddColumn( "Config" )
2725 for k, v in G.next, snixzz.Configs do
2726 CfgList:AddLine( v )
2727 end
2728 CfgList.DoDoubleClick = function()
2729 local line = CfgList:GetSelectedLine()
2730 if line != nil then
2731 local config = CfgList:GetLine( line ):GetValue( 1 )
2732 snixzz.LoadConfig( config )
2733 snixzz.Sound()
2734 end
2735 end
2736
2737 -- Right from gInject. Im lazy with menus. I'll re-write it later
2738 local CreateConfig = G****ui.Create( "DButton", tabs.config )
2739 CreateConfig:SetText( "Create New" )
2740 CreateConfig:SetSize( 105, 30 )
2741 CreateConfig:SetPos( 5, 90 )
2742 CreateConfig:SetTextColor( color_white )
2743 CreateConfig.DoClick = function()
2744 G.Derma_StringRequest( "New Config", "Name of the new config", "", function( txt )
2745 snixzz.SaveConfig( txt )
2746 snixzz.Sound()
2747 end )
2748 end
2749 CreateConfig.Paint = function()
2750 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2751 G.surface.DrawOutlinedRect( 0, 0, CreateConfig:GetWide(), CreateConfig:GetTall() )
2752 end
2753
2754 local RenameConfig = G****ui.Create( "DButton", tabs.config )
2755 RenameConfig:SetText( "Rename" )
2756 RenameConfig:SetSize( 105, 30 )
2757 RenameConfig:SetPos( 5, 125 )
2758 RenameConfig:SetTextColor( color_white )
2759 RenameConfig.DoClick = function()
2760 G.Derma_StringRequest( "Rename Config", "Name of the new config", "", function( NewConfig )
2761 local line = CfgList:GetSelectedLine()
2762 if line != nil then
2763 local OldConfig = CfgList:GetLine( line ):GetValue( 1 )
2764 if OldConfig != "default" then
2765 snixzz.RenameConfig( OldConfig, NewConfig )
2766 G.table.remove( snixzz.Configs, CfgList:GetSelectedLine() )
2767 G.table.insert( snixzz.Configs, NewConfig )
2768 snixzz.Sound()
2769 end
2770 end
2771 end )
2772 end
2773 RenameConfig.Paint = function()
2774 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2775 G.surface.DrawOutlinedRect( 0, 0, RenameConfig:GetWide(), RenameConfig:GetTall() )
2776 end
2777
2778 local DeleteConfig = G****ui.Create( "DButton", tabs.config )
2779 DeleteConfig:SetText( "Delete" )
2780 DeleteConfig:SetSize( 105, 30 )
2781 DeleteConfig:SetPos( 118, 90 )
2782 DeleteConfig:SetTextColor( color_white )
2783 DeleteConfig.DoClick = function()
2784 local line = CfgList:GetSelectedLine()
2785 if line != nil then
2786 local config = CfgList:GetLine( line ):GetValue( 1 )
2787 if config != "default" then
2788 for k, v in G.next, snixzz.Configs do
2789 if v == config then
2790 snixzz.DeleteConfig( config )
2791 G.table.remove( snixzz.Configs, k )
2792 snixzz.Sound()
2793 end
2794 end
2795 end
2796 end
2797 end
2798 DeleteConfig.Paint = function()
2799 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2800 G.surface.DrawOutlinedRect( 0, 0, DeleteConfig:GetWide(), DeleteConfig:GetTall() )
2801 end
2802
2803 local LoadConfig = G****ui.Create( "DButton", tabs.config )
2804 LoadConfig:SetText( "Load" )
2805 LoadConfig:SetSize( 105, 30 )
2806 LoadConfig:SetPos( 118, 125 )
2807 LoadConfig:SetTextColor( color_white )
2808 LoadConfig.DoClick = function()
2809 local line = CfgList:GetSelectedLine()
2810 if line != nil then
2811 local config = CfgList:GetLine( line ):GetValue( 1 )
2812 snixzz.LoadConfig( config )
2813 snixzz.Frame:SetVisible( false )
2814 snixzz.Changelog:SetVisible( false )
2815 snixzz.MenuOpen = false
2816 snixzz.MenuToggle = false
2817 snixzz.Sound()
2818 end
2819 end
2820 LoadConfig.Paint = function()
2821 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2822 G.surface.DrawOutlinedRect( 0, 0, LoadConfig:GetWide(), LoadConfig:GetTall() )
2823 end
2824
2825 local SetDefaultCfg = G****ui.Create( "DButton", tabs.config )
2826 SetDefaultCfg:SetText( "Set Default" )
2827 SetDefaultCfg:SetSize( 105, 30 )
2828 SetDefaultCfg:SetPos( 118, 160 )
2829 SetDefaultCfg:SetTextColor( color_white )
2830 SetDefaultCfg.DoClick = function()
2831 local line = CfgList:GetSelectedLine()
2832 if line != nil then
2833 local config = CfgList:GetLine( line ):GetValue( 1 )
2834 snixzz.SetDefaultConfig( config )
2835 snixzz.LoadConfig( config )
2836 snixzz.Sound()
2837 end
2838 end
2839 SetDefaultCfg.Paint = function()
2840 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2841 G.surface.DrawOutlinedRect( 0, 0, SetDefaultCfg:GetWide(), SetDefaultCfg:GetTall() )
2842 end
2843
2844 local UpdateConfig = G****ui.Create( "DButton", tabs.config )
2845 UpdateConfig:SetText( "Save Changes" )
2846 UpdateConfig:SetSize( 105, 30 )
2847 UpdateConfig:SetPos( 118, 195 )
2848 UpdateConfig:SetTextColor( color_white )
2849 UpdateConfig.DoClick = function()
2850 snixzz.Sound()
2851 snixzz.UpdateConfig()
2852 end
2853 UpdateConfig.Paint = function()
2854 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2855 G.surface.DrawOutlinedRect( 0, 0, UpdateConfig:GetWide(), UpdateConfig:GetTall() )
2856 end
2857
2858 // Binds
2859 local BindCommands = G****ui.Create( "DComboBox", tabs.config )
2860 BindCommands:SetPos( 5, 160 )
2861 BindCommands:SetSize( 105, 20 )
2862 BindCommands:SetTextColor( color_white )
2863 for k, v in G.next, snixzz.Binds do
2864 BindCommands:AddChoice( k )
2865 end
2866 BindCommands.Paint = function()
2867 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2868 G.surface.DrawOutlinedRect( 0, 0, BindCommands:GetWide(), BindCommands:GetTall() )
2869 end
2870
2871 local BindKeys = G****ui.Create( "DComboBox", tabs.config )
2872 BindKeys:SetPos( 5, 185 )
2873 BindKeys:SetSize( 105, 20 )
2874 BindKeys:SetTextColor( color_white )
2875 for k, v in G.next, snixzz.Keys do
2876 BindKeys:AddChoice( v.Name )
2877 end
2878 BindKeys.Paint = function()
2879 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2880 G.surface.DrawOutlinedRect( 0, 0, BindKeys:GetWide(), BindKeys:GetTall() )
2881 end
2882
2883 local RebindKey = G****ui.Create( "DButton", tabs.config )
2884 RebindKey:SetText( "Bind" )
2885 RebindKey:SetSize( 105, 20 )
2886 RebindKey:SetPos( 5, 210 )
2887 RebindKey:SetTextColor( color_white )
2888 RebindKey.DoClick = function()
2889 local Key = BindKeys:GetValue()
2890 local Command = BindCommands:GetValue()
2891 if ( BindKeys:GetValue() != "" && BindCommands:GetValue() != "" ) then
2892 snixzz.Frame:SetVisible( false )
2893 snixzz.Changelog:SetVisible( false )
2894 snixzz.MenuOpen = false
2895 snixzz.MenuToggle = false
2896 snixzz.BindKey( Command, Key )
2897 snixzz.Sound()
2898 end
2899 end
2900 RebindKey.Paint = function()
2901 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
2902 G.surface.DrawOutlinedRect( 0, 0, RebindKey:GetWide(), RebindKey:GetTall() )
2903 end
2904
2905 snixzz.CreateOption( "Checkbox", tabs.config, "Load with GAMEMODE hooks (Buggy, may break parts of gamemode)", "load_unhooked", 5, 375 )
2906
2907
2908end
2909
2910/*
2911
2912 Hooking & loading.
2913
2914*/
2915
2916snixzz.GMHooks = { -- Return the server's original hooks for selected types
2917 ["CreateMove"] = GAMEMODE.CreateMove,
2918 ["HUDPaint"] = GAMEMODE.HUDPaint,
2919 ["StartChat"] = GAMEMODE.StartChat,
2920 ["FinishChat"] = GAMEMODE.FinishChat,
2921}
2922
2923function GAMEMODE:StartChat()
2924 snixzz.Typing = true
2925 return snixzz.GMHooks.StartChat()
2926end
2927
2928function GAMEMODE:FinishChat()
2929 snixzz.Typing = false
2930 return snixzz.GMHooks.FinishChat()
2931end
2932
2933function GAMEMODE:ShouldDrawLocalPlayer( ply )
2934 return snixzz.Bools["misc_thirdperson"]
2935end
2936
2937if snixzz.Bools["load_unhooked"] then
2938
2939 function GAMEMODE:CreateMove( ucmd )
2940 snixzz.CreateMove( ucmd )
2941 return snixzz.GMHooks.CreateMove( ucmd )
2942 end
2943
2944 function GAMEMODE:HUDPaint( self )
2945 snixzz.HUDPaint()
2946 return snixzz.GMHooks.HUDPaint( self )
2947 end
2948
2949 function GAMEMODE:CalcView( ply, origin, angles, fov )
2950 return snixzz.CalcView( ply, origin, angles, fov )
2951 end
2952
2953 function GAMEMODE:Move()
2954 return snixzz.Move()
2955 end
2956
2957 snixzz.Message( Color( 255, 0, 134 ), "Hooking functions into the gamemode's hook system." )
2958
2959else
2960
2961 snixzz.AddHook( "CreateMove", snixzz.CreateMove )
2962 snixzz.AddHook( "HUDPaint", snixzz.HUDPaint )
2963 snixzz.AddHook( "CalcView", snixzz.CalcView )
2964 snixzz.AddHook( "Move", snixzz.Move )
2965
2966 snixzz.Message( Color( 255, 150, 0 ), "Loading unsecured hooks. More detectable but more reliable." )
2967
2968end
2969
2970snixzz.LoadConfig( snixzz.DefaultConfig )
2971snixzz.logEvent( "Load", "Playing " .. GAMEMODE.Name .. " on " .. GetHostName() )
2972
2973G.chat.AddText(
2974snixzz.Colors.DarkRed, "[snixzz2] ",
2975snixzz.Colors.Cyan, "Loaded lua. ",
2976snixzz.Colors.Purple, snixzz.Info.Version .. ", ",
2977snixzz.Colors.White, "Last updated ",
2978snixzz.Colors.Green, snixzz.Info.Updated .. ", ",
2979Color( 255, 255, 0 ), snixzz.Info.Size .. ", ",
2980Color( 0, 100, 240 ), snixzz.Info.Lines .. " ",
2981snixzz.Colors.White, "lines long." )
2982snixzz.Sound()