· 6 years ago · Jan 03, 2020, 09:38 PM
1/*
2 Anti-cheat detection, just informs you if an anti-cheat is present
3 Must be loaded before module is loaded and the snixzz table is
4 actually created
5*/
6
7if _G["_snixzz"] then
8 _G["_snixzz"] = nil
9 MsgC( Color( 255, 0, 0 ), "[snixzz2] Detected an anti-cheat, or snixzz2 was reloaded.\n" )
10end
11if _G["snixzz"] then
12 _G["snixzz"] = nil
13 MsgC( Color( 255, 0, 0 ), "[snixzz2] Detected an anti-cheat, or snixzz2 was reloaded.\n" )
14end
15
16if _G["cvar3"] then
17 _G["cvar3"] = nil
18 MsgC( Color( 255, 0, 0 ), "[snixzz2] Detected an anti-cheat\n" )
19end
20if _G["cvar3"] then
21 _G["cvar3"] = nil
22 MsgC( Color( 255, 0, 0 ), "[snixzz2] Detected an anti-cheat, or snixzz2 was reloaded.\n" )
23end
24
25local snixzz = {}
26snixzz.DataFolder = "savedata"
27
28local _R = debug["getregistry"]()
29
30snixzz["Copy"] = {
31 ["table"] = table,
32 ["hook"] = hook,
33 ["math"] = math,
34 ["surface"] = surface,
35 ["render"] = render,
36 ["draw"] = draw,
37 ["util"] = util,
38 ["http"] = http,
39 ["player"] = player,
40 ["input"] = input,
41 ["timer"] = timer,
42 ["cam"] = cam,
43 ["team"] = team,
44 ["ents"] = ents,
45 ["concommand"] = concommand,
46 ["vgui"] = vgui,
47 ["string"] = string,
48 ["file"] = file,
49 ["ScrW"] = ScrW,
50 ["ScrH"] = ScrH,
51 ["pairs"] = pairs,
52 ["IsValid"] = IsValid,
53 ["LocalPlayer"] = LocalPlayer,
54 ["GetConVarNumber"] = GetConVarNumber,
55 ["SetMaterialOverride"] = SetMaterialOverride,
56 ["CreateMaterial"] = CreateMaterial,
57 ["Vector"] = Vector,
58 ["Material"] = Material,
59 ["EyePos"] = EyePos,
60 ["EyeAngles"] = EyeAngles,
61 ["Color"] = Color,
62 ["RealFrameTime"] = RealFrameTime,
63 ["RunConsoleCommand"] = RunConsoleCommand,
64 ["require"] = require,
65 ["MsgN"] = MsgN,
66 ["tostring"] = tostring,
67 ["Angle"] = Angle,
68}
69
70snixzz["Hooks"] = {
71}
72snixzz["Detours"] = {
73}
74snixzz["Spoof"] = {
75 ["sv_allowcslua"] = snixzz["Copy"]["GetConVarNumber"]( "sv_allowcslua" ), // some anti-cheats man..
76 ["sv_cheats"] = 0,
77 ["host_timescale"] = 1,
78 ["host_framerate"] = 0,
79}
80
81// Aimbot vars nd shit
82snixzz["Target"] = nil
83snixzz["Distance"] = 2147483647 // max aimbot distance
84snixzz["Shooting"] = false
85snixzz["Typing"] = false
86snixzz["Locked"] = false
87snixzz["Whitelist"] = {
88}
89snixzz["Attachments"] = {
90 "eyes",
91 "forward",
92 "head",
93}
94
95snixzz.Bools = {
96
97 -- Aimbot & view settings
98 ["aim_toggle"] = false,
99 ["aim_autoshoot"] = true,
100 ["aim_antiaim"] = true,
101 ["aim_silent"] = true,
102 ["aim_nospread"] = true,
103 ["aim_norecoil"] = true,
104 ["aim_prediction"] = true,
105 ["aim_ignoresteam"] = true,
106 ["aim_ignoreadmins"] = false,
107 ["aim_ignorebots"] = false,
108 ["aim_ignoreteam"] = false,
109
110 -- ESP settings
111 ["esp_enabled"] = true,
112 ["esp_name"] = true,
113 ["esp_weapon"] = true,
114 ["esp_box"] = true,
115 ["esp_crosshair"] = true,
116 ["esp_crosshair_box"] = true,
117 ["esp_tracer"] = false,
118 ["esp_nohands"] = true,
119 ["esp_status"] = true,
120 ["esp_list"] = true,
121
122 ["misc_bhop"] = true,
123
124
125}
126
127snixzz.Vars = {
128
129 -- Aimbot Vars
130 ["aim_distance"] = 2147483647,
131
132 -- ESP Vars
133 ["esp_distance"] = 3000,
134
135 -- Misc Vars
136 ["speedhack_speed"] = 3.5,
137 ["speedhack_type"] = "pSpeed",
138
139 ["misc_menucolor"] = Color( 0, 188, 255, 75 ),
140
141}
142
143snixzz.Binds = {
144 ["+aimbot"] = KEY_F,
145 ["+menu"] = KEY_G,
146 ["+speedhack"] = KEY_B,
147 ["+misc_list"] = KEY_T,
148}
149
150snixzz.Keys = {
151 [1] = { Name = "A", Key = KEY_A },
152 [2] = { Name = "B", Key = KEY_B },
153 [3] = { Name = "C", Key = KEY_C },
154 [4] = { Name = "D", Key = KEY_D },
155 [5] = { Name = "E", Key = KEY_E },
156 [6] = { Name = "F", Key = KEY_F },
157 [7] = { Name = "G", Key = KEY_G },
158 [8] = { Name = "H", Key = KEY_H },
159 [9] = { Name = "I", Key = KEY_I },
160 [10] = { Name = "J", Key = KEY_J },
161 [11] = { Name = "K", Key = KEY_K },
162 [12] = { Name = "L", Key = KEY_L },
163 [13] = { Name = "M", Key = KEY_M },
164 [14] = { Name = "N", Key = KEY_N },
165 [15] = { Name = "O", Key = KEY_O },
166 [16] = { Name = "P", Key = KEY_P },
167 [17] = { Name = "Q", Key = KEY_Q },
168 [18] = { Name = "R", Key = KEY_R },
169 [19] = { Name = "S", Key = KEY_S },
170 [20] = { Name = "T", Key = KEY_T },
171 [21] = { Name = "U", Key = KEY_U },
172 [22] = { Name = "V", Key = KEY_V },
173 [23] = { Name = "W", Key = KEY_W },
174 [24] = { Name = "X", Key = KEY_X },
175 [25] = { Name = "Y", Key = KEY_Y },
176 [26] = { Name = "Z", Key = KEY_Z },
177 [27] = { Name = "SPACE", Key = KEY_SPACE },
178 [28] = { Name = "TAB", Key = KEY_TAB },
179 [29] = { Name = "Left Shift", Key = KEY_LSHIFT },
180 [30] = { Name = "Right Shift", Key = KEY_RSHIFT },
181 [31] = { Name = "Left Alt", Key = KEY_LALT },
182 [32] = { Name = "Right Alt", Key = KEY_RALT },
183 [33] = { Name = "Delete", Key = KEY_DELETE },
184 [34] = { Name = ".", Key = KEY_PERIOD },
185 [35] = { Name = "/", Key = KEY_SLASH },
186 [36] = { Name = "[", Key = KEY_LBRACKET },
187 [37] = { Name = ";", Key = KEY_SEMICOLON },
188 [38] = { Name = "'", Key = KEY_APOSTROPHE },
189 [39] = { Name = ",", Key = KEY_COMMA },
190}
191
192// nospread shit
193snixzz.RecoilBackup = {}
194snixzz["Cones"] = {
195 ["HL2"] = {
196 ["weapon_pistol"] = snixzz["Copy"]["Vector"]( 0.0100, 0.0100, 0.0100 ),
197 ["weapon_smg1"] = snixzz["Copy"]["Vector"]( 0.04362, 0.04362, 0.04362 ),
198 ["weapon_ar2"] = snixzz["Copy"]["Vector"]( 0.02618, 0.02618, 0.02618 ),
199 ["weapon_shotgun"] = snixzz["Copy"]["Vector"]( 0.08716, 0.08716, 0.08716 ),
200 },
201}
202snixzz["ConeBase"] = {
203 ["weapon_cs_base"] = true,
204 ["weapon_zs_base"] = true,
205}
206
207snixzz.BadWeapons = {
208 ["gmod_tool"] = true,
209 ["gmod_camera"] = true,
210 ["phys_cannon"] = true,
211}
212
213snixzz["Colors"] = {
214 ["White"] = Color( 255, 255, 255, 255 ),
215 ["Black"] = Color( 0, 0, 0, 255 ),
216 ["Green"] = Color( 0, 255, 0, 255 ),
217 ["Red"] = Color( 255, 0, 0, 255 ),
218 ["DarkRed"] = Color( 200, 50, 50, 255 ),
219 ["Cyan"] = Color( 0, 255, 255, 255 ),
220}
221
222snixzz["Block"] = {
223 ["net"] = {
224
225 }
226}
227
228snixzz["Copy"]["surface"]["CreateFont"]( "snixzz", { font = "Trebuchet18", size = 12, antialias = false } )
229snixzz["Copy"]["surface"]["CreateFont"]( "snixzz_status", { font = "coolvetica", size = 20, antialias = true } ) -- HudHintTextLarge
230snixzz["Copy"]["surface"]["CreateFont"]( "snixzz_list", { font = "coolvetica", size = 12, antialias = true } )
231
232/* General notification/display functions */
233function snixzz.Message( col, txt )
234 MsgC( snixzz["Colors"]["Cyan"], "[snixzz2]: " )
235 MsgC( col, txt .. "\n" )
236end
237
238/* Detour function */
239function snixzz.Detour( Old, New )
240 snixzz["Detours"][New] = Old
241 snixzz["Message"]( Color( 200, 150, 255 ), "Detouring function " .. snixzz["Copy"]["tostring"]( Old ) .. "." )
242 return New
243end
244
245snixzz["Copy"]["require"]( "snixzz2" ) // not a hack module....
246snixzz.Copy.require( "pspeed" )
247local _snixzz = _G["NHTable"]
248snixzz.pSpeed = _G["SetSpeed"]
249_G["NHTable"] = nil // hacker.
250_G["SetSpeed"] = nil
251
252/* Anti-Cheat bypass functions */
253function snixzz.AntiCheats()
254
255 if _G["CheckVars"] then
256 snixzz["Message"]( Color( 50, 255, 50 ), "function CheckVars exists, detouring the scan." )
257 _G["CheckVars"] = snixzz["Detour"]( _G["CheckVars"], function()
258 snixzz["Message"]( Color( 50, 255, 50 ), "HERP-AC attempted to scan cvars, stopping that..." )
259 end )
260 end
261
262 if _G["RunCheck"] then
263 snixzz["Message"]( Color( 0, 255, 50 ), "function RunCheck exists, detouring." )
264 _G["RunCheck"] = snixzz["Detour"]( _G["RunCheck"], function()
265 snixzz["Message"]( Color( 50, 255, 50 ), "TAC attempted to run a check, returning no information." )
266 end )
267 end
268
269 if _G["CAC"] then -- lol old as fuck but still works for cracked i believe
270 snixzz["Message"]( Color( 0, 255, 50 ), "table CAC exists, bypassing anti-cheat." )
271 snixzz["Copy"]["timer"]["Destroy"]( "CAC" )
272 end
273
274
275 snixzz["Copy"]["concommand"]["Remove"]( "0_u_found" )
276 snixzz["Copy"]["concommand"]["Add"]( "0_u_found", function()
277 snixzz["Message"]( Color( 50, 255, 50 ), "anti-cheat concommand 0_u_found blocked" )
278 end )
279 snixzz["Copy"]["hook"]["Remove"]( "InitPostEntity", "detrp" )
280
281end
282snixzz["AntiCheats"]()
283
284/* Hooking functions */
285
286function snixzz.RegisterHook( Type, Function )
287 snixzz["Message"]( Color( 255, 255, 255 ), "Hooking function " .. Type .." into " .. snixzz["Copy"]["string"]["Replace"]( snixzz["Copy"]["tostring"]( Function ), "function: ", "" ) )
288 snixzz["Copy"]["table"]["insert"]( snixzz["Hooks"], snixzz["Copy"]["string"]["Replace"]( snixzz["Copy"]["tostring"]( Function ), "function: ", "" ) )
289 return snixzz["Copy"]["hook"]["Add"]( Type, snixzz["Copy"]["string"]["Replace"]( snixzz["Copy"]["tostring"]( Function ), "function: ", "" ), Function )
290end
291
292/*
293
294 Settings & Menu backend.
295
296*/
297
298function snixzz.CreateOption( dtype, parent, oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec )
299 local addx, addy = 3, 3.5
300
301 if ( dtype == "Checkbox" ) then
302 dtype = "DCheckBoxLabel"
303 local text, bool, x, y = oText, oBool, xPos, yPos
304 local checkbox = snixzz.Copy.vgui.Create( dtype, parent )
305 checkbox:SetText( text )
306 checkbox:SetCursor( "crosshair" )
307 checkbox:SetPos( x + addx, y + addy )
308 checkbox:SizeToContents()
309 checkbox:SetTextColor( Color( 255, 255, 255 ) )
310 checkbox:SetChecked( snixzz.Bools[bool] )
311 checkbox.OnChange = function( check )
312 snixzz.Bools[bool] = checkbox:GetChecked()
313 end
314
315 elseif ( dtype == "Slider" ) then
316 dtype = "DNumSlider"
317 local text, var, min, max, wide, x, y, Dec = oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec
318 local slider = vgui.Create( dtype, parent )
319 slider:SetPos( x + addx, y + addy )
320 slider:SetWide( wide )
321 slider:SetCursor( "crosshair" )
322 slider:SetText( text )
323 slider:SetMin( min )
324 slider:SetMax( max )
325 slider:SetDecimals( Dec )
326 slider:SetValue( snixzz.Vars[var] )
327 slider.OnValueChanged = function( p, v )
328 snixzz.Vars[var] = v
329 end
330
331 elseif ( dtype == "Label" ) then
332 dtype = "DLabel"
333 local text, x, y = oText, oBool, xPos
334 local label = vgui.Create( dtype, parent )
335 label:SetPos( x, y )
336 label:SetCursor( "crosshair" )
337 label:SetText( text )
338 label:SizeToContents()
339 label:SetTextColor( color_white )
340 end
341end
342
343function snixzz.SaveConfig( cfg )
344 local save = {}
345 save.Vars = snixzz.Vars
346 save.Bools = snixzz.Bools
347 save.Binds = snixzz.Binds
348 cfg = snixzz.Copy.string.gsub( cfg, " ", "_" )
349 if !snixzz.Copy.file.Exists( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) then
350 snixzz.Copy.table.insert( snixzz.Configs, cfg )
351 snixzz.Copy.file.Write( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", snixzz.Copy.util.TableToJSON( save ) )
352 snixzz.Message( snixzz.Colors["Green"], "Created config " .. cfg .. "!" )
353 else
354 snixzz.Message( snixzz.Colors["Red"], "Config " .. cfg .. " already exists!" )
355 end
356end
357
358function snixzz.LoadConfig( cfg )
359 cfg = snixzz.Copy.string.lower( cfg )
360 if snixzz.CurrentConfig != cfg then
361 if snixzz.Copy.file.Exists( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) then
362 local ToRead = snixzz.Copy.util.JSONToTable( snixzz.Copy.file.Read( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) )
363 snixzz.Vars = ToRead.Vars
364 snixzz.Bools = ToRead.Bools
365 snixzz.Binds = ToRead.Binds
366 else
367 snixzz.Message( Color( 255, 0, 0 ), "Invalid config file!" )
368 end
369 snixzz.Message( snixzz.Colors["Green"], "Loaded config " .. cfg )
370 snixzz.CurrentConfig = cfg
371 else
372 snixzz.Message( snixzz.Colors["White"], "Config " .. cfg .. " is already loaded!" )
373 end
374end
375
376function snixzz.DeleteConfig( cfg )
377 cfg = snixzz.Copy.string.lower( cfg )
378 if cfg != "default" then
379 if snixzz.Copy.file.Exists( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt", "DATA" ) then
380 snixzz.Copy.file.Delete( snixzz.DataFolder .. "/configs/" .. cfg .. ".txt" )
381 snixzz.Message( snixzz.Colors["DarkRed"], "Deleted config " .. cfg )
382 else
383 snixzz.Message( Color( 255, 0, 0 ), "Unable to find config " .. cfg "!" )
384 end
385 else
386 snixzz.Message( snixzz.Colors["Red"], "You cannot delete the default config!" )
387 end
388end
389
390function snixzz.RenameConfig( Old, New )
391New = snixzz.Copy.string.gsub( New, " ", "_" )
392 if Old != "default" then
393 if !snixzz.Copy.file.Exists( snixzz.DataFolder .. "/configs/" .. New .. ".txt", "DATA" ) then
394 local OldConfig = snixzz.Copy.file.Read( snixzz.DataFolder .. "/configs/" .. Old .. ".txt", "DATA" )
395 if snixzz.Copy.file.Exists( snixzz.DataFolder .. "/configs/" .. Old .. ".txt", "DATA" ) then
396 snixzz.Copy.file.Delete( snixzz.DataFolder .. "/configs/" .. Old .. ".txt", "DATA" )
397 end
398 snixzz.Copy.file.Write( snixzz.DataFolder .. "/configs/" .. snixzz.Copy.string.lower( New ) .. ".txt", OldConfig )
399 snixzz.Message( snixzz.Colors["DarkRed"], "Renamed " .. Old .. " to " .. snixzz.Copy.string.lower( New ) .. "." )
400 else
401 snixzz.Message( Color( 255, 0, 0 ), "Config " .. New .. " already exists! Pick a different name." )
402 end
403 else
404 snixzz.Message( snixzz.Colors["Red"], "You cannot rename the default config!" )
405 end
406end
407
408function snixzz.BindKey( Bind, Key )
409 if snixzz.Binds[Bind] then
410 for _, v in snixzz.Copy.pairs( snixzz.Keys ) do
411 if Key == v.Name then
412 snixzz.Binds[ Bind ] = v.Key
413 snixzz.Message( snixzz.Colors["Green"], "Bound " .. Bind .. " to " .. Key .. "!" )
414 end
415 end
416 end
417end
418
419function snixzz.Unbind( Bind )
420 if snixzz.Binds[ Bind ] then
421 snixzz.Binds[ Bind ] = nil
422 snixzz.Message( snixzz.Colors["DarkRed"], "Unbound " .. Bind .. "!" )
423 end
424end
425
426function snixzz.GetConfigs()
427 local files = snixzz.Copy.file.Find( snixzz.DataFolder .. "/configs/*.txt", "DATA")
428 for k, v in snixzz.Copy.pairs( files ) do
429 files[ k ] = snixzz.Copy.string.Replace( v, ".txt", "" )
430 end
431 return files
432end
433snixzz.Configs = snixzz.GetConfigs()
434
435function snixzz.FileSystem()
436 if !snixzz.Copy.file.IsDir( snixzz.DataFolder, "DATA" ) then
437 snixzz.Copy.file.CreateDir( snixzz.DataFolder )
438 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "' data folder." )
439 end
440 if !snixzz.Copy.file.IsDir( snixzz.DataFolder .. "/configs", "DATA" ) then
441 snixzz.Copy.file.CreateDir( snixzz.DataFolder .. "/configs" )
442 snixzz.Message( Color( 0, 255, 0 ), "Creating '" .. snixzz.DataFolder .. "/configs' data folder." )
443 end
444 if !snixzz.Copy.file.Exists( snixzz.DataFolder .. "/default.txt", "DATA" ) then
445 snixzz.SaveConfig( "default" )
446 end
447end
448snixzz.Message( Color( 255, 255, 0 ), "Loading filesystem.." )
449snixzz.FileSystem()
450
451
452/********************/
453/* */
454/* Aimbot functions */
455/* */
456/********************/
457
458function snixzz.GetCone( wep )
459
460 if !snixzz["Copy"]["IsValid"]( wep ) then
461 return 0
462 end
463
464 if snixzz["Cones"][ wep:GetClass() ] then
465 return snixzz["Cones"][ wep:GetClass() ]
466 elseif snixzz["ConeBase"][ wep["Base"] ] then
467 return wep["Cone"] or wep["Primary"]["Cone"] or 0
468 elseif snixzz["Cones"]["HL2"][ wep:GetClass() ] then
469 return snixzz["Cones"]["HL2"][ wep:GetClass() ]
470 else
471 local Cone = wep["Cone"]
472 if !Cone then
473 Cone = wep["Primary"] && wep["Primary"]["Cone"] or 0
474 end
475 end
476 return Cone || 0
477end
478
479function snixzz.IsAutomatic( wep )
480 if wep == NULL then return false end
481 if snixzz.Cones.HL2[wep:GetClass()] then return false end
482 if !wep.Primary then return false end
483 if snixzz.BadWeapons[wep:GetClass()] then return false end
484 return !wep.Primary.Automatic
485end
486
487function snixzz.PredictSpread( cmd, ang )
488local w = snixzz["Copy"]["LocalPlayer"]():GetActiveWeapon()
489local vecCone, valCone = snixzz.Copy.Vector( 0, 0, 0 )
490 if ( w && w:IsValid() && ( type( w["Initialize"] ) == "function" ) ) then
491 valCone = snixzz["GetCone"]( w )
492 if ( type( valCone ) == "number" ) then
493 vecCone = snixzz["Copy"]["Vector"]( -valCone, -valCone, -valCone )
494 elseif ( type( valCone ) == "Vector" ) then
495 vecCone = valCone * -1
496 end
497 else
498 if ( w:IsValid() && snixzz["Cones"]["HL2"][ w:GetClass() ] ) then
499 vecCone = snixzz["Cones"]["HL2"][ w:GetClass() ]
500 end
501 end
502 return _snixzz["ZeroSpread"]( cmd, ang, vecCone )
503end
504
505function snixzz.Aimspot( e )
506
507 for k, v in snixzz["Copy"]["pairs"]( snixzz["Attachments"] ) do
508 if e:EyeAngles()["p"] < -89 or e:EyeAngles()["p"] < -181 then
509 return e:LocalToWorld( e:OBBCenter())
510 elseif e:LookupAttachment( v ) then
511 local att = e:GetAttachment( e:LookupAttachment( v ) )
512 if( att ) then
513 return att["Pos"]
514 end
515 end
516 end
517
518 return ( e:LocalToWorld( e:OBBCenter() ) )
519end
520
521
522function snixzz.IsVisible( v )
523 return _snixzz["IsVisible"]( snixzz["Copy"]["LocalPlayer"]():GetShootPos(), snixzz["Aimspot"]( v ), v:EntIndex() )
524end
525
526function snixzz.OnScreen( v )
527 local a, f = _R["Player"]["GetAimVector"]( snixzz["Copy"]["LocalPlayer"]() ):Angle() - ( v:GetPos() - snixzz["Copy"]["LocalPlayer"]():GetShootPos() ):Angle(), _R["Player"]["GetFOV"]( snixzz["Copy"]["LocalPlayer"]() )
528 return ( snixzz["Copy"]["math"]["NormalizeAngle"]( a["y"] ) < f + 2 && snixzz["Copy"]["math"]["NormalizeAngle"]( a["p"] ) < f + 2 )
529end
530
531function snixzz.IsValid( v )
532
533 if ( !snixzz["Copy"]["IsValid"]( v ) || v == snixzz["Copy"]["LocalPlayer"]() ) then
534 return false
535 end
536
537 // visible check
538 if !snixzz["IsVisible"]( v ) then
539 return false
540 end
541
542 if _snixzz["IsDormant"]( v:EntIndex() ) then
543 return false
544 end
545
546 if snixzz.Bools["aim_ignorebots"] && v:IsBot() then
547 return false
548 end
549
550 if snixzz["Copy"]["table"]["HasValue"]( snixzz["Whitelist"], v:SteamID() ) then
551 return false
552 end
553
554 if ( !v:Alive() || !v:IsPlayer() || v:InVehicle() ) then
555 return false
556 end
557
558 if ( snixzz["Copy"]["GetConVarNumber"]( "sbox_noclip" ) == 0 && v:GetMoveType() == MOVETYPE_NOCLIP ) then
559 return false
560 end
561
562 -- Ignore Steam friends
563 if snixzz.Bools["aim_ignoresteam"] then
564 if v:GetFriendStatus() == "friend" then
565 return false
566 end
567 end
568
569 -- Friendly Fire
570 if snixzz.Bools["aim_ignoreteam"] then
571 if ( v:Team() == snixzz["Copy"]["LocalPlayer"]():Team() ) then
572 return false
573 end
574 end
575
576 if ( v:GetMoveType() == MOVETYPE_OBSERVER || v:Team() == TEAM_SPECTATOR ) then
577 return false
578 end
579
580 // ignore T buddies
581 if snixzz["Copy"]["string"]["find"]( GAMEMODE["Name"] , "Trouble in Terror" ) then
582 if ( snixzz["Copy"]["LocalPlayer"]():IsTraitor() && v:IsTraitor() ) then
583 return false
584 end
585 end
586
587 // spawn protection (multiple server detection methods)
588 local col = v:GetColor()
589 if col["a"] < 255 then
590 return false
591 end
592 if snixzz["Copy"]["LocalPlayer"]():GetColor()["a"] < 255 then
593 return false
594 end
595
596 // gun game server
597 if v:GetMaterial() == "models/props_combine/stasisshield_sheet" then
598 return false
599 end
600
601 return true
602end
603
604function snixzz.GetTarget()
605 local distance = snixzz["Copy"]["math"]["huge"]
606 for k, v in snixzz["Copy"]["pairs"]( snixzz["Copy"]["player"]["GetAll"]() ) do
607 if snixzz["IsValid"]( v ) then
608 local distance2 = v:GetPos():DistToSqr( snixzz["Copy"]["LocalPlayer"]():GetPos() )
609 if distance2 < distance then
610 distance = distance2
611 snixzz["Target"] = v
612 end
613 else
614 continue;
615 end
616 end
617 return snixzz["Target"]
618end
619
620function snixzz.NormalizeAngles( Angl )
621 Angl["p"] = snixzz["Copy"]["math"]["NormalizeAngle"]( Angl["p"] )
622 Angl["y"] = snixzz["Copy"]["math"]["NormalizeAngle"]( Angl["y"] )
623 Angl["r"] = 0
624end
625
626function snixzz.Prediction( Pos, v )
627 if ( snixzz["Copy"]["IsValid"]( v ) && type( v:GetVelocity() ) == "Vector" && v["GetPos"] && type( v:GetPos() ) == "Vector" ) then
628 local vSpeed = snixzz["Target"]():GetVelocity() * 0.013
629 local plySpeed = snixzz["Copy"]["LocalPlayer"]():GetVelocity() * 0.013
630 return ( Pos - plySpeed + vSpeed )
631 end
632 return Pos
633end
634
635/*
636 ESP functions
637*/
638
639snixzz.AdminGroups = {
640 ["trialmod"] = true,
641 ["tmod"] = true,
642 ["trial-mod"] = true,
643 ["trialmoderator"] = true,
644 ["t-mod"] = true,
645 ["mod"] = true,
646 ["moderator"] = true,
647 ["operator"] = true,
648 ["vipmod"] = true,
649 ["vipmoderator"] = true,
650 ["admin"] = true,
651 ["vipadmin"] = true,
652 ["head-admin"] = true,
653 ["headadmin"] = true,
654 ["manager"] = true,
655 ["developer"] = true,
656 ["dev"] = true,
657 ["superadmin"] = true,
658 ["sadmin"] = true,
659 ["super"] = true,
660 ["vipsuperadmin"] = true, -- i cry
661 ["owner"] = true,
662 ["root_user"] = true,
663 ["vipowner"] = true, -- wouldn't be surprised it
664}
665
666function snixzz.IsAdmin( v )
667
668 if v:IsAdmin() then
669 return true
670 end
671
672 if v:IsSuperAdmin() then
673 return true
674 end
675
676 if snixzz.AdminGroups[v:GetUserGroup()] then
677 return true
678 end
679
680end
681
682function snixzz.ShouldDraw( v )
683
684 // better fps maybe
685 local distance = v:GetPos():Distance( snixzz["Copy"]["LocalPlayer"]():GetPos() )
686 if snixzz.Vars["esp_distance"] != 0 && distance >= snixzz.Vars["esp_distance"] then
687 return false
688 end
689
690 if ( !v:IsPlayer() or !v:Alive() or v == snixzz["Copy"]["LocalPlayer"]() ) then
691 return false
692 end
693
694 if ( v:Team() == TEAM_SPECTATOR or snixzz["Copy"]["string"]["find"]( snixzz["Copy"]["team"]["GetName"]( v:Team() ), "spectator" ) ) then
695 return false
696 end
697
698 if _snixzz["IsDormant"]( v:EntIndex() ) then
699 return false
700 end
701
702 if !snixzz["OnScreen"]( v ) then
703 return false
704 end
705
706 return true
707end
708
709/*=======================
710
711
712Hooked functions below
713
714
715=========================*/
716
717snixzz.Status = "Waiting..."
718snixzz.StatusColor = Color( 255, 255, 0, 150 )
719snixzz.Silent = snixzz.Copy.Angle()
720snixzz.ShouldFire = nil
721local shouldfire
722
723function snixzz.CreateMove( ucmd )
724 // Aimbot vars
725 --snixzz["Angles"] = ucmd:GetViewAngles()
726 snixzz["Target"] = snixzz["GetTarget"]()
727 snixzz.Offset = snixzz["Copy"]["Vector"]( 0, 0, 0 )
728
729 // Silent aim
730 if snixzz.Bools["aim_silent"] then
731 snixzz.Silent = snixzz.Silent + snixzz.Copy.Angle( ucmd:GetMouseY() * 0.023, -ucmd:GetMouseX() * 0.023, 0 )
732 snixzz.Silent.p = snixzz.Copy.math.Clamp( snixzz.Silent.p, -89, 89 )
733 if ucmd:CommandNumber() == 0 then
734 ucmd:SetViewAngles( snixzz.Silent )
735 return
736 end
737 snixzz.Angles = snixzz.Silent
738 end
739
740 // Aimbot core
741 if ( snixzz.Copy.input.IsKeyDown( snixzz.Binds["+aimbot"] ) && !snixzz.Typing or snixzz.Bools["aim_toggle"] ) then
742
743 if snixzz["Target"] && snixzz["IsValid"]( snixzz["Target"] ) && snixzz.Copy.LocalPlayer():Alive() then
744
745 -- WIP
746 if snixzz.Target:EyeAngles().p < -89 or snixzz.Target:EyeAngles().p < -179 then
747 snixzz.Offset = snixzz.Copy.Vector( 0, 0, 10 )
748 end
749
750 if snixzz.Bools["aim_prediction"] then
751 snixzz.Angles = snixzz.Prediction( snixzz.Aimspot( snixzz.Target ) - snixzz.Offset )
752 else
753 snixzz.Angles = snixzz.Aimspot( snixzz.Target ) - snixzz.Offset
754 end
755
756 snixzz.Angles = ( snixzz.Angles - snixzz.Copy.LocalPlayer():GetShootPos() ):GetNormal():Angle()
757
758 -- Silent aim
759 if snixzz.Bools["aim_silent"] then
760 snixzz.Angles.p = snixzz.Angles.p > 180 && snixzz.Angles.p - 360 or snixzz.Angles.p
761 snixzz.Angles.r = 0
762 end
763
764 -- Normalize that shit
765 snixzz["NormalizeAngles"]( snixzz["Angles"] )
766
767 -- Spread Prediction
768 if snixzz.Bools["aim_nospread"] then
769 snixzz.SetAngle = snixzz.PredictSpread( ucmd, snixzz.Copy.Angle( snixzz.Angles.p, snixzz.Angles.y, 0 ) )
770 else
771 snixzz.SetAngle = snixzz.Angles
772 end
773
774 -- READY THE CANNON.
775 _snixzz["SetViewAngles"]( ucmd, snixzz["SetAngle"] )
776
777 if snixzz.Bools["aim_autoshoot"] then
778 ucmd:SetButtons( bit["bor"]( ucmd:GetButtons(), IN_ATTACK ) )
779 end
780
781 -- Silent aim view correction
782 if snixzz.Bools["aim_silent"] then
783 if snixzz.Copy.LocalPlayer():GetMoveType() == 2 then
784 local side = snixzz.Copy.Vector( ucmd:GetForwardMove(), ucmd:GetSideMove(), 0 )
785 side = (( side:GetNormal() ):Angle() + ( ucmd:GetViewAngles() - snixzz.Copy.Angle( 0, snixzz.Silent.y, 0 ))):Forward() * side:Length()
786 ucmd:SetForwardMove( side.x )
787 ucmd:SetSideMove( side.y )
788 end
789 end
790
791 -- status bullshit
792 snixzz.Status = "Target! (" .. snixzz.Target:Nick() .. ")"
793 snixzz.StatusColor = Color( 255, 0, 0, 150 )
794 snixzz["Locked"] = true
795
796 else
797 -- Static AA (WIP)
798 --_snixzz["SetViewAngles"]( ucmd, snixzz.Copy.Angle( -snixzz.Angles["p"] + 900, snixzz.Angles["y"] + 180, 0 ) )
799 snixzz.Status = "Searching..."
800 snixzz.StatusColor = Color( 0, 255, 0, 150 )
801 snixzz.Locked = false
802 end
803 end
804
805 if !snixzz.Bools["aim_silent"] then
806 snixzz.Angles = ucmd:GetViewAngles()
807 end
808
809 // Bunnyhop
810 if snixzz.Bools["misc_bhop"] then
811 if !snixzz.Copy.LocalPlayer():IsOnGround() then
812 ucmd:SetButtons( bit.band( ucmd:GetButtons(), bit.bnot( IN_JUMP ) ) )
813 end
814 end
815
816 -- Recoil Backup
817 if snixzz.Bools["aim_norecoil"] then
818 if snixzz.Copy.LocalPlayer():GetActiveWeapon()["Primary"] then
819 snixzz.Copy.LocalPlayer():GetActiveWeapon()["Primary"]["Recoil"] = 0
820 end
821 end
822 /*
823 local wep = snixzz.Copy.LocalPlayer():GetActiveWeapon()
824 if snixzz.Copy.LocalPlayer():Alive() && snixzz.Copy.IsValid( wep ) then
825 if !wep["Primary"]["Recoil"] != 0 then
826 snixzz.RecoilBackup[wep:GetClass()] = wep["Primary"]["Recoil"]
827 end
828
829 -- No Recoil
830 if snixzz.Bools["aim_norecoil"] then
831 if wep["Primary"] then
832 wep["Primary"]["Recoil"] = 0
833 end
834 end
835 end*/
836
837 if snixzz.Copy.input.IsKeyDown( snixzz.Binds["+speedhack"] ) && !snixzz.Typing then
838 snixzz.pSpeed( snixzz.Vars["speedhack_speed"] )
839 else
840 snixzz.pSpeed( 0 )
841 end
842
843 -- Menu opening
844 if ( snixzz.Copy.input.IsKeyDown( snixzz.Binds["+menu"] ) && !snixzz.Typing && !snixzz.MenuOpen && !gui.IsConsoleVisible() ) then
845 snixzz.Menu()
846 snixzz.MenuOpen = true
847 end
848
849 // No hands
850 if snixzz.Bools["esp_nohands"] then
851 _snixzz.NoDraw( snixzz.Copy.Material( "models/weapons/v_models/hands/v_hands" ), true )
852 else
853 _snixzz.NoDraw( snixzz.Copy.Material( "models/weapons/v_models/hands/v_hands" ), false )
854 end
855
856end
857
858function snixzz.CalcView( ply, origin, angles, FOV )
859 local ply = snixzz.Copy.LocalPlayer()
860 local wep = ply:GetActiveWeapon()
861 local view = GAMEMODE:CalcView( ply, origin, angles, FOV ) || {}
862
863 // visual no recoil
864 if snixzz.Bools["aim_norecoil"] then
865 if wep["Primary"] then wep["Primary"]["Recoil"] = 0 end
866 if wep["Secondary"] then wep["Secondary"]["Recoil"] = 0 end
867 end
868
869 -- visual no recoil
870 /*if snixzz.Bools["aim_norecoil"] then
871 if snixzz.Copy.LocalPlayer():Alive() && snixzz.Copy.IsValid( wep ) then
872 if wep["Primary"] then
873 wep["Primary"]["Recoil"] = 0
874 end
875 end
876 end*/
877
878 // Silent aim
879 if snixzz.Bools["aim_silent"] then
880 view.angles = snixzz.Silent
881 view.vm_angles = snixzz.Silent
882 view.origin = origin
883 view.fov = 90
884 else
885 view.angles = snixzz.Angles
886 view.angles.r = 0
887 view.fov = 90
888 end
889
890 return view
891end
892
893function snixzz.HUDPaint()
894
895 if !snixzz.Bools["esp_enabled"] then return end
896
897 local font = "snixzz"
898 local listpos = snixzz["Copy"]["ScrH"]() / 3.5
899
900 for k, v in snixzz.Copy.pairs( snixzz["Copy"]["ents"]["GetAll"]() ) do
901
902 // Player esp
903 if snixzz.ShouldDraw( v ) && snixzz.Copy.LocalPlayer():Alive() then
904
905 // ESP Positions
906 local bottom = ( v:GetPos() - snixzz["Copy"]["Vector"]( 0, 0, 10 ) ):ToScreen()
907 local top = ( v:GetPos() + snixzz["Copy"]["Vector"]( 0, 0, 70 ) ):ToScreen()
908 local height = ( bottom["y"] - top["y"] )
909 local width = ( height / 4 )
910
911 local wep
912 if snixzz["Copy"]["IsValid"]( v:GetActiveWeapon() ) then
913 wep = v:GetActiveWeapon():GetPrintName()
914 else
915 wep = "Unknown"
916 end
917
918 // player text color
919 local color = snixzz["Copy"]["team"]["GetColor"]( v:Team() )
920
921 // player box color
922 local boxcolor = snixzz["Copy"]["team"]["GetColor"]( v:Team() )
923 if v == snixzz["Target"] then
924 boxcolor = Color( 255, 0, 0, 255 )
925 else
926 boxcolor = Color( 0, 200, 0, 255 )
927 end
928
929 // ESP text
930 if snixzz.Bools["esp_name"] then
931 snixzz.Copy.draw.SimpleTextOutlined( v:Nick() .. " [" .. v:Health() .. "]", font, top["x"], top["y"] - 10, color, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 0, 0, 0, 255 ) )
932 end
933
934 if snixzz.Bools["esp_weapon"] then
935 snixzz.Copy.draw.SimpleTextOutlined( wep, font, bottom["x"], bottom["y"] + 10, color, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 0, 0, 0, 255 ) )
936 end
937
938 // Box ESP
939 if snixzz.Bools["esp_box"] then
940 snixzz.Copy.surface["SetDrawColor"]( boxcolor )
941 snixzz.Copy.surface["DrawOutlinedRect"]( top["x"] - width, top["y"], width * 2, height )
942 end
943
944 if snixzz.Bools["esp_tracer"] then
945 snixzz.Copy.cam.Start3D( snixzz.Copy.EyePos(), snixzz.Copy.EyeAngles() )
946 snixzz.Copy.render.SetMaterial( snixzz.Copy.Material( "trails/laser" ) )
947 local startpos = snixzz.Copy.LocalPlayer():GetPos()
948 local endpos = v:GetBonePosition( v:LookupBone( "ValveBiped.Bip01_Head1" ) ) or v:GetPos()
949 snixzz.Copy.render.DrawBeam( startpos, endpos, 3, 0, 0, boxcolor )
950 snixzz.Copy.cam.End3D()
951 end
952
953 else
954 continue;
955 end
956
957
958 // spectator/admin list
959 if snixzz.Bools["esp_list"] then
960 if snixzz["Copy"]["input"]["IsKeyDown"]( snixzz.Binds["+misc_list"] ) then
961 if v:IsPlayer() then
962 if v:GetObserverTarget() == snixzz["Copy"]["LocalPlayer"]() then
963 snixzz["Copy"]["draw"]["SimpleText"]( v:Nick(), "snixzz_list", 2, listpos, Color( 0, 255, 255, 200 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
964 listpos = listpos + 12
965 end
966 end
967 else
968 if v:IsPlayer() then
969 if snixzz["IsAdmin"]( v ) then
970 snixzz["Copy"]["draw"]["SimpleText"]( v:Nick(), "snixzz_list", 2, listpos, Color( 255, 80, 80, 200 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
971 listpos = listpos + 12
972 end
973 end
974 end
975 end
976 end
977
978 // Crosshair
979 local x = ScrW() / 2
980 local y = ScrH() / 2
981
982 local crosscolor = Color( 0, 0, 0, 255 )
983 local crosslength = 50
984 local gap = 2
985
986 local boxsize = 5
987
988 -- Box
989 if snixzz.Bools["esp_crosshair_box"] then
990 snixzz.Copy.surface.SetDrawColor( Color( 255, 255, 255 ) )
991 snixzz.Copy.surface.DrawOutlinedRect( x - boxsize - 2, y - boxsize - 2, ( boxsize + 2 ) * 2 + 1, ( boxsize + 2 ) * 2 + 1 )
992 end
993
994 -- Crosshair
995 if snixzz.Bools["esp_crosshair"] then
996 snixzz.Copy.surface.SetDrawColor( 0, 0, 0, 255 )
997 snixzz.Copy.surface.DrawLine( x - crosslength, y, x - gap, y )
998 snixzz.Copy.surface.DrawLine( x + crosslength, y, x + gap, y )
999
1000 snixzz.Copy.surface.DrawLine( x, y - crosslength, x, y - gap )
1001 snixzz.Copy.surface.DrawLine( x, y + crosslength, x, y + gap )
1002 end
1003
1004 // Aim status & shit
1005 if snixzz.Bools["esp_status"] then
1006 snixzz.Copy.draw.DrawText( snixzz.Status, "snixzz_status", ScrW() * 0.5, ScrH() * 0.5 + 50, snixzz.StatusColor, TEXT_ALIGN_CENTER )
1007 end
1008
1009
1010 -- Red dot
1011 //draw.RoundedBox( 4, ( ScrW() / 2 ) - 3, ( ScrH() / 2 ) - 3, 7, 7, Color( 255, 0, 0, 75 ) )
1012
1013 /* old swastika crosshair, saving for crosshair selection eventually.
1014 surface["SetDrawColor"]( Color( 233, 78, 78 ) )
1015 local size = 14 // Swastika size
1016 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2 + size, snixzz["Copy"]["ScrH"]() / 2 )
1017 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2 + size, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2 + size, snixzz["Copy"]["ScrH"]() / 2 + size )
1018 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2 - size, snixzz["Copy"]["ScrH"]() / 2 )
1019 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2 - size, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2 - size, snixzz["Copy"]["ScrH"]() / 2 - size )
1020 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2 - size )
1021 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2 - size, snixzz["Copy"]["ScrW"]() / 2 + size, snixzz["Copy"]["ScrH"]() / 2 - size )
1022 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2, snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2 + size )
1023 surface["DrawLine"]( snixzz["Copy"]["ScrW"]() / 2, snixzz["Copy"]["ScrH"]() / 2 + size, snixzz["Copy"]["ScrW"]() / 2 - size, snixzz["Copy"]["ScrH"]() / 2 + size )
1024 */
1025end
1026
1027/*
1028 DETOURS
1029 Adding them as I go, don't bitch that I haven't detoured every function
1030*/
1031_R["Entity"]["FireBullets"] = snixzz["Detour"]( _R["Entity"]["FireBullets"], function( e, bullet )
1032 //snixzz["Message"]( Color( 0, 255, 150 ), "Found cone " .. snixzz["Copy"]["tostring"]( bullet["Spread"] ) .. " for weapon " .. snixzz["Copy"]["LocalPlayer"]():GetActiveWeapon():GetPrintName() )
1033 snixzz["Cones"][ snixzz["Copy"]["LocalPlayer"]():GetActiveWeapon():GetClass() ] = bullet["Spread"]
1034 return snixzz["Detours"][ _R["Entity"]["FireBullets"] ]( e, bullet )
1035end )
1036
1037file["Exists"] = snixzz["Detour"]( file["Exists"], function( filename, dir )
1038 if string["find"]( filename, "snixzz" ) then // stay out
1039 snixzz["Message"]( Color( 255, 0, 0 ), "An anti-cheat attempted to search for snixzz" )
1040 return false
1041 else
1042 return snixzz["Detours"][ file["Exists"] ]( filename, dir )
1043 end
1044end )
1045
1046file["Read"] = snixzz["Detour"]( file["Read"], function( filename, dir )
1047 if string["find"]( filename, "snixzz" ) then
1048 return "No, you cannot have my source code."
1049 else
1050 return snixzz["Detours"][ file["Read"] ]( filename, dir )
1051 end
1052end )
1053
1054net.Start = snixzz["Detour"]( net["Start"], function( name )
1055 if ( name == "checksaum" || name == "send" || name == "leyac_cmd" ) then
1056 snixzz["Message"]( Color( 255, 0, 0 ), "Blocked net.Send " .. name )
1057 return
1058 else
1059 snixzz["Message"]( Color( 255, 255, 255 ), "*DEBUG* net.Send( '" .. name .. "' )" )
1060 return snixzz["Detours"][ net["Start"] ]( name )
1061 end
1062end )
1063
1064net.WriteString = snixzz["Detour"]( net["WriteString"], function( str )
1065 if snixzz["Copy"]["string"]["find"]( str, "snixzz" ) then
1066 return "fuck that"
1067 else
1068 snixzz["Message"]( Color( 255, 255, 255 ), "*DEBUG* net.WriteString( " .. str .. " )" )
1069 return snixzz["Detours"][ net["WriteString"] ]( str )
1070 end
1071end )
1072
1073GetConVarNumber = snixzz["Detour"]( GetConVarNumber, function( cvar )
1074 for k, v in snixzz["Copy"]["pairs"]( snixzz["Spoof"] ) do
1075 if cvar == v then
1076 snixzz["Message"]( Color( 255, 255, 255 ), "*ANTICHEAT ALERT* Server tried to check convar " .. v .. " returning default value " .. k )
1077 return k
1078 else
1079 return snixzz["Detours"][ GetConVarNumber ]( cvar )
1080 end
1081 end
1082end )
1083
1084RunConsoleCommand = snixzz["Detour"]( RunConsoleCommand, function( cmd, ... )
1085 snixzz["Message"]( Color( 255, 255, 255 ), "RunConsoleCommand( '" .. cmd .. "' )" )
1086 return snixzz["Detours"][ RunConsoleCommand ]( cmd, ... )
1087end )
1088
1089snixzz["StartChat"] = GAMEMODE["StartChat"]
1090function GAMEMODE:StartChat()
1091 snixzz["StartChat"]()
1092 snixzz["Typing"] = true
1093end
1094snixzz["FinishChat"] = GAMEMODE["FinishChat"]
1095function GAMEMODE:FinishChat()
1096 snixzz["FinishChat"]()
1097 snixzz["Typing"] = false
1098end
1099
1100/*
1101
1102 Menu Core
1103
1104*/
1105
1106
1107function snixzz.Menu()
1108 local tabs, menuheight, menuwidth, w, h = {}, 270, 240, ScrW() / 2, ScrH() / 2
1109 local menucol = Color( 0, 188, 255, 75 )
1110
1111 snixzz.Frame = snixzz.Copy.vgui.Create( "DPropertySheet" )
1112 snixzz.Frame:SetCursor( "crosshair" )
1113 snixzz.Frame:SetParent( snixzz.Frame )
1114 snixzz.Frame:SetPos( 20, 60 )
1115 --snixzz.Frame:SetPos( w - ( menuwidth / 2 ), h - ( menuheight / 2 ) )
1116 snixzz.Frame:SetSize( menuwidth, menuheight )
1117 snixzz.Frame:SetVisible( true )
1118 snixzz.Frame:MakePopup()
1119 snixzz.Frame.Think = function()
1120 if !snixzz.Copy.input.IsKeyDown( snixzz.Binds["+menu"] ) then
1121 snixzz.MenuOpen = false
1122 snixzz.Frame:SetVisible( false )
1123 end
1124 end
1125 snixzz.Frame.Paint = function()
1126 snixzz.Copy.draw.RoundedBox( 0, 0, 0, snixzz.Frame:GetWide(), snixzz.Frame:GetTall(), snixzz.Vars["misc_menucolor"] )
1127 snixzz.Copy.surface.SetDrawColor( Color( 0, 0, 0 ) )
1128 snixzz.Copy.surface.DrawOutlinedRect( 0, 0, snixzz.Frame:GetWide() , snixzz.Frame:GetTall() )
1129 --snixzz.Copy.surface.DrawOutlinedRect( 0, 25, snixzz.Frame:GetWide(), snixzz.Frame:GetTall() )
1130 end
1131
1132 -- Parents for the tabs
1133 tabs.aimbot = vgui.Create( "DLabel", snixzz.Frame )
1134 tabs.aimbot:SetPos( 0, 0 )
1135 tabs.aimbot:SetText( "" )
1136 tabs.aimbot:SetCursor( "crosshair" )
1137
1138 tabs.esp = vgui.Create( "DLabel", snixzz.Frame )
1139 tabs.esp:SetPos( 0, 0 )
1140 tabs.esp:SetText( "" )
1141 tabs.esp:SetCursor( "crosshair" )
1142
1143 tabs.misc = vgui.Create( "DLabel", snixzz.Frame )
1144 tabs.misc:SetPos( 0, 0 )
1145 tabs.misc:SetText( "" )
1146 tabs.misc:SetCursor( "crosshair" )
1147
1148 tabs.config = vgui.Create( "DLabel", snixzz.Frame )
1149 tabs.config:SetPos( 0, 0 )
1150 tabs.config:SetText( "" )
1151 tabs.config:SetCursor( "crosshair" )
1152
1153 snixzz.Frame:AddSheet( "Aimbot", tabs.aimbot, "icon16/bomb.png", false, false )
1154 snixzz.Frame:AddSheet( "Visual", tabs.esp, "icon16/picture_edit.png", false, false )
1155 snixzz.Frame:AddSheet( "Misc", tabs.misc, "icon16/plugin.png", false, false )
1156 snixzz.Frame:AddSheet( "Config", tabs.config, "icon16/wrench.png", false, false )
1157
1158 -- Aimbot Settings
1159 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Aimbot Toggle", "aim_toggle", 5, 5 )
1160 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Autoshoot", "aim_autoshoot", 5, 25 )
1161 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Silent Aim", "aim_silent", 5, 45 )
1162 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Spread Prediction", "aim_nospread", 5, 65 )
1163 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Velocity Prediction", "aim_prediction", 5, 85 )
1164 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Remove Recoil", "aim_norecoil", 5, 105 )
1165 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Team", "aim_ignoreteam", 5, 125 )
1166 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Admins", "aim_ignoreadmins", 5, 145 )
1167 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Steam Friends", "aim_ignoresteam", 5, 165 )
1168 snixzz.CreateOption( "Checkbox", tabs.aimbot, "Ignore Bots", "aim_ignorebots", 5, 185 )
1169
1170 -- Visual Settings
1171 snixzz.CreateOption( "Checkbox", tabs.esp, "Enable Visuals", "esp_enabled", 5, 5 )
1172 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Name & HP", "esp_name", 5, 25 )
1173 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Weapon", "esp_weapon", 5, 45 )
1174 snixzz.CreateOption( "Checkbox", tabs.esp, "Player Box", "esp_box", 5, 65 )
1175 snixzz.CreateOption( "Checkbox", tabs.esp, "Draw Tracers", "esp_tracer", 5, 85 )
1176 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair", "esp_crosshair", 5, 105 )
1177 snixzz.CreateOption( "Checkbox", tabs.esp, "Crosshair Box", "esp_crosshair_box", 5, 125 )
1178 snixzz.CreateOption( "Checkbox", tabs.esp, "Remove Hands", "esp_nohands", 5, 145 )
1179 snixzz.CreateOption( "Checkbox", tabs.esp, "Aimbot Status", "esp_status", 5, 165 )
1180 snixzz.CreateOption( "Checkbox", tabs.esp, "Admin/Spectator List", "esp_list", 5, 185 )
1181 snixzz.CreateOption( "Slider", tabs.esp, "Render Distance", "esp_distance", 0, 7500, 235, 5, 205, 0 )
1182
1183 -- Misc Settings
1184 snixzz.CreateOption( "Checkbox", tabs.misc, "Enable Bunnyhop", "misc_bhop", 5, 5 )
1185 snixzz.CreateOption( "Slider", tabs.misc, "Speedhack Speed", "speedhack_speed", 1.5, 5, 235, 5, 205, 1 )
1186
1187 -- Config Tab
1188 --Menu Settings
1189 snixzz.CreateOption( "Label", tabs.config, "Menu Color", 5, 5 )
1190 local Mixer = vgui.Create( "DColorMixer", tabs.config )
1191 Mixer:SetPos( 105, 165 )
1192 Mixer:SetSize( 130, 70 )
1193 --Mixer:Dock( FILL )
1194 Mixer:SetPalette( false )
1195 Mixer:SetAlphaBar( true )
1196 Mixer:SetWangs( false )
1197 Mixer:SetColor( snixzz.Vars["misc_menucolor"] )
1198 Mixer.ValueChanged = function()
1199 snixzz.Vars["misc_menucolor"] = Mixer:GetColor()
1200 end
1201
1202 local CfgList = snixzz.Copy.vgui.Create( "DListView", tabs.config )
1203 CfgList:SetPos( 5, 5 )
1204 CfgList:SetMultiSelect( false )
1205 CfgList:SetSize( 235, 80 )
1206 CfgList:AddColumn( "Config" )
1207 for k, v in snixzz.Copy.pairs( snixzz.Configs ) do
1208 CfgList:AddLine( v )
1209 end
1210 CfgList.DoDoubleClick = function()
1211 local line = CfgList:GetSelectedLine()
1212 if line != nil then
1213 local config = CfgList:GetLine( line ):GetValue( 1 )
1214 snixzz.LoadConfig( config )
1215 end
1216 end
1217
1218 // Direct from ginject
1219 local CreateConfig = snixzz.Copy.vgui.Create( "DButton", tabs.config )
1220 CreateConfig:SetText( "Create New" )
1221 CreateConfig:SetSize( 105, 30 )
1222 CreateConfig:SetPos( 5, 90 )
1223 CreateConfig.DoClick = function()
1224 Derma_StringRequest( "New Config", "Name of the new config", "", function( txt )
1225 snixzz.SaveConfig( txt )
1226 end )
1227 end
1228
1229 local RenameConfig = snixzz.Copy.vgui.Create( "DButton", tabs.config )
1230 RenameConfig:SetText( "Rename" )
1231 RenameConfig:SetSize( 105, 30 )
1232 RenameConfig:SetPos( 5, 130 )
1233 RenameConfig.DoClick = function()
1234 Derma_StringRequest( "Rename Config", "Name of the new config", "", function( NewConfig )
1235 local line = CfgList:GetSelectedLine()
1236 if line != nil then
1237 local OldConfig = CfgList:GetLine( line ):GetValue( 1 )
1238 if OldConfig != "default" then
1239 snixzz.RenameConfig( OldConfig, NewConfig )
1240 snixzz.Copy.table.remove( snixzz.Configs, CfgList:GetSelectedLine() )
1241 snixzz.Copy.table.insert( snixzz.Configs, NewConfig )
1242 else
1243 snixzz.Message( snixzz.Colors["Red"], "You cannot rename the default config!" )
1244 end
1245 end
1246 end )
1247 end
1248
1249 local DeleteConfig = snixzz.Copy.vgui.Create( "DButton", tabs.config )
1250 DeleteConfig:SetText( "Delete" )
1251 DeleteConfig:SetSize( 105, 30 )
1252 DeleteConfig:SetPos( 120, 90 )
1253 DeleteConfig.DoClick = function()
1254 local line = CfgList:GetSelectedLine()
1255 if line != nil then
1256 local config = CfgList:GetLine( line ):GetValue( 1 )
1257 if config != "default" then
1258 for k, v in snixzz.Copy.pairs( snixzz.Configs ) do
1259 if v == config then
1260 snixzz.DeleteConfig( config )
1261 snixzz.Copy.table.remove( snixzz.Configs, k )
1262 end
1263 end
1264 else
1265 snixzz.Message( snixzz.Colors["Red"], "You cannot delete the default config!" )
1266 end
1267 end
1268 end
1269
1270 local LoadConfig = snixzz.Copy.vgui.Create( "DButton", tabs.config )
1271 LoadConfig:SetText( "Load" )
1272 LoadConfig:SetSize( 105, 30 )
1273 LoadConfig:SetPos( 120, 130 )
1274 LoadConfig.DoClick = function()
1275 local line = CfgList:GetSelectedLine()
1276 if line != nil then
1277 local config = CfgList:GetLine( line ):GetValue( 1 )
1278 snixzz.LoadConfig( config )
1279 snixzz.Frame:SetVisible( false )
1280 snixzz.MenuOpen = false
1281 end
1282 end
1283
1284 // Binds
1285 local BindCommands = snixzz.Copy.vgui.Create( "DComboBox", tabs.config )
1286 BindCommands:SetPos( 5, 165 )
1287 BindCommands:SetSize( 95, 20 )
1288 for k, v in snixzz.Copy.pairs( snixzz.Binds ) do
1289 BindCommands:AddChoice( k )
1290 end
1291
1292 local BindKeys = snixzz.Copy.vgui.Create( "DComboBox", tabs.config )
1293 BindKeys:SetPos( 5, 190 )
1294 BindKeys:SetSize( 95, 20 )
1295 for k, v in snixzz.Copy.pairs( snixzz.Keys ) do
1296 BindKeys:AddChoice( v.Name )
1297 end
1298
1299 local RebindKey = snixzz.Copy.vgui.Create( "DButton", tabs.config )
1300 RebindKey:SetText( "Bind" )
1301 RebindKey:SetSize( 95, 18 )
1302 RebindKey:SetPos( 5, 215 )
1303 RebindKey.DoClick = function()
1304 local Key = BindKeys:GetValue()
1305 local Command = BindCommands:GetValue()
1306 if ( BindKeys:GetValue() != "" && BindCommands:GetValue() != "" ) then
1307 snixzz.Frame:SetVisible( false )
1308 snixzz.MenuOpen = false
1309 snixzz.BindKey( Command, Key )
1310 end
1311 end
1312
1313end
1314
1315/*
1316
1317 Hooking & loading.
1318
1319*/
1320snixzz["Message"]( Color( 255, 180, 180, 255 ), "Loading hooks..." )
1321snixzz["RegisterHook"]( "CreateMove", snixzz["CreateMove"] )
1322snixzz["RegisterHook"]( "HUDPaint", snixzz["HUDPaint"] )
1323snixzz["RegisterHook"]( "CalcView", snixzz["CalcView"] )