fr1kin

MonsterHacks

Apr 23rd, 2011
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.76 KB | None | 0 0
  1. --[[
  2. autorun/client/MonsterHacks.lua
  3. KBz | Monster
  4. ===Begin Stream===
  5. ]]
  6.  
  7. /* Monster Wallhack */
  8. /* By Monster */
  9. /* Steam: amokov_sf */
  10. /* Send me suggestions */
  11.  
  12. local table = table
  13. local concommand = concommand
  14. local timer = timer
  15. local hook = hook
  16. local toggle = true
  17.  
  18. local M = {} -- So I can define shit and keep it clientside
  19.  
  20. M.ConcommandAdd = concommand.Add
  21.  
  22. local function distance(v)
  23. return LocalPlayer():GetPos():Distance(v:GetPos()) -- A few convienince locals
  24. end
  25.  
  26.  
  27.  
  28.  
  29. local advert = CreateClientConVar("M_Advert", 0, false, false)-------------------- ESP ConVars
  30. local traitormode = CreateClientConVar("M_Traitor_Detect", 1, false, false)------- List: advert, traitormode,
  31. local showhealth = CreateClientConVar("MESP_Health", 1, false, false)------------- showhealth, showcorpse, showc4
  32. local showcorpse = CreateClientConVar("MESP_Corpse", 1, false, false)------------- showdistance, tttents, drawdisitance
  33. local showc4 = CreateClientConVar("MESP_C4", 1, false, false)---------------------
  34. local showdistance = CreateClientConVar("MESP_Distance", 1, false, false)--------- The var names should make it easy to
  35. local tttents = CreateClientConVar("MESP_TTTEntities", 1, false, false)----------- see what var does what
  36. local drawdistance = CreateClientConVar("MESP_DrawDistance", 1500, false, false)--
  37.  
  38.  
  39. local gmod_GetWeapons = _R.Player.GetWeapons
  40. traitors = {}
  41. local foundweps = {}
  42. local cleared = false
  43. function M.CheckTraitors() -- Base code taken from faphack
  44. if not GAMEMODE or not GAMEMODE.Name or not string.find(GAMEMODE.Name , "Trouble in Terror") then return end
  45. if #traitors == (#player.GetAll()* 0.25) then return end -- No need to keep finding after all traitors are found.
  46. if traitormode:GetBool() == true then
  47. for k, ply in pairs(player.GetAll()) do
  48. if ply != LocalPlayer() then
  49. for _, wep in pairs(gmod_GetWeapons(ply)) do
  50. if type(wep.CanBuy) == "table" and not table.HasValue(traitors, ply) and not table.HasValue(foundweps, wep) and GetRoundState() == 3 then
  51. if !ply:IsDetective() then
  52. chat.AddText(Color(50, 205, 50), "[MonsterScripts]: "..ply:Nick().." has collected a "..wep:GetClass(), Color(235 , 235 , 235))
  53. table.insert(traitors, k, ply)
  54. table.insert(foundweps, wep)
  55. cleared = false
  56. if advert:GetBool() then
  57. RunConsoleCommand("say", ply:Nick().." is a Traitor, Add me on steam for my hack.")
  58. end
  59. elseif ply:IsDetective() then -- Makes teleporters better protected
  60. table.insert(foundweps, wep)
  61. if table.HasValue(traitors, ply) then
  62. table.remove(traitors, k) -- Fixes an odd bug where detectives register as traitors first round in server.
  63. end
  64. end
  65. end
  66. end
  67. end
  68. if table.HasValue(traitors, ply) and (ply:Health() == 0 or ply:Health() < 0 or ply:Team() == 1002) then
  69. chat.AddText(Color(50 , 205 , 50) , "[MonsterScripts]: A traitor has died.")
  70. for a , b in pairs(traitors) do
  71. if b == ply then
  72. traitors[a] = nil
  73. end
  74. end
  75. end
  76. end
  77. if GetRoundState() == 4 then
  78. traitors = {}
  79. foundweps = {}
  80. end
  81. end
  82. end
  83.  
  84. hook.Add("Think", "FindTraitors", M.CheckTraitors)
  85.  
  86.  
  87.  
  88. -- ESP
  89. timer.Simple(3, function()
  90. print("\nMonster Scripts loaded\nCredits to Flapadar, I use a few of his functions\n")
  91. if string.find(GAMEMODE.Name, "Trouble in") then
  92. M.ConcommandAdd("+trace", function()-- For the easy toggle
  93.  
  94. hook.Add("HUDPaint", "TTTWall", function()
  95. Position = nil
  96. pos = nil
  97. posex = nil
  98. POS = nil
  99.  
  100. for k, v in pairs ( ents.GetAll() ) do
  101. if v:IsValid() and distance(v) <= drawdistance:GetInt() then
  102. if v:IsPlayer() then
  103. local Position = ( v:GetPos() + Vector(0,0,42)):ToScreen()
  104. local Name = ""
  105. local dis = math.Round(LocalPlayer():GetPos():Distance(v:GetPos()))
  106.  
  107. if traitormode:GetBool() == true then
  108. if v:IsValid() and table.HasValue(traitors, v) then
  109. v:SetColor(255,0,0,255)
  110. elseif v:IsValid() and v:IsDetective() then
  111. v:SetColor(0,0,255,255)
  112. else
  113. v:SetColor(0,255,0,255)
  114. end
  115. elseif traitormode:GetBool() == false then
  116. v:SetColor(0,255,0,255)
  117. end
  118.  
  119.  
  120. v:SetMaterial("MonsterMats/player")
  121.  
  122. if v == LocalPlayer() or v:Team() == 1002 then Name = "" else Name = v:Name() end
  123.  
  124. if v:Team() != 1002 then
  125. draw.DrawText( Name, "DefaultLarge", Position.x, Position.y, Color(255,255,255,255), 1 )
  126. end
  127.  
  128. if v == LocalPlayer() or v:Team() == 1002 or v:Health() <= 0 then hp = nil else hp = v:Health() end
  129.  
  130. local POS = (v:GetPos() + Vector(0,0,100)):ToScreen()
  131. if showhealth:GetBool() == true then
  132. if hp != nil and v:IsDetective() != nil then
  133. if v:IsValid() and table.HasValue(traitors, v) then
  134. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(255,0,0,255), 1 )
  135. elseif v:IsValid() and v:IsDetective() then
  136. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,0,255,255), 1 )
  137. else
  138. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,255,0,255), 1 )
  139. end
  140. end
  141. end
  142.  
  143. if showdistance:GetBool() == true and dis != nil and v:Team() != 1002 and v != LocalPlayer() and v:IsDetective() != nil then
  144. dispos = v:GetPos():ToScreen()
  145. if table.HasValue(traitors, v) then
  146. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(255,0,0,255), 1 )
  147. elseif v:IsDetective() then
  148. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,0,255,255), 1 )
  149. else
  150. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,255,0,255), 1 )
  151. end
  152. end
  153. else
  154. if showcorpse:GetBool() == true then
  155. if v:GetClass() == "prop_ragdoll" then
  156. pos = v:GetPos():ToScreen()
  157.  
  158. CORPSE = CORPSE or {}
  159. CORPSE.dti = {BOOL_FOUND = 0, ENT_PLAYER = 0, INT_CREDITS = 0}
  160. local dti = CORPSE.dti
  161.  
  162. if (!v:GetDTBool(dti.BOOL_FOUND) or v:GetDTInt(dti.INT_CREDITS) != 0) and (v:GetDTEntity(ENT_PLAYER)):IsPlayer() then
  163. ent = v:GetDTEntity(ENT_PLAYER)
  164. draw.DrawText( ent:Nick(), "TargetID", pos.x, (pos.y+5), Color( 255, 255, 0, 255 ), 1 )
  165. if v:GetDTInt(dti.INT_CREDITS) != 0 then
  166. draw.DrawText(v:GetDTInt(dti.INT_CREDITS).." credits", "DefaultLarge", pos.x, (pos.y+25), Color( 255, 255, 0, 255 ), 1 )
  167. end
  168. v:SetMaterial("monstermats/player")
  169. else
  170. v:SetMaterial()
  171. end
  172. end
  173. end
  174.  
  175. if tttents:GetBool() == true then
  176. if string.find(v:GetClass(), "ttt") then
  177. if !v:IsWeapon() then
  178. v:SetMaterial("monstermats/player")
  179. v:SetColor(255,255,0,255)
  180. end
  181. end
  182. if v:IsWeapon() then
  183. v:SetMaterial("monstermats/player")
  184. v:SetColor(255,0,150,255)
  185. end
  186. end
  187.  
  188. if showc4:GetBool() == true then
  189. if !v:IsWeapon() and string.find(v:GetClass(), "c4") then
  190. v:SetMaterial("monstermats/player")
  191. v:SetColor(0,255,255,255)
  192. local pos = v:GetPos():ToScreen()
  193. draw.DrawText( "C4", "TargetID", pos.x, (pos.y+5), Color( 0, 255, 255, 255 ), 1 )
  194. end
  195. end
  196.  
  197. end
  198. end
  199. end
  200. end)
  201. end)
  202.  
  203.  
  204. M.ConcommandAdd("-trace", function()
  205. hook.Remove("HUDPaint", "TTTWall")
  206. for k, v in pairs(ents.GetAll()) do
  207. if v:IsValid() then
  208. v:SetMaterial()
  209. v:SetColor(255,255,255,255)
  210. end
  211. end
  212. end)
  213.  
  214. M.ConcommandAdd("MESP_Toggle", function() --Toggle command
  215. if toggle then
  216. hook.Add("HUDPaint", "TTTWall", function()
  217. Position = nil
  218. pos = nil
  219. posex = nil
  220. POS = nil
  221.  
  222. for k, v in pairs ( ents.GetAll() ) do
  223. if distance(v) <= drawdistance:GetInt() then
  224. if v:IsPlayer() then
  225. local Position = ( v:GetPos() + Vector(0,0,42)):ToScreen()
  226. local Name = ""
  227. local dis = math.Round(LocalPlayer():GetPos():Distance(v:GetPos()))
  228.  
  229. v:SetMaterial("MonsterMats/player")
  230.  
  231. if v == LocalPlayer() or v:Team() == 1002 then Name = "" else Name = v:Name() end
  232.  
  233. if v:Team() != 1002 then
  234. draw.DrawText( Name, "DefaultLarge", Position.x, Position.y, Color(255,255,255,255), 1 )
  235. end
  236.  
  237. if traitormode:GetBool() == true then
  238. if v:IsValid() and table.HasValue(traitors, v) then
  239. v:SetColor(255,0,0,255)
  240. elseif v:IsValid() and v:IsDetective() then
  241. v:SetColor(0,0,255,255)
  242. else
  243. v:SetColor(0,255,0,255)
  244. end
  245. elseif traitormode:GetBool() == false then
  246. v:SetColor(0,255,0,255)
  247. end
  248.  
  249. if v == LocalPlayer() or v:Team() == 1002 or v:Health() <= 0 then hp = nil else hp = v:Health() end
  250.  
  251. local POS = (v:GetPos() + Vector(0,0,100)):ToScreen()
  252. if showhealth:GetBool() == true then
  253. if hp != nil and v:IsDetective() != nil then
  254. if v:IsValid() and table.HasValue(traitors, v) then
  255. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(255,0,0,255), 1 )
  256. elseif v:IsValid() and v:IsDetective() then
  257. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,0,255,255), 1 )
  258. else
  259. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,255,0,255), 1 )
  260. end
  261. end
  262. end
  263.  
  264. if showdistance:GetBool() == true and dis != nil and v:Team() != 1002 and v != LocalPlayer() and v:IsDetective() != nil then
  265. dispos = v:GetPos():ToScreen()
  266. if table.HasValue(traitors, v) then
  267. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(255,0,0,255), 1 )
  268. elseif v:IsDetective() then
  269. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,0,255,255), 1 )
  270. else
  271. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,255,0,255), 1 )
  272. end
  273. end
  274. else
  275. if showcorpse:GetBool() == true then
  276. if v:IsValid() and v:GetClass() == "prop_ragdoll" then
  277. pos = v:GetPos():ToScreen()
  278.  
  279. CORPSE = CORPSE or {}
  280. CORPSE.dti = {BOOL_FOUND = 0, ENT_PLAYER = 0, INT_CREDITS = 0}
  281. local dti = CORPSE.dti
  282.  
  283. if (!v:GetDTBool(dti.BOOL_FOUND) or v:GetDTInt(dti.INT_CREDITS) != 0) and (v:GetDTEntity(ENT_PLAYER)):IsPlayer() then
  284. ent = v:GetDTEntity(ENT_PLAYER)
  285. draw.DrawText( ent:Nick(), "TargetID", pos.x, (pos.y+5), Color( 255, 255, 0, 255 ), 1 )
  286. if v:GetDTInt(dti.INT_CREDITS) != 0 then
  287. draw.DrawText(v:GetDTInt(dti.INT_CREDITS).." credits", "DefaultLarge", pos.x, (pos.y+25), Color( 255, 255, 0, 255 ), 1 )
  288. end
  289. v:SetMaterial("monstermats/player")
  290. else
  291. v:SetMaterial()
  292. end
  293. end
  294. end
  295.  
  296. if tttents:GetBool() == true then
  297. if v:IsValid() and string.find(v:GetClass(), "ttt") then
  298. if !v:IsWeapon() then
  299. v:SetMaterial("monstermats/player")
  300. v:SetColor(255,255,0,255)
  301. end
  302. end
  303. if v:IsWeapon() then
  304. v:SetMaterial("monstermats/player")
  305. v:SetColor(255,0,150,255)
  306. end
  307. end
  308.  
  309. if showc4:GetBool() == true then
  310. if v:IsValid() and !v:IsWeapon() and string.find(v:GetClass(), "c4") then
  311. v:SetMaterial("monstermats/player")
  312. v:SetColor(0,255,255,255)
  313. local pos = v:GetPos():ToScreen()
  314. draw.DrawText( "C4", "TargetID", pos.x, (pos.y+5), Color( 0, 255, 255, 255 ), 1 )
  315. end
  316. end
  317. end
  318. end
  319. end
  320. end)
  321. toggle = not toggle
  322. else
  323. hook.Remove("HUDPaint", "TTTWall")
  324. for k, v in pairs(ents.GetAll()) do
  325. if v:IsValid() then
  326. v:SetMaterial()
  327. v:SetColor(255,255,255,255)
  328. end
  329. end
  330. toggle = not toggle
  331. end
  332. end)
  333. else
  334. M.ConcommandAdd("+trace", function()-- Easy swap command(s)
  335.  
  336. hook.Add("HUDPaint", "OtherWall", function()
  337. Position = nil
  338. pos = nil
  339. posex = nil
  340. POS = nil
  341.  
  342. for k, v in pairs ( player.GetAll() ) do
  343. if distance(v) <= drawdistance:GetInt() then
  344. if v:IsValid() then
  345. local Position = ( v:GetPos() + Vector(0,0,42)):ToScreen()
  346. local Name = ""
  347. local dis = math.Round(LocalPlayer():GetPos():Distance(v:GetPos()))
  348. v:SetMaterial("MonsterMats/player")
  349.  
  350. if v == LocalPlayer() then Name = "" else Name = v:Name() end
  351.  
  352. draw.DrawText( Name, "DefaultLarge", Position.x, Position.y, Color(255,255,255,255), 1 )
  353.  
  354. if v == LocalPlayer() or v:Health() <= 0 then hp = nil else hp = v:Health() end
  355.  
  356. local POS = (v:GetPos() + Vector(0,0,100)):ToScreen()
  357. if showhealth:GetBool() == true then
  358. if hp != nil then
  359. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,255,0,255), 1 )
  360. if v:Team() == LocalPlayer():Team() then
  361. v:SetColor(0,255,0,255)
  362. else
  363. v:SetColor(255,0,0,255)
  364. end
  365. end
  366. end
  367.  
  368. if showdistance:GetBool() == true and dis != nil and v != LocalPlayer() then
  369. dispos = v:GetPos():ToScreen()
  370. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,255,0,255), 1 )
  371. end
  372. end
  373. end
  374. end
  375. end)
  376. end)
  377.  
  378. M.ConcommandAdd("-trace", function()
  379. hook.Remove("HUDPaint", "OtherWall")
  380. for k, v in pairs(player.GetAll()) do
  381. if v:IsValid() then
  382. v:SetMaterial()
  383. v:SetColor(255,255,255,255)
  384. end
  385. end
  386. end)
  387.  
  388. --Toggle command
  389. M.ConcommandAdd("MESP_Toggle", function()
  390. if toggle then
  391. hook.Add("HUDPaint", "OtherWall", function()
  392. Position = nil
  393. pos = nil
  394. posex = nil
  395. POS = nil
  396.  
  397. for k, v in pairs ( player.GetAll() ) do
  398. if distance(v) <= drawdistance:GetInt() then
  399. if v:IsValid() then
  400. local Position = ( v:GetPos() + Vector(0,0,42)):ToScreen()
  401. local Name = ""
  402. local dis = math.Round(LocalPlayer():GetPos():Distance(v:GetPos()))
  403. local r,g,b,a = team.GetColor(v:Team())
  404. v:SetMaterial("MonsterMats/player")
  405.  
  406. if v == LocalPlayer() then Name = "" else Name = v:Name() end
  407.  
  408. draw.DrawText( Name, "DefaultLarge", Position.x, Position.y, Color(255,255,255,255), 1 )
  409.  
  410. if v == LocalPlayer() or v:Health() <= 0 then hp = nil else hp = v:Health() end
  411.  
  412. local POS = (v:GetPos() + Vector(0,0,100)):ToScreen()
  413. if showhealth:GetBool() == true then
  414. if hp != nil then
  415. draw.DrawText( "HEALTH: "..hp, "DefaultLarge", POS.x, (POS.y), Color(0,255,0,255), 1 )
  416. v:SetColor(r,g,b,a)
  417. end
  418. end
  419.  
  420. if distance:GetBool() == true and dis != nil and v != LocalPlayer() then
  421. dispos = v:GetPos():ToScreen()
  422. draw.DrawText( dis, "DefaultLarge", dispos.x, dispos.y, Color(0,255,0,255), 1 )
  423. end
  424. end
  425. end
  426. end
  427. end)
  428. toggle = not toggle
  429. else
  430. hook.Remove("HUDPaint", "OtherWall")
  431. for k, v in pairs(player.GetAll()) do
  432. if v:IsValid() then
  433. v:SetMaterial()
  434. v:SetColor(255,255,255,255)
  435. end
  436. end
  437. toggle = not toggle
  438. end
  439. end)
  440. end
  441. end)
  442.  
  443. -- Simple, elegant aimbot
  444.  
  445. local targetmode = CreateClientConVar("MAim_Targetmode", 1, false, false)
  446. local maxdistance = CreateClientConVar("MAim_MaxDistance", 1000, false, false)--
  447. local maxangle = CreateClientConVar("MAim_MaxAngle", 90, false, false)--
  448. local targetteam = CreateClientConVar("MAim_FF", 1, false, false)--
  449. local autoshoot = CreateClientConVar("MAim_Autoshoot", 0, false, false)--
  450. local missshots = CreateClientConVar("MAim_MissShots", 0, false, false)--
  451. local antisnap = CreateClientConVar("MAim_Antisnap", 0, false, false)--
  452. local antisnapspeed = CreateClientConVar("MAim_AntisnapSpeed", 1.25, false, false)--
  453. local norecoil = CreateClientConVar("M_Norecoil", 1, false, false)--
  454. local nospread = CreateClientConVar("M_NoSpread", 1, false, false)--
  455.  
  456. local function TargetMode()
  457. if targetmode:GetInt() == 1 then
  458. return 1 and "Distance"
  459. elseif targetmode:GetInt() == 2 then
  460. return 2 and "Angle"
  461. elseif targetmode:GetInt() == 3 then
  462. return 3 and "Stealth"
  463. end
  464. end
  465.  
  466.  
  467. local function AngDiffrence(v)
  468. local myang = LocalPlayer():GetAngles()
  469. local ang = (v:GetPos() - LocalPlayer():GetPos()):Angle()
  470.  
  471. local angdiffy = math.abs(math.NormalizeAngle( myang.y - ang.y ) )
  472. local angdiffp = math.abs(math.NormalizeAngle( myang.p - ang.p ) )
  473.  
  474. return angdiffy and angdiffp
  475.  
  476. end
  477.  
  478. local function IsPlayerVisible(v)
  479. bone = v:LookupBone("ValveBiped.Bip01_Head1")
  480. bonepos, boneang = v:GetBonePosition(bone)
  481. tracedata = {}
  482. tracedata.start = LocalPlayer():GetShootPos()
  483. tracedata.endpos = bonepos
  484. local trace = util.TraceLine(tracedata)
  485. if trace.Entity == v then
  486. return true
  487. else
  488. return false
  489. end
  490. end
  491.  
  492.  
  493. function _R.Player:GetAdjustedVelocity() -- My velocity compensation brings all the boys to the yard
  494. local vel = self:GetVelocity()
  495. if vel then
  496. if math.Round(LocalPlayer():GetPos():Distance(self:GetPos())) > 200 then
  497. return vel*0.0005
  498. elseif math.Round(LocalPlayer():GetPos():Distance(self:GetPos())) > 400 then
  499. return vel*0.0007
  500. elseif math.Round(LocalPlayer():GetPos():Distance(self:GetPos())) > 600 then
  501. return vel*0.0009
  502. elseif math.Round(LocalPlayer():GetPos():Distance(self:GetPos())) > 800 then
  503. return vel*0.0014
  504. elseif math.Round(LocalPlayer():GetPos():Distance(self:GetPos())) > 1000 then
  505. return vel*0.0018
  506. else
  507. return vel*0.0023
  508. end
  509. end
  510. end
  511.  
  512. local function GetAimTarget()
  513. target = nil
  514. for k, v in ipairs(player.GetAll()) do
  515. if v != LocalPlayer() and v:IsValid() and v:IsPlayer() and IsPlayerVisible(v) and v:Team() != 1002 then
  516. if TargetMode() == "Distance" then
  517. if !target and distance(v) and distance(v) <= maxdistance:GetInt() then
  518. target = v
  519. elseif target and ( distance(v) < distance(target) ) and distance(v) <= maxdistance:GetInt() then
  520. target = v
  521. end
  522. elseif TargetMode() == "Angle" then
  523. if !target and AngDiffrence(v) and AngDiffrence(v) <= maxangle:GetInt() then
  524. target = v
  525. elseif target and ( AngDiffrence(v) < AngDiffrence(target) ) and AngDiffrence(v) <= maxangle:GetInt() then
  526. target = v
  527. end
  528. elseif TargetMode() == "Stealth" then
  529. if LocalPlayer():GetEyeTrace().Entity:IsPlayer() and LocalPlayer():GetEyeTrace().Entity:Team() != 1002 then
  530. target = LocalPlayer():GetEyeTrace().Entity
  531. end
  532. end
  533. end
  534. end
  535. if target then
  536.  
  537. if targetteam:GetBool() == false and ( LocalPlayer():Team() != target:Team() ) and !string.find(GAMEMODE.Name, "Trouble in Terror") then
  538. targetpos = target:EyePos()
  539. return (targetpos)
  540. elseif targetteam:GetBool() == false and string.find(GAMEMODE.Name, "Trouble in Terror") and !LocalPlayer():IsTraitor() and table.HasValue(traitors, target) then
  541. targetpos = target:EyePos()
  542. return (targetpos)
  543. elseif targetteam:GetBool() == false and string.find(GAMEMODE.Name, "Trouble in Terror") and LocalPlayer():IsTraitor() and !target:IsTraitor() then
  544. targetpos = target:EyePos()
  545. return (targetpos)
  546. elseif targetteam:GetBool() == true then
  547. targetpos = target:EyePos()
  548. return (targetpos)
  549. end
  550.  
  551. end
  552. end
  553.  
  554. M.MAimHook = tostring(math.random(1, 99999999))
  555. M.ConcommandAdd("+MAim", function(pl, command, args)
  556. surface.PlaySound("UI/buttonclick.wav")
  557. hook.Add("CreateMove", M.MAimHook, function(cmd)
  558. if GetAimTarget() and type(GetAimTarget()) == "Vector" then
  559. repeat
  560. target = GetAimTarget()
  561. if missshots:GetBool() == true and math.random(20) == 1 and LocalPlayer():KeyDown(IN_ATTACK) then
  562. target = target - Vector(math.random(2),math.random(2),math.random(30))
  563. end
  564.  
  565. if antisnap:GetBool() then
  566. local target = (target - LocalPlayer():GetShootPos()):Angle()
  567. local a = target
  568.  
  569. local curang = LocalPlayer():EyeAngles()
  570. local speed = 0.5 or antisnapspeed:GetFloat()
  571. local retangle = Angle(0 , 0 , 0)
  572.  
  573. retangle.p = math.Approach( math.NormalizeAngle(curang.p) , math.NormalizeAngle(a.p), speed)
  574. retangle.y = math.Approach( math.NormalizeAngle(curang.y) , math.NormalizeAngle(a.y), speed)
  575. retangle.r = 0
  576. M.tang = Angle( retangle.p, retangle.y, retangle.r )
  577. else
  578. M.tang = ( target - LocalPlayer():GetShootPos() ):Angle()
  579. end
  580.  
  581. if autoshoot:GetBool() then
  582. RunConsoleCommand("+attack")
  583. if LocalPlayer():GetActiveWeapon().Primary and LocalPlayer():GetActiveWeapon().Primary.Delay then
  584. timer.Simple(LocalPlayer():GetActiveWeapon().Primary.Delay, RunConsoleCommand, "-attack")
  585. else
  586. timer.Simple(0.05, RunConsoleCommand, "-attack")
  587. end
  588. end
  589. until M.tang
  590.  
  591.  
  592. if nospread:GetBool() and cmd:KeyDown(IN_ATTACK) then
  593. cmd:SetViewAngles( PredictSpread(cmd, M.tang) )
  594. else
  595. cmd:SetViewAngles(M.tang)
  596. end
  597. end
  598. end)
  599. end)
  600.  
  601. M.ConcommandAdd("-MAim", function(pl, command, args)
  602. surface.PlaySound("UI/buttonclickrelease.wav")
  603. hook.Remove("CreateMove", M.MAimHook)
  604. hook.Remove("Think", "l337h4x")
  605. M.tang = nil
  606. end)
  607.  
  608.  
  609.  
  610. -- Menu
  611.  
  612. local function ShouldCheck( strConVar )
  613. if strConVar and strConVar:GetBool() and strConVar:GetBool() == true then
  614. return true
  615. elseif strConVar and strConVar:GetBool() and strConVar:GetBool() == false then
  616. return false
  617. end
  618. end
  619.  
  620. M.ConcommandAdd("M_Menu", function()
  621. RunConsoleCommand("ms_pato")
  622. local MFrame = vgui.Create('DFrame')
  623. MFrame:SetPos(10,10)
  624. MFrame:SetSize(350, 450)
  625. MFrame:SetTitle("Monster Scripts - Because we can't aim")
  626. MFrame:SetSizable(false)
  627. MFrame:MakePopup()
  628. function MFrame:Paint()
  629. draw.RoundedBox(10, 5, 5, 350, 450, Color(50,50,50,255))
  630. end
  631.  
  632. local ESPCollapse = vgui.Create('DCollapsibleCategory', MFrame)
  633. ESPCollapse:SetPos(20, 20)
  634. ESPCollapse:SetSize(150, 25)
  635. ESPCollapse:SetExpanded(false)
  636. ESPCollapse:SetLabel(' ESP') -- So it's all sexy and centered
  637.  
  638. local ESPList = vgui.Create('DPanelList')
  639. ESPList:SetAutoSize(true)
  640. ESPList:SetSpacing( 6 )
  641. ESPList:EnableHorizontal(true)
  642.  
  643. ESPCollapse:SetContents( ESPList )
  644.  
  645. local tatordet = vgui.Create( "DCheckBoxLabel" )
  646. tatordet:SetText( "Detect Traitors" )
  647. tatordet:SetConVar( "M_Traitor_Detect" )
  648. tatordet:SetValue( ShouldCheck( traitormode ) )
  649. tatordet:SizeToContents()
  650. ESPList:AddItem( tatordet )
  651.  
  652. local c4box = vgui.Create( "DCheckBoxLabel" )
  653. c4box:SetText( "Show C4" )
  654. c4box:SetConVar( "MESP_C4" )
  655. c4box:SetValue( ShouldCheck( showc4 ) )
  656. c4box:SizeToContents()
  657. ESPList:AddItem( c4box )
  658.  
  659. local healthbox = vgui.Create( "DCheckBoxLabel" )
  660. healthbox:SetText( "Show Health" )
  661. healthbox:SetConVar( "MESP_Health" )
  662. healthbox:SetValue( ShouldCheck( showhealth ) )
  663. healthbox:SizeToContents()
  664. ESPList:AddItem( healthbox )
  665.  
  666. local corpsebox = vgui.Create( "DCheckBoxLabel" )
  667. corpsebox:SetText( "Show Corpses" )
  668. corpsebox:SetConVar( "MESP_Corpse" )
  669. corpsebox:SetValue( ShouldCheck( showcorpse ) )
  670. corpsebox:SizeToContents()
  671. ESPList:AddItem( corpsebox )
  672.  
  673. local distancebox = vgui.Create( "DCheckBoxLabel" )
  674. distancebox:SetText( "Show Distance" )
  675. distancebox:SetConVar( "MESP_Distance" )
  676. distancebox:SetValue( ShouldCheck( traitormode ) )
  677. distancebox:SizeToContents()
  678. ESPList:AddItem( distancebox )
  679.  
  680. local tttentsbox = vgui.Create( "DCheckBoxLabel" )
  681. tttentsbox:SetText( "Show TTT Entities" )
  682. tttentsbox:SetConVar( "MESP_TTTEntities" )
  683. tttentsbox:SetValue( ShouldCheck( tttents ) )
  684. tttentsbox:SizeToContents()
  685. ESPList:AddItem( tttentsbox )
  686.  
  687. local drawothermodels = GetConVar("ms_r_drawothermodels")
  688.  
  689. local function othermodelscheck()
  690. if drawothermodels:GetInt() == 1 || drawothermodels:GetInt() == 0 then
  691. return false
  692. end
  693. return true
  694. end
  695.  
  696. local dllwallsbox = vgui.Create( "DCheckBoxLabel" )
  697. dllwallsbox:SetText( "r_drawothermodels" )
  698. dllwallsbox:SetValue( othermodelscheck() )
  699. dllwallsbox:SizeToContents()
  700. dllwallsbox.OnChange = function(self, value)
  701. if value == true then
  702. RunConsoleCommand("ms_r_drawothermodels", "2")
  703. else
  704. RunConsoleCommand("ms_r_drawothermodels", "1")
  705. end
  706. end
  707. ESPList:AddItem( dllwallsbox )
  708.  
  709. local advertbox = vgui.Create( "DCheckBoxLabel" )
  710. advertbox:SetText( "Advertize" )
  711. advertbox:SetConVar( "M_Advert" )
  712. advertbox:SetValue( ShouldCheck( advert ) )
  713. advertbox:SizeToContents()
  714. ESPList:AddItem( advertbox )
  715.  
  716. local drawdisslider = vgui.Create( "DNumSlider" )
  717. drawdisslider:SetSize( 150, 50 ) -- Keep the second number at 50
  718. drawdisslider:SetText( "Draw Distance" )
  719. drawdisslider:SetMin( 500 )
  720. drawdisslider:SetMax( 5000 )
  721. drawdisslider:SetDecimals( 0 )
  722. drawdisslider:SetConVar( "MESP_DrawDistance" )
  723. drawdisslider:SetValue(drawdistance:GetInt())
  724. ESPList:AddItem( drawdisslider )
  725.  
  726. local AimCollapse = vgui.Create('DCollapsibleCategory', MFrame)
  727. AimCollapse:SetPos(185, 20)
  728. AimCollapse:SetSize(150, 25)
  729. AimCollapse:SetExpanded(false)
  730. AimCollapse:SetLabel(' Aimbot') -- So it's all sexy and centered
  731.  
  732. local AimList = vgui.Create('DPanelList')
  733. AimList:SetAutoSize(true)
  734. AimList:SetSpacing( 6 )
  735.  
  736. AimCollapse:SetContents( AimList )
  737.  
  738. local ffbox = vgui.Create( "DCheckBoxLabel" )
  739. ffbox:SetText( "Friendly Fire" )
  740. ffbox:SetConVar( "MAim_FF" )
  741. ffbox:SetValue( ShouldCheck( targetteam ) )
  742. ffbox:SizeToContents()
  743. AimList:AddItem( ffbox )
  744.  
  745. local autoshootbox = vgui.Create( "DCheckBoxLabel" )
  746. autoshootbox:SetText( "Auto-Shoot" )
  747. autoshootbox:SetConVar( "MAim_Autoshoot" )
  748. autoshootbox:SetValue( ShouldCheck( autoshoot ) )
  749. autoshootbox:SizeToContents()
  750. AimList:AddItem( autoshootbox )
  751.  
  752. local missshotsbox = vgui.Create( "DCheckBoxLabel" )
  753. missshotsbox:SetText( "Miss Shots" )
  754. missshotsbox:SetConVar( "MAim_MissShots" )
  755. missshotsbox:SetValue( ShouldCheck( missshots ) )
  756. missshotsbox:SizeToContents()
  757. AimList:AddItem( missshotsbox )
  758.  
  759. local antisnapbox = vgui.Create( "DCheckBoxLabel" )
  760. antisnapbox:SetText( "Anti-snap" )
  761. antisnapbox:SetConVar( "MAim_Antisnap" )
  762. antisnapbox:SetValue( ShouldCheck( antisnap ) )
  763. antisnapbox:SizeToContents()
  764. AimList:AddItem( antisnapbox )
  765.  
  766. local norecoilbox = vgui.Create( "DCheckBoxLabel" )
  767. norecoilbox:SetText( "No Recoil" )
  768. norecoilbox:SetConVar( "M_Norecoil" )
  769. norecoilbox:SetValue( ShouldCheck( norecoil ) )
  770. norecoilbox:SizeToContents()
  771. AimList:AddItem( norecoilbox )
  772.  
  773. local nospreadbox = vgui.Create( "DCheckBoxLabel" )
  774. nospreadbox:SetText( "No Spread" )
  775. nospreadbox:SetConVar( "M_Nospread" )
  776. nospreadbox:SetValue( ShouldCheck( nospread ) )
  777. nospreadbox:SizeToContents()
  778. AimList:AddItem( nospreadbox )
  779.  
  780. local maxdisslider = vgui.Create( "DNumSlider" )
  781. maxdisslider:SetSize( 150, 50 ) -- Keep the second number at 50
  782. maxdisslider:SetText( "Max Distance" )
  783. maxdisslider:SetMin( 1 )
  784. maxdisslider:SetMax( 8000 )
  785. maxdisslider:SetDecimals( 0 )
  786. maxdisslider:SetConVar( "MAim_MaxDistance" )
  787. maxdisslider:SetValue(maxdistance:GetInt())
  788. AimList:AddItem( maxdisslider )
  789.  
  790. local maxangslider = vgui.Create( "DNumSlider" )
  791. maxangslider:SetSize( 150, 50 ) -- Keep the second number at 50
  792. maxangslider:SetText( "MaxAngle" )
  793. maxangslider:SetMin( 1 )
  794. maxangslider:SetMax( 180 )
  795. maxangslider:SetDecimals( 0 )
  796. maxangslider:SetConVar( "MAim_MaxAngle" )
  797. maxangslider:SetValue(maxangle:GetInt())
  798. AimList:AddItem( maxangslider )
  799.  
  800. local antisnapspeedsl = vgui.Create( "DNumSlider" )
  801. antisnapspeedsl:SetSize( 150, 50 ) -- Keep the second number at 50
  802. antisnapspeedsl:SetText( "Anti-Snap Speed" )
  803. antisnapspeedsl:SetMin( 0 )
  804. antisnapspeedsl:SetMax( 20 )
  805. antisnapspeedsl:SetDecimals( 0 )
  806. antisnapspeedsl:SetConVar( "MAim_AntisnapSpeed" )
  807. antisnapspeedsl:SetValue(antisnapspeed:GetInt())
  808. AimList:AddItem( antisnapspeedsl )
  809.  
  810. end)
  811. timer.Simple(5, function()
  812. hook.Add("Tick", "Norecoil", function()
  813. if norecoil:GetBool() and LocalPlayer() and LocalPlayer():GetActiveWeapon() and LocalPlayer():GetActiveWeapon().Primary and LocalPlayer():GetActiveWeapon().Primary.Recoil then
  814. LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
  815. end
  816. end)
  817. end)
  818.  
  819. -- Requested by GodOfCake
  820. M.ConcommandAdd("M_Traitor_Print", function()
  821. chat.AddText(Color(50, 205, 50), "[MonsterScripts]: Traitor List:")
  822. for k, v in pairs(traitors) do
  823. chat.AddText(Color(50, 205, 50), v:Nick())
  824. end
  825. chat.PlaySound()
  826. end)
  827.  
  828.  
  829.  
  830.  
  831. M.ConcommandAdd("+MSpeed", function()
  832. RunConsoleCommand("ms_pato")
  833. RunConsoleCommand("ms_sv_cheats", "1")
  834. if speedfac then -- So we still get a speed boost without having to edit the value
  835. RunConsoleCommand("ms_host_timescale", speedfac)
  836. else
  837. RunConsoleCommand("ms_host_timescale", "5")
  838. end
  839. end)
  840.  
  841. M.ConcommandAdd("-MSpeed", function()
  842. RunConsoleCommand("ms_sv_cheats", "0")
  843. RunConsoleCommand("ms_host_timescale", "1")
  844. end)
  845.  
  846. M.ConcommandAdd("+MPause", function()
  847. RunConsoleCommand("ms_pato")
  848. RunConsoleCommand("ms_sv_cheats", "1")
  849. if speedfac then -- So we still get a speed boost without having to edit the value
  850. RunConsoleCommand("ms_host_timescale", speedfac)
  851. else
  852. RunConsoleCommand("ms_host_timescale", ".25")
  853. end
  854. end)
  855.  
  856. M.ConcommandAdd("-MPause", function()
  857. RunConsoleCommand("ms_sv_cheats", "0")
  858. RunConsoleCommand("ms_host_timescale", "1")
  859. end)
  860.  
  861. concommand.Add("fap_menu", function() print("Hai") end)
  862.  
  863.  
  864. require("howboutno") -- gmcl_deco
  865.  
  866. local CustomCones = {}
  867. CustomCones["#HL2_SMG1"] = Vector( -0.04362, -0.04362, -0.04362 )
  868. CustomCones["#HL2_Pistol"] = Vector( -0.0100, -0.0100, -0.0100 )
  869. CustomCones["#HL2_Pulse_Rifle"] = Vector( -0.02618, -0.02618, -0.02618 )
  870. CustomCones["#HL2_Shotgun"] = Vector( -0.08716, -0.08716, -0.08716 )
  871.  
  872.  
  873.  
  874. function PredictSpread( cmd, aimAngle ) -- Credits to seth, wrote the function, and fisheater, helped me with my errors
  875. local cmd2, seed = mns_fuck_garrysmodtion( cmd )
  876. local currentseed = 0, 0, 0
  877. if( cmd2 != 0 ) then currentseed = seed end
  878. local wep = LocalPlayer():GetActiveWeapon()
  879. local vecCone, valCone = Vector( 0, 0, 0 )
  880. if( ValidEntity( wep ) ) then
  881. if( wep.Initialize || (wep.Base && wep.Base == "weapon_perp_base")) then
  882. valCone = wep.Primary && wep.Primary.Cone || 0
  883. if( tonumber( valCone ) ) then
  884. vecCone = Vector( -valCone, -valCone, -valCone )
  885. elseif( type( valCone ) == "Vector" ) then
  886. vecCone = -1 * valCone
  887. end
  888. else
  889. local pn = wep:GetPrintName()
  890. if( CustomCones[pn] ) then vecCone = CustomCones[pn] end
  891. end
  892. end
  893. return mns_nosoup4yu( currentseed || 0, ( aimAngle || LocalPlayer():GetAimVector():Angle() ):Forward(), vecCone ):Angle()
  894. end
  895.  
  896. function file.Read()
  897. return nil
  898. end
Add Comment
Please, Sign In to add comment