thegrump

noobler

Oct 31st, 2014 (edited)
5,648
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.71 KB | None | 1 0
  1. --upgraded by Iced Coffee, re-released after twelve years in its original unminified format for your viewing pleasure
  2. --keeping aussie propkill alive @ 103.217.254.28:27015
  3. /*
  4.         this script was made from scratch by Ownage to share with anyone that has an interest in propkilling.
  5.         it has the 3 essentials required to become a god-tier propkiller, a wallhack, an ESP and rotate scripts.
  6.         the rest depends on how good you are, no crying and no excuses
  7.         feel free to spread this pastebin url like ebola.
  8.  
  9.     BONUS SCRIPT: ms_forceulxsuper uses a powerful algorithm to work its way inside ulx and force it into giving
  10.         you superadmin, have fun but don't overuse it as with great hacks come great responsibilities
  11.  
  12. ///////////////////////STEPS TO GET YOUR SHIT SORTED///////////////////////
  13.  
  14. 1)      read this shit carefully, we're done repeatedly explaining things to retards,
  15.        we're not gonna help you if you ask us anything that's been answered here
  16.  
  17. 2)      download this script from pastebin using the download button just above this text.
  18.  
  19. 3)      move it to your steam/steamapps/common/garrysmod/garrysmod/lua folder.
  20.  
  21. 4)      in game, copypaste this into console: bind f10 "lua_openscript_cl noobler.lua"
  22.  
  23. 5)      close console and press f10, one of two things will happen
  24.        if you did everything properly so far, you'll instantly be able to see people's names above their heads
  25.        if you don't see the names:
  26.          either a) the server has sv_allowcslua set to 0 and you haven't ran a bypass yet,
  27.           or b) you managed to fuck up these very simple instructions and need to start again
  28.  
  29. 6)      once it's working, copypaste these into console
  30.  
  31.       bind x ms_rotate
  32.       instant 180, useful for killing roleplayers behind buildings, propkillers behind defense and anyone you surf over.
  33.  
  34.       bind t ms_rotate2
  35.       instant 180 that jumps and flips your aim's up/down, used exclusively for boosting and re-boosting
  36.  
  37.         bind f11 +ms_menu
  38.         brings up the menu which is all pretty straight forward.
  39.         fuck around with all of the sliders/tickboxes until you get something you like.
  40.  
  41.         bind f6 ms_visuals_toggle
  42.         toggles the wallhack and esp on/off
  43.  
  44. 7)      bind one of each type of prop using this as an example: bind f "gm_spawn models/props_c17/FurnitureWashingmachine001a.mdl"
  45.  
  46.         boosting + killing
  47.         models/props_c17/FurnitureWashingmachine001a.mdl
  48.         models/props_c17/FurnitureFireplace001a.mdl
  49.         models/props_c17/FurnitureFridge001a.mdl
  50.         models/props_wasteland/controlroom_storagecloset001a.mdl
  51.         models/props_wasteland/controlroom_storagecloset001b.mdl
  52.         models/props_wasteland/laundry_dryer001.mdl
  53.  
  54.         killing
  55.         models/props/de_tides/gate_large.mdl
  56.         models/props_wasteland/laundry_dryer002.mdl
  57.         models/props_combine/breendesk.mdl
  58.         models/props/cs_militia/television_console01.mdl
  59.  
  60.         prop jumping/spidering/boosting really high up
  61.         models/mechanics/wheels/wheel_rugged_24.mdl
  62.         models/mechanics/wheels/wheel_smooth_18r.mdl
  63.         models/Mechanics/wheels/wheel_race.mdl
  64.         models/props_phx/wheels/moped_tire.mdl
  65.         models/props_phx/construct/metal_plate1.mdl
  66.         models/props/de_inferno/flower_barrel_p11.mdl
  67.  
  68. --don't touch anything on the following line unless you know what you're doing, it should be considerably easier now, YOU'RE WELCOME FAGGOTS
  69.  
  70. -- ----------------------------------------------------
  71. -- Module setup
  72. -- ----------------------------------------------------
  73. local UseMaterial = CreateMaterial("WallMaterial3", "VertexLitGeneric", {
  74.     ["$basetexture"] = "Models/Debug/debugwhite",
  75.     ["$nocull"] = 1,
  76.     ["$model"] = 1,
  77. })
  78.  
  79. local Menu
  80. local props = {}
  81. local LP = LocalPlayer()
  82. local MANUAL_DRAW = 512
  83. local installed = false
  84.  
  85. CreateClientConVar("ms_enable", "1", true, false, "enable/disable builtin cheats")
  86.  
  87. surface.CreateFont("ass", {
  88.     font = "coolvetica",
  89.     size = 20,
  90.     antialias = true
  91. })
  92.  
  93. local ENTITY = FindMetaTable("Entity")
  94. local MS = {
  95.     PlayerWalls = true,
  96.     PropWalls = true,
  97.     WallsAlwaysSolid = true,
  98.     ESP = true,
  99.     Boxes = false,
  100.     BHop = true,
  101.     FOV = GetConVar("fov_desired"):GetInt(),
  102.     PlayerOpacity = 95,
  103.     PlayerColour = { 1, 1, 1 },
  104.     PropOpacity = 30,
  105.     PropNormalColour = { 0, 1, 0 }
  106. }
  107.  
  108. -- ----------------------------------------------------
  109. -- Settings
  110. -- ----------------------------------------------------
  111. local function LoadData()
  112.     local Data = sql.Query("SELECT * FROM MS_Settings")
  113.  
  114.     for k, v in pairs(Data) do
  115.         local NewData
  116.         if (v.Value == "true") then
  117.             NewData = true
  118.         elseif (v.Value == "false") then
  119.             NewData = false
  120.         elseif (string.find(v.Value, "|")) then
  121.             local tbl = string.Explode("|", v.Value)
  122.             NewData = tbl
  123.         elseif (tonumber(v.Value)) then
  124.             NewData = tonumber(v.Value)
  125.         else
  126.             NewData = v.Value
  127.         end
  128.  
  129.         MS[v.Setting] = NewData
  130.     end
  131. end
  132.  
  133. local function SaveData()
  134.     for k, v in pairs(MS) do
  135.         local Key = tostring(k)
  136.         local Query = sql.Query(string.format("SELECT * FROM MS_Settings WHERE Setting = '%s'", Key))
  137.         local Data = ""
  138.         if (type(v) == "table") then
  139.             for k2, v2 in pairs(v) do
  140.                 Data = Data .. tostring(v2) .. "|"
  141.             end
  142.             Data = string.Left(Data, string.len(Data) - 1)
  143.         else
  144.             Data = tostring(v)
  145.         end
  146.  
  147.         if (Query) then
  148.             sql.Query(string.format("UPDATE MS_Settings SET Value = '%s' WHERE Setting = '%s'", Data, Key))
  149.         else
  150.             sql.Query(string.format("INSERT INTO MS_Settings('Setting', 'Value') VALUES( '%s', '%s' )", Key, Data))
  151.         end
  152.     end
  153. end
  154.  
  155. if (sql.TableExists("MS_Settings")) then
  156.     LoadData()
  157.     sql.Query("DELETE FROM MS_Settings WHERE Setting = 'PropWallOpacity'")
  158. else
  159.     sql.Query("CREATE TABLE MS_Settings( Setting varchar(255), Value varchar(255) )")
  160.     SaveData()
  161. end
  162.  
  163. -- ----------------------------------------------------
  164. -- Entity helpers
  165. -- ----------------------------------------------------
  166. function ENTITY:IsProp()
  167.     return self:GetClass() == "prop_physics"
  168. end
  169.  
  170. -- ----------------------------------------------------
  171. -- Wallhack
  172. -- ----------------------------------------------------
  173. local function PropRenderOverride(self, flag)
  174.     if flag != MANUAL_DRAW then return end
  175.     if not MS.PropWalls then return end
  176.  
  177.     cam.IgnoreZ(true)
  178.     render.SuppressEngineLighting(true)
  179.     render.SetBlend(MS.PropOpacity / 100)
  180.     render.SetColorModulation(unpack(MS.PropNormalColour))
  181.     render.MaterialOverride(UseMaterial)
  182.  
  183.     self:DrawModel()
  184.  
  185.     render.MaterialOverride(nil)
  186.     render.SuppressEngineLighting(false)
  187.     cam.IgnoreZ(false)
  188. end
  189.  
  190. local function DoMaterialCheckSingle(ent)
  191.     if not ent:IsProp() then return end
  192.    
  193.     if MS.PropWalls then
  194.         ent.RenderOverride = PropRenderOverride
  195.         props[ent] = true
  196.     else
  197.         ent.RenderOverride = nil
  198.         props[ent] = nil
  199.     end
  200. end
  201.  
  202. local function MSPropRemoved(ent, fullUpdate)
  203.     if fullUpdate or not ent:IsProp() then return end
  204.     props[ent] = nil
  205. end
  206.  
  207. local function DoMaterialCheck()
  208.     for _, ent in ipairs(ents.GetAll()) do
  209.         DoMaterialCheckSingle(ent)
  210.     end
  211. end
  212.  
  213. local function Wallhack()
  214.     local PlayerColor = MS.PlayerColour
  215.  
  216.     cam.Start3D(EyePos(), EyeAngles())
  217.         cam.IgnoreZ(true)
  218.         render.MaterialOverride(UseMaterial)
  219.         render.SuppressEngineLighting(true)
  220.  
  221.         if (MS.PlayerWalls and MS.PlayerOpacity) then
  222.             render.SetBlend(MS.PlayerOpacity / 100)
  223.             render.SetColorModulation(PlayerColor[1], PlayerColor[2], PlayerColor[3])
  224.             for k, v in pairs(player.GetAll()) do
  225.                 if v:GetObserverMode() != OBS_MODE_NONE then continue end
  226.                 if (IsValid(v) and v:Alive() and v:GetMoveType() ~= 0) then
  227.                     v:DrawModel()
  228.                 end
  229.             end
  230.         end
  231.  
  232.         cam.IgnoreZ(false)
  233.  
  234.         if (not MS.WallsAlwaysSolid) then
  235.             if (MS.PlayerWalls) then
  236.                 render.SetBlend(1)
  237.                 render.SetColorModulation(1, 1, 1)
  238.                 render.MaterialOverride(nil)
  239.                 for k, v in pairs(player.GetAll()) do
  240.                     if v:GetObserverMode() != OBS_MODE_NONE then continue end
  241.                     if (IsValid(v) and v:GetMoveType() ~= 0 and v:Alive()) then
  242.                         v:DrawModel()
  243.                     end
  244.                 end
  245.             end
  246.         end
  247.        
  248.         for ent, _ in next, props do
  249.             if ent:IsDormant() then continue end
  250.             ent:DrawModel(MANUAL_DRAW)
  251.         end
  252.  
  253.         render.MaterialOverride(nil)
  254.         render.SetColorModulation(1, 1, 1)
  255.         render.SetBlend(1)
  256.         cam.IgnoreZ(false)
  257.         render.SuppressEngineLighting(false)
  258.     cam.End3D()
  259. end
  260.  
  261. local function TogglePropChams()
  262.     MS.PropWalls = not MS.PropWalls
  263.     DoMaterialCheck()
  264. end
  265.  
  266. local function TogglePlayerChams()
  267.     MS.PlayerWalls = not MS.PlayerWalls
  268.     DoMaterialCheck()
  269. end
  270.  
  271. -- ----------------------------------------------------
  272. -- HUD
  273. -- ----------------------------------------------------
  274. local function InvertColour(c)
  275.     return Color(255 - c.r, 255 - c.g, 255 - c.b, 255)
  276. end
  277.  
  278. local function HUDPaint()
  279.     local PlayerColor = MS.PlayerColour
  280.     local PropColor = MS.PropNormalColour
  281.  
  282.     for k, v in pairs(player.GetAll()) do
  283.         if (not IsValid(v) or v == LP or not v:Alive() or v:GetObserverMode() != OBS_MODE_NONE) then continue end
  284.         local pos = (v:GetShootPos() + Vector(0, 0, 10)):ToScreen()
  285.  
  286.         if (MS.ESP) then
  287.             draw.SimpleTextOutlined(string.upper(v:Nick()), "ass", pos.x, pos.y - 16, team.GetColor(v:Team()), 1, 1, 1, InvertColour(team.GetColor(v:Team())))
  288.         end
  289.  
  290.         if (MS.Boxes) then
  291.             cam.Start3D()
  292.             render.DrawWireframeBox(v:GetPos(), v:GetAngles(), v:OBBMins(), v:OBBMaxs(), Color(PlayerColor[1] * 255, PlayerColor[2] * 255, PlayerColor[3] * 255), true)
  293.             cam.End3D()
  294.         end
  295.     end
  296. end
  297.  
  298. -- ----------------------------------------------------
  299. -- FOV
  300. -- ----------------------------------------------------
  301. local function CalcView(ply, pos, angles, fov)
  302.     local view = {
  303.         fov = MS.FOV
  304.     }
  305.  
  306.     return view
  307. end
  308.  
  309. -- ----------------------------------------------------
  310. -- Jump
  311. -- ----------------------------------------------------
  312. local dojump = false
  313.  
  314. local function JumpHook(cmd)
  315.     if cmd:CommandNumber() == 0 then return end
  316.  
  317.     if LP:InVehicle() or LP:GetMoveType() != MOVETYPE_WALK or LP:WaterLevel() > 0 then
  318.         dojump = false
  319.         return
  320.     end
  321.  
  322.     local wantJump = dojump or (MS.BHop and cmd:KeyDown(IN_JUMP))
  323.     if not wantJump then return end
  324.  
  325.     if LP:IsOnGround() then
  326.         dojump = false
  327.         cmd:AddKey(IN_JUMP)
  328.     else
  329.         cmd:RemoveKey(IN_JUMP)
  330.     end
  331. end
  332.  
  333. -- ----------------------------------------------------
  334. -- Rotate
  335. -- ----------------------------------------------------
  336. local function Rotate180()
  337.     local E = LP:EyeAngles()
  338.     LP:SetEyeAngles(Angle(E.p, E.y - 180, E.r))
  339. end
  340.  
  341. local function Rotate180Up()
  342.     local E = LP:EyeAngles()
  343.     LP:SetEyeAngles(Angle(-E.p, E.y - 180, E.r))
  344.     dojump = true
  345. end
  346.  
  347. -- ----------------------------------------------------
  348. -- Menu
  349. -- ----------------------------------------------------
  350. local function OpenMenu()
  351.     if (IsValid(Menu)) then Menu:SetVisible(true) return end
  352.     Menu = vgui.Create("DFrame")
  353.     Menu:SetSize(275, 265)
  354.     Menu:SetPos(ScrW() / 2 - 137.5, ScrH() / 2 - 132.5)
  355.     Menu:ShowCloseButton(false)
  356.     Menu:SetTitle("Minge Script - Noobler Version")
  357.     Menu:MakePopup()
  358.     Menu.Paint = function(self)
  359.         draw.RoundedBox(2, 0, 0, self:GetWide(), self:GetTall(), Color(80, 80, 80, 260))
  360.         draw.RoundedBox(0, 0, 20, self:GetWide(), 2, Color(120, 120, 120, 255))
  361.     end
  362.  
  363.     local Panel = vgui.Create("DPanel", Menu)
  364.     Panel:SetSize(267.5, 235)
  365.     Panel:SetPos(4, 25)
  366.     Panel.Paint = function(self)
  367.         draw.RoundedBox(2, 0, 0, self:GetWide(), self:GetTall(), Color(60, 60, 60, 260))
  368.     end
  369.  
  370.     local PWalls = vgui.Create("DCheckBoxLabel", Panel)
  371.     PWalls:SetPos(5, 5)
  372.     PWalls:SetText("Player Wallhack")
  373.     PWalls:SizeToContents()
  374.     PWalls:SetValue(MS.PlayerWalls)
  375.     PWalls.OnChange = function(self, bVal)
  376.         MS.PlayerWalls = bVal
  377.         DoMaterialCheck()
  378.     end
  379.  
  380.     local PWalls = vgui.Create("DCheckBoxLabel", Panel)
  381.     PWalls:SetPos(130, 5)
  382.     PWalls:SetText("Solid Walls Only")
  383.     PWalls:SizeToContents()
  384.     PWalls:SetValue(MS.WallsAlwaysSolid)
  385.     PWalls.OnChange = function(self, bVal)
  386.         MS.WallsAlwaysSolid = bVal
  387.     end
  388.     PWalls:SetToolTip("Makes Player/Prop wallhack ignore visibility")
  389.  
  390.     local POpacity = vgui.Create("DNumSlider", Panel)
  391.     POpacity:SetPos(10, 20)
  392.     POpacity:SetSize(250, 20)
  393.     POpacity:SetMin(0)
  394.     POpacity:SetMax(99)
  395.     POpacity:SetText("Player Transperency")
  396.     POpacity:SetValue(MS.PlayerOpacity)
  397.     POpacity.OnValueChanged = function(self, val)
  398.         MS.PlayerOpacity = val
  399.     end
  400.  
  401.     local PRed = vgui.Create("DNumSlider", Panel)
  402.     PRed:SetPos(10, 35)
  403.     PRed:SetSize(250, 20)
  404.     PRed:SetMin(0)
  405.     PRed:SetMax(100)
  406.     PRed:SetText("Player Red Colour")
  407.     PRed:SetValue(MS.PlayerColour[1] * 100)
  408.     PRed.OnValueChanged = function(self, val)
  409.         MS.PlayerColour[1] = val / 100
  410.     end
  411.  
  412.     local PGreen = vgui.Create("DNumSlider", Panel)
  413.     PGreen:SetPos(10, 50)
  414.     PGreen:SetSize(250, 20)
  415.     PGreen:SetMin(0)
  416.     PGreen:SetMax(100)
  417.     PGreen:SetText("Player Green Colour")
  418.     PGreen:SetValue(MS.PlayerColour[2] * 100)
  419.     PGreen.OnValueChanged = function(self, val)
  420.         MS.PlayerColour[2] = val / 100
  421.     end
  422.  
  423.     local PBlue = vgui.Create("DNumSlider", Panel)
  424.     PBlue:SetPos(10, 65)
  425.     PBlue:SetSize(250, 20)
  426.     PBlue:SetMin(0)
  427.     PBlue:SetMax(100)
  428.     PBlue:SetText("Player Blue Colour")
  429.     PBlue:SetValue(MS.PlayerColour[3] * 100)
  430.     PBlue.OnValueChanged = function(self, val)
  431.         MS.PlayerColour[3] = val / 100
  432.     end
  433.  
  434.     local PrWalls = vgui.Create("DCheckBoxLabel", Panel)
  435.     PrWalls:SetPos(5, 95)
  436.     PrWalls:SetText("Prop Wallhack")
  437.     PrWalls:SizeToContents()
  438.     PrWalls:SetValue(MS.PropWalls)
  439.     PrWalls.OnChange = function(self, bVal)
  440.         MS.PropWalls = bVal
  441.         DoMaterialCheck()
  442.     end
  443.  
  444.     local PrOpacity = vgui.Create("DNumSlider", Panel)
  445.     PrOpacity:SetPos(10, 110)
  446.     PrOpacity:SetSize(250, 20)
  447.     PrOpacity:SetMin(0)
  448.     PrOpacity:SetMax(99)
  449.     PrOpacity:SetText("Prop Opacity")
  450.     PrOpacity:SetValue(MS.PropOpacity)
  451.     PrOpacity.OnValueChanged = function(self, val)
  452.         MS.PropOpacity = val
  453.     end
  454.  
  455.     local PRed = vgui.Create("DNumSlider", Panel)
  456.     PRed:SetPos(10, 125)
  457.     PRed:SetSize(250, 20)
  458.     PRed:SetMin(0)
  459.     PRed:SetMax(100)
  460.     PRed:SetDecimals(0)
  461.     PRed:SetText("Prop Red Colour")
  462.     PRed:SetValue(MS.PropNormalColour[1] * 100)
  463.     PRed.OnValueChanged = function(self, val)
  464.         MS.PropNormalColour[1] = val / 100
  465.     end
  466.  
  467.     local PGreen = vgui.Create("DNumSlider", Panel)
  468.     PGreen:SetPos(10, 140)
  469.     PGreen:SetSize(250, 20)
  470.     PGreen:SetMin(0)
  471.     PGreen:SetMax(100)
  472.     PGreen:SetDecimals(0)
  473.     PGreen:SetText("Prop Green Colour")
  474.     PGreen:SetValue(MS.PropNormalColour[2] * 100)
  475.     PGreen.OnValueChanged = function(self, val)
  476.         MS.PropNormalColour[2] = val / 100
  477.     end
  478.  
  479.     local PBlue = vgui.Create("DNumSlider", Panel)
  480.     PBlue:SetPos(10, 155)
  481.     PBlue:SetSize(250, 20)
  482.     PBlue:SetMin(0)
  483.     PBlue:SetMax(100)
  484.     PBlue:SetDecimals(0)
  485.     PBlue:SetText("Prop Blue Colour")
  486.     PBlue:SetValue(MS.PropNormalColour[3] * 100)
  487.     PBlue.OnValueChanged = function(self, val)
  488.         MS.PropNormalColour[3] = val / 100
  489.     end
  490.  
  491.     local FOV = vgui.Create("DNumSlider", Panel)
  492.     FOV:SetPos(10, 170)
  493.     FOV:SetSize(250, 20)
  494.     FOV:SetMin(1)
  495.     FOV:SetMax(160)
  496.     FOV:SetDecimals(0)
  497.     FOV:SetText("FOV")
  498.     FOV:SetValue(MS.FOV)
  499.     FOV.OnValueChanged = function(self, val)
  500.         MS.FOV = val
  501.     end
  502.  
  503.     local ESP = vgui.Create("DCheckBoxLabel", Panel)
  504.     ESP:SetValue(MS.ESP)
  505.     ESP:SetText("Player ESP")
  506.     ESP:SetPos(5, 195)
  507.     ESP:SizeToContents()
  508.     ESP.OnChange = function(self, bVal)
  509.         MS.ESP = bVal
  510.     end
  511.  
  512.     local Boxes = vgui.Create("DCheckBoxLabel", Panel)
  513.     Boxes:SetValue(MS.Boxes)
  514.     Boxes:SetText("Bounding Boxes")
  515.     Boxes:SetPos(130, 195)
  516.     Boxes:SizeToContents()
  517.     Boxes.OnChange = function(self, bVal)
  518.         MS.Boxes = bVal
  519.     end
  520.  
  521.     local BHop = vgui.Create("DCheckBoxLabel", Panel)
  522.     BHop:SetValue(MS.BHop)
  523.     BHop:SetText("Auto BHop")
  524.     BHop:SetPos(5, 213)
  525.     BHop:SizeToContents()
  526.     BHop.OnChange = function(self, bVal)
  527.         MS.BHop = bVal
  528.     end
  529. end
  530.  
  531. local function CloseMenu()
  532.     SaveData()
  533.     Menu:SetVisible(false)
  534. end
  535.  
  536. -- ----------------------------------------------------
  537. -- Lifecycle
  538. -- ----------------------------------------------------
  539. local function Install()
  540.     if installed then return end
  541.     installed = true
  542.     LP = LocalPlayer()
  543.  
  544.     RunConsoleCommand("cl_drawspawneffect", 0)
  545.  
  546.     hook.Add("EntityRemoved", "MSPropListRemove", MSPropRemoved)
  547.     hook.Add("NetworkEntityCreated", "MSEntityCreated", DoMaterialCheckSingle)
  548.     hook.Add("InitPostEntity", "MSInitialiseEntites", DoMaterialCheck)
  549.     hook.Add("PreDrawHUD", "MSRender", Wallhack)
  550.     hook.Add("HUDPaint", "MSHUDPaint", HUDPaint)
  551.     hook.Add("CalcView", "MSCalcView", CalcView)
  552.     hook.Add("CreateMove", "MSJump", JumpHook)
  553.  
  554.     concommand.Add("ms_rotate", Rotate180)
  555.     concommand.Add("ms_rotate2", Rotate180Up)
  556.     concommand.Add("+ms_menu", OpenMenu)
  557.     concommand.Add("-ms_menu", CloseMenu)
  558.     concommand.Add("ms_propchams", TogglePropChams)
  559.     concommand.Add("ms_playerchams", TogglePlayerChams)
  560.  
  561.     DoMaterialCheck()
  562. end
  563.  
  564. local function Uninstall()
  565.     if not installed then return end
  566.     installed = false
  567.     dojump = false
  568.  
  569.     hook.Remove("EntityRemoved", "MSPropListRemove")
  570.     hook.Remove("NetworkEntityCreated", "MSEntityCreated")
  571.     hook.Remove("InitPostEntity", "MSInitialiseEntites")
  572.     hook.Remove("PreDrawHUD", "MSRender")
  573.     hook.Remove("HUDPaint", "MSHUDPaint")
  574.     hook.Remove("CalcView", "MSCalcView")
  575.     hook.Remove("CreateMove", "MSJump")
  576.  
  577.     concommand.Remove("ms_rotate")
  578.     concommand.Remove("ms_rotate2")
  579.     concommand.Remove("+ms_menu")
  580.     concommand.Remove("-ms_menu")
  581.     concommand.Remove("ms_propchams")
  582.     concommand.Remove("ms_playerchams")
  583.  
  584.     for ent in pairs(props) do
  585.         if IsValid(ent) then
  586.             ent.RenderOverride = nil
  587.         end
  588.     end
  589.     table.Empty(props)
  590.  
  591.     if IsValid(Menu) then
  592.         Menu:Remove()
  593.         Menu = nil
  594.     end
  595. end
  596.  
  597. local function SetEnabled(on)
  598.     if on then
  599.         Install()
  600.     else
  601.         Uninstall()
  602.     end
  603. end
  604.  
  605. cvars.AddChangeCallback("ms_enable", function(name, old, new)
  606.     SetEnabled(tonumber(new) ~= 0)
  607. end)
  608.  
  609. hook.Add("InitPostEntity", "MSInstaller", function()
  610.     if GetConVar("ms_enable"):GetBool() == true then
  611.         Install()
  612.     end
  613. end)
Comments
Add Comment
Please, Sign In to add comment