Advertisement
Guest User

Monsterbot

a guest
Jun 22nd, 2013
851
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.73 KB | None | 0 0
  1. local MonsterBot = { Menu = { t = {}; b = {}; c = 0;}; Alive = {}; Spectators = {};}
  2.  
  3. Msg( "\n[MonsterBot] Loaded\n" )
  4. Msg( "For a List of Binds look Below\n" )
  5. Msg( "Bind Key Toggle Misc_removelaser <Laser\n" )
  6. Msg( "Bind Key Toggle Monster_aimassist <AimAssist\n" )
  7. Msg( "Bind Key ThrowMagneto <PropKill\n" )
  8. Msg( "MBN_toggle <FreeCam\n\n" )
  9.  
  10. MonsterBot.Normal = {
  11. aimbot = true;
  12. aimbot_fov = 15;
  13. aimbot_friendly_fire = true;
  14. triggerbot = false;
  15. norecoil = false;
  16.  
  17. esp_player = false;
  18. esp_player_dist = 16000;
  19. esp_player_showdist = false;
  20. esp_player_name = false;
  21. esp_player_rank = false;
  22. esp_player_health = false;
  23. esp_player_armor = false;
  24. esp_player_glow = false;
  25.  
  26. esp_entity = false;
  27. esp_entity_dist = 16000;
  28. esp_entity_glow = false;
  29.  
  30. flashlight_spam = false;
  31. thirdperson = false;
  32.  
  33. darkrp_money = false;
  34. darkrp_god = false;
  35.  
  36. ttt_deathnotifs = false;
  37. ttt_showalive = false;
  38.  
  39. perp_fuel = false;
  40.  
  41. developer = false;
  42.  
  43. }
  44. MonsterBot.Settings = (file.Exists("d_settings.txt", "DATA") and util.JSONToTable(file.Read("d_settings.txt", "DATA"))) or MonsterBot.Normal
  45. MonsterBot.Entities = (file.Exists("d_entities.txt", "DATA") and util.JSONToTable(file.Read("d_entities.txt", "DATA"))) or {}
  46. MonsterBot.Whitelist = (file.Exists("d_whitelist.txt", "DATA") and util.JSONToTable(file.Read("d_whitelist.txt", "DATA"))) or {}
  47. MonsterBot.AimKey = (file.Exists("d_aimkey.txt", "DATA") and tonumber(file.Read("d_aimkey.txt", "DATA"))) or KEY_LALT
  48. MonsterBot.Triggerkey = (file.Exists("d_trigkey.txt", "DATA") and tonumber(file.Read("d_trigkey.txt", "DATA"))) or KEY_LALT
  49. MonsterBot.Phrases = {
  50. " Monsterbot";
  51. " Monsterbot";
  52. " Monsterbot";
  53. " Monsterbot";
  54. }
  55.  
  56. MonsterBot.Keys = {
  57. "KEY_0", "KEY_1", "KEY_2", "KEY_3", "KEY_4", "KEY_5",
  58. "KEY_6", "KEY_7", "KEY_8", "KEY_9", "KEY_A", "KEY_B", "KEY_C",
  59. "KEY_D", "KEY_E", "KEY_F", "KEY_G", "KEY_H", "KEY_I", "KEY_J",
  60. "KEY_K", "KEY_L", "KEY_M", "KEY_N", "KEY_O", "KEY_P", "KEY_Q",
  61. "KEY_R", "KEY_S", "KEY_T", "KEY_U", "KEY_V", "KEY_W", "KEY_X",
  62. "KEY_Y", "KEY_Z", "KEY_PAD_0", "KEY_PAD_1", "KEY_PAD_2", "KEY_PAD_3",
  63. "KEY_PAD_4", "KEY_PAD_5", "KEY_PAD_6", "KEY_PAD_7", "KEY_PAD_8", "KEY_PAD_9",
  64. "KEY_PAD_DIVIDE", "KEY_PAD_MULTIPLY", "KEY_PAD_MINUS", "KEY_PAD_PLUS", "KEY_PAD_ENTER",
  65. "KEY_PAD_DECIMAL", "KEY_LBRACKET", "KEY_RBRACKET", "KEY_SEMICOLON", "KEY_APOSTROPHE",
  66. "KEY_BACKQUOTE", "KEY_COMMA", "KEY_PERIOD", "KEY_SLASH", "KEY_BACKSLASH", "KEY_MINUS",
  67. "KEY_EQUAL", "KEY_ENTER", "KEY_SPACE", "KEY_BACKSPACE", "KEY_TAB", "KEY_CAPSLOCK",
  68. "KEY_NUMLOCK", "KEY_ESCAPE", "KEY_SCROLLLOCK", "KEY_INSERT", "KEY_DELETE", "KEY_HOME",
  69. "KEY_END", "KEY_PAGEUP", "KEY_PAGEDOWN", "KEY_BREAK", "KEY_LSHIFT", "KEY_RSHIFT",
  70. "KEY_LALT", "KEY_RALT", "KEY_LCONTROL", "KEY_RCONTROL", "KEY_LWIN", "KEY_RWIN",
  71. "KEY_APP", "KEY_UP", "KEY_LEFT", "KEY_DOWN", "KEY_RIGHT", "KEY_F1", "KEY_F2",
  72. "KEY_F3", "KEY_F4", "KEY_F5", "KEY_F6", "KEY_F7", "KEY_F8", "KEY_F9",
  73. "KEY_F10", "KEY_F11", "KEY_F12", "KEY_CAPSLOCKTOGGLE", "KEY_NUMLOCKTOGGLE",
  74. "KEY_SCROLLLOCKTOGGLE"
  75. };
  76.  
  77. for k,v in pairs(MonsterBot.Normal) do
  78. if MonsterBot.Settings[k] == nil then
  79. MonsterBot.Settings = MonsterBot.Normal
  80. -- so that if a new key is added to the normal config, the Settings will reset
  81. end
  82. end
  83.  
  84. -- functions
  85. function MonsterBot.Alert(str)
  86. chat.AddText(Color(255,0,0,255), "[MonsterBot] ", Color(100,100,100,255), str)
  87. chat.PlaySound()
  88. end
  89. function MonsterBot.Update(x,y,z, ok)
  90. if x == "setting" then
  91. MonsterBot.Settings[y] = z
  92. if ok == true then
  93. file.Write("d_settings.txt", util.TableToJSON(MonsterBot.Settings))
  94. end
  95. elseif x == "entity" then
  96. file.Write("d_entities.txt", util.TableToJSON(MonsterBot.Entities))
  97. elseif x == "friend" then
  98. file.Write("d_whitelist.txt", util.TableToJSON(MonsterBot.Whitelist))
  99. end
  100. if not(file.Exists("d_aimkey.txt", "DATA")) then file.Write("d_aimkey.txt", "") end
  101. if not(file.Exists("d_trigkey.txt", "DATA")) then file.Write("d_trigkey.txt", "") end
  102. end
  103. function MonsterBot.ESPCheck(typ, v)
  104. if typ == "player" then
  105. if v:Alive() && v:Health() >= 1 && v ~= LocalPlayer() /*&& /*LocalPlayer():Alive() &&*/ /*LocalPlayer():Team() ~= TEAM_SPECTATOR*/ then
  106. return true
  107. end
  108. elseif typ == "entity" then
  109. if IsValid(v) then
  110. return true
  111. end
  112. end
  113. return false
  114. end
  115. function MonsterBot.ESPDistance(typ, v)
  116. if typ == "player" then
  117. if MonsterBot.Settings["esp_player_dist"] >= 16000 then
  118. return true
  119. elseif v:GetPos():Distance(LocalPlayer():GetPos()) < (MonsterBot.Settings["esp_player_dist"]) then
  120. return true
  121. end
  122. elseif typ == "entity" then
  123. if MonsterBot.Settings["esp_entity_dist"] >= 16000 then
  124. return true
  125. elseif v:GetPos():Distance(LocalPlayer():GetPos()) < (MonsterBot.Settings["esp_entity_dist"]) then
  126. return true
  127. end
  128. end
  129. return false
  130. end
  131. function MonsterBot.GetShootPos(ent)
  132. local eyes = ent:LookupAttachment("eyes");
  133. if(eyes ~= 0) then
  134. eyes = ent:GetAttachment(eyes);
  135. if(eyes and eyes.Pos) then
  136. return eyes.Pos, eyes.Ang;
  137. end
  138. end
  139. end
  140. function MonsterBot.Visible(ent)
  141. local pos = LocalPlayer():GetShootPos()
  142. local ang = LocalPlayer():GetAimVector()
  143. local trace = {start = LocalPlayer():GetShootPos(), endpos = MonsterBot.GetShootPos(ent), filter = {LocalPlayer(), ent}, mask = 1174421507};
  144. local tr = util.TraceLine(trace);
  145. return(tr.Fraction == 1);
  146. end
  147. function MonsterBot.Whitelisted(ent)
  148. if MonsterBot.Whitelist[ent:SteamID()] then return true
  149. else return false end
  150. end
  151. function MonsterBot.CanTarget(v)
  152. if v:IsPlayer() then
  153. if (MonsterBot.Visible(v) and (not MonsterBot.Whitelisted(v)) and v:Alive() and (v:Health() > 0) and v:Team() ~= TEAM_SPECTATOR) then
  154. if (v ~= LocalPlayer() and LocalPlayer():Alive() and LocalPlayer():Team() ~= TEAM_SPECTATOR) then
  155. if not(MonsterBot.Settings["aimbot_friendly_fire"]) then
  156. if (v:Team() ~= LocalPlayer():Team()) then
  157. return true
  158. end
  159. else
  160. return true
  161. end
  162. end
  163. end
  164. end
  165. return false
  166. end
  167.  
  168. function MonsterBot.Ents()
  169. local t = {}
  170. for k,v in pairs(ents.GetAll()) do
  171. if IsValid(v) and not(table.HasValue(t, v:GetClass())) then
  172. table.insert(t, v:GetClass())
  173. end
  174. end
  175. table.sort(t, function(a,b) return a < b end)
  176.  
  177. return t
  178. end
  179. -- intro
  180. MonsterBot.Alert("MonsterBot loaded successfully! Hold TAB and Q to open the menu!")
  181. -- fonts
  182. surface.CreateFont("monsfont", {
  183. font = "impact",
  184. size = 64
  185. });
  186. surface.CreateFont("monsfontesp1", {
  187. font="TabLarge",
  188. size=13,
  189. weight=700
  190. });
  191. surface.CreateFont("monsfontesp2", {
  192. font="TabLarge",
  193. size=10,
  194. weight=700
  195. });
  196. surface.CreateFont("monsfontesp3", {
  197. font="verdana",
  198. size=20,
  199. weight=700
  200. });
  201. -- short vars
  202. local menu = MonsterBot.Menu
  203. local current = MonsterBot.Current
  204. local alive = MonsterBot.Alive
  205. local normal = MonsterBot.Normal
  206. local settings = MonsterBot.Settings
  207. local entities = MonsterBot.Entities
  208. local whitelist = MonsterBot.Whitelist
  209. local phrases = MonsterBot.Phrases
  210. local espcheck = MonsterBot.ESPCheck
  211. local espdistance = MonsterBot.ESPDistance
  212. local G = table.Copy(_G)
  213. local R = table.Copy(_R)
  214. -- testing
  215. /*G.rawset(_G, "__metatable", false)
  216. G.rawset(_G, "RunConsoleCommand", MonsterBot.RCC)
  217. G.setmetatable(_G, {
  218. __index = function(t , k)
  219. if(k == "hook") then
  220. return G.hook;
  221. end
  222. if(k == "require") then
  223. return G.require;
  224. end
  225. if(k == "concommand") then
  226. return G.concommand;
  227. end
  228. if(k == "engineConsoleCommand") then
  229. return G.engineConsoleCommand;
  230. end
  231. if(k == "RunConsoleCommand") then
  232. return MonsterBot.RCC;
  233. end
  234. if(k == "RunString") then
  235. return G.RunString;
  236. end
  237. if(k == "RunStringEx") then
  238. return G.RunStringEx;
  239. end
  240. end,
  241. __metatable = true,
  242. });
  243.  
  244. function MonsterBot.RCC(cmd, ...)
  245. MonsterBot.Alert("cmd = "..cmd.." ... = ")
  246. return G.RunConsoleCommand(cmd, ...);
  247. end*/
  248. -- menu
  249. local function AddTab(txt, tab, func)
  250. menu.c = menu.c + 1 -- increase the counter for the amount of tabs
  251. local panel
  252. if tab and tab == true then
  253. panel = vgui.Create("DPanel", menu.frame);
  254. panel:SetPos(120,25);
  255. panel:SetSize(376,406);
  256. if menu.Current == txt then
  257. panel:SetVisible(true)
  258. else
  259. panel:SetVisible(false)
  260. end
  261. panel.Paint = function()
  262. surface.SetDrawColor( 10, 10, 10, 255 )
  263. surface.DrawOutlinedRect( 0, 0, panel:GetWide() - 1, panel:GetTall() - 1)
  264. draw.SimpleText(string.upper(txt), "monsfont", 10, 5, Color(210, 210, 210, 255), TEXT_ALIGN_LEFT);
  265. end
  266. end
  267. local button = vgui.Create("DButton", menu.buttons);
  268. button:SetText(txt);
  269. button:SetSize(80, 20);
  270. button:SetPos(15, -15+(25*menu.c));
  271. button:SetTextColor(color_white)
  272. button.Paint = function(self)
  273. surface.SetDrawColor(100,100,100,220)
  274. surface.DrawRect(0, 0,self:GetSize())
  275. surface.SetDrawColor(0,0,0,255)
  276. surface.DrawOutlinedRect(0,0,self:GetSize())
  277. end
  278. button.DoClick = func or (tab and tab == true and function()
  279. for k,v in pairs(menu.t) do
  280. if v ~= panel then
  281. v:SetVisible(false)
  282. end
  283. end
  284. panel:SetVisible(true)
  285. menu.Current = txt
  286. surface.PlaySound("ambient/levels/canals/drip4.wav");
  287. end)
  288. return panel, button;
  289. end
  290.  
  291. local function AddFeature(id, parent, typ, name, setting, o1, o2)
  292. if not parent then return end
  293. if typ == "button" then
  294. local label = vgui.Create("DLabel", parent)
  295. label:SetText(name)
  296. label:SetPos(5,(55+(id*25)))
  297. label:SizeToContents(false)
  298. local button = vgui.Create("DButton", parent)
  299. if MonsterBot.Settings[setting] == true then
  300. button:SetText("enabled")
  301. else
  302. button:SetText("disabled")
  303. end
  304. button:SetSize(80,20)
  305. if not id then
  306. button:SetPos(285,45)
  307. else
  308. button:SetPos(285,(55+(id*25)))
  309. end
  310. button.DoClick = function()
  311. if button:GetText() == "enabled" then
  312. button:SetText("disabled"); MonsterBot.Update("setting", setting, false, true)
  313. else
  314. button:SetText("enabled"); MonsterBot.Update("setting", setting, true, true)
  315. end
  316. end
  317. button:SetTextColor(color_white)
  318. button.Paint = function(self)
  319. surface.SetDrawColor(100,100,100,220)
  320. surface.DrawRect(0, 0,self:GetSize())
  321. surface.SetDrawColor(0,0,0,255)
  322. surface.DrawOutlinedRect(0,0,self:GetSize())
  323. end
  324. return button,label
  325. elseif typ == "slider" then
  326. local slider = vgui.Create("DNumSlider", parent)
  327. slider:SetPos(5, (45+(id*25)))
  328. slider:SetText(name)
  329. slider:SetMinMax(o1, o2)
  330. slider:SetWide(372.5)
  331. slider:SetDecimals( 0 )
  332. slider:SetFGColor(255,255,255,255)
  333. slider:SetBGColor(255,255,255,255)
  334. slider:SetValue(MonsterBot.Settings[setting])
  335. slider.OnValueChanged = function(panel, value)
  336. local c = tonumber(value)
  337. MonsterBot.Update("setting", setting, math.Round(c), true)
  338. end
  339. return slider;
  340. end
  341. end
  342.  
  343. local function AddButton(parent, text, posx, posy, func)
  344. local button = vgui.Create("DButton", parent)
  345. button:SetText(text)
  346. button:SetSize(80,20)
  347. button:SetPos(posx,posy)
  348. button:SetTextColor(color_white)
  349. button.DoClick = func or function() end
  350. button.Paint = function(self)
  351. surface.SetDrawColor(100,100,100,220)
  352. surface.DrawRect(0, 0,self:GetSize())
  353. surface.SetDrawColor(0,0,0,255)
  354. surface.DrawOutlinedRect(0,0,self:GetSize())
  355. end
  356. return button
  357. end
  358.  
  359. local function DrawMenu()
  360. if(menu.frame) then menu.frame:Remove(); menu.frame = nil; end
  361.  
  362. menu.c = 0
  363.  
  364. menu.frame = vgui.Create("DFrame");
  365. --menu.frame:SetPos(ScrW()/2-184, ScrH()/2-155);
  366. menu.frame:SetSize(500, 435);
  367. menu.frame:Center()
  368. menu.frame:SetTitle("MonsterBot"..MonsterBot.Phrases[math.random(1, table.Count(MonsterBot.Phrases))]);
  369. menu.frame.Paint = function()
  370. surface.SetDrawColor(138,132,132,150)
  371. surface.DrawRect(0, 0,menu.frame:GetWide(),menu.frame:GetTall())
  372. surface.SetDrawColor(0,0,0,255)
  373. surface.DrawOutlinedRect(0,0,menu.frame:GetWide(),menu.frame:GetTall())
  374. end
  375. menu.frame:SetVisible(true);
  376. menu.frame:SetDraggable(true);
  377. menu.frame:SetSizable(false);
  378. menu.frame:ShowCloseButton(false);
  379. menu.frame:SetBackgroundBlur(true)
  380. menu.frame:MakePopup();
  381.  
  382. menu.close = vgui.Create("DButton", menu.frame)
  383. menu.close:SetFont('marlett')
  384. menu.close:SetText('r')
  385. menu.close:SetColor(Color(255, 255, 255))
  386. menu.close:SetSize(15, 15)
  387. menu.close:SetDrawBackground(false)
  388. menu.close:SetPos(menu.frame:GetWide() - 20, 5)
  389. menu.close.DoClick = function()
  390. menu.frame:Remove(); menu.frame = nil;
  391. end
  392.  
  393. menu.buttons = vgui.Create("DPanel",menu.frame)
  394. menu.buttons:SetPos(5, 25)
  395. menu.buttons:SetSize(111,406)
  396. menu.buttons:SetVisible(true)
  397. menu.buttons.Paint = function()
  398. surface.SetDrawColor(10,10,10,255)
  399. surface.DrawOutlinedRect(0,0,110,405)
  400. end
  401.  
  402. menu.t.mons = vgui.Create("DPanel", menu.frame);
  403. menu.t.mons:SetPos(120,25);
  404. menu.t.mons:SetSize(376,406);
  405. if menu.Current ~= nil then menu.t.mons:SetVisible(false) end
  406. menu.t.mons.Paint = function()
  407. surface.SetDrawColor( 10, 10, 10, 255 )
  408. surface.DrawOutlinedRect( 0, 0, menu.t.mons:GetWide() - 1, menu.t.mons:GetTall() - 1)
  409. end
  410.  
  411. menu.t.a, menu.b.a = AddTab("Aimbot", true)
  412. menu.t.p, menu.b.p = AddTab("Player ESP", true)
  413. menu.t.e, menu.b.e = AddTab("Entity ESP", true)
  414. menu.t.m, menu.b.m = AddTab("Misc.", true)
  415. menu.t.g, menu.b.g = AddTab("Game-mode", true)
  416. --id, parent , the type, the text , setting
  417. AddFeature(1, menu.t.a, "button", "Enabled", "aimbot")
  418. AddFeature(2, menu.t.a, "button", "Triggerbot", "triggerbot")
  419. AddFeature(3, menu.t.a, "button", "No-Recoil", "norecoil")
  420. AddFeature(4, menu.t.a, "button", "Friendly Fire", "aimbot_friendly_fire")
  421. AddFeature(5, menu.t.a, "slider", "FOV", "aimbot_fov", 0, 180)
  422.  
  423. AddFeature(1, menu.t.p, "button", "Enabled", "esp_player")
  424. AddFeature(2, menu.t.p, "button", "Show Name", "esp_player_name")
  425. AddFeature(3, menu.t.p, "button", "Show Rank", "esp_player_rank")
  426. AddFeature(4, menu.t.p, "button", "Show Health", "esp_player_health")
  427. AddFeature(5, menu.t.p, "button", "Show Armor", "esp_player_armor")
  428. AddFeature(6, menu.t.p, "button", "Show Distance", "esp_player_showdist")
  429. AddFeature(7, menu.t.p, "slider", "Draw Distance", "esp_player_dist", 0, 16000)
  430. AddFeature(8, menu.t.p, "button", "Draw Glow Halo", "esp_player_glow")
  431.  
  432. AddFeature(1, menu.t.e, "button", "Enabled", "esp_entity")
  433. AddFeature(2, menu.t.e, "slider", "Draw Distance", "esp_entity_dist", 0, 16000)
  434. AddFeature(3, menu.t.e, "button", "Draw Glow Halo", "esp_entity_glow")
  435.  
  436. AddFeature(1, menu.t.m, "button", "Flashlight Spam [hold leftarrow]", "flashlight_spam")
  437. AddFeature(2, menu.t.m, "button", "[Third-Person]", "thirdperson")
  438. AddFeature(3, menu.t.m, "button", "Developer", "developer")
  439.  
  440. if string.find(gmod.GetGamemode().Name, "DarkRP") then
  441. AddFeature(1, menu.t.g, "button", "God-mode Exploit (Costs in-game $$$)", "darkrp_god")
  442. elseif string.find(gmod.GetGamemode().Name, "Trouble in Terrorist Town") then
  443. AddFeature(1, menu.t.g, "button", "Display Death Notifications", "ttt_deathnotifs")
  444. AddFeature(2, menu.t.g, "button", "Show Alive Players (Scoreboard)", "ttt_showalive")
  445. elseif string.find(gmod.GetGamemode().Name, "PERP") then
  446. AddFeature(1, menu.t.g, "button", "Infinite Fuel","perp_Fuel")
  447. end
  448. local elist
  449. local elist2
  450. local elistc
  451. local elistc2
  452. local function makeelist()
  453. elist = vgui.Create("DComboBox", menu.t.e)
  454. elist:SetPos(10,menu.t.e:GetTall()-43)
  455. elist:SetSize(130,20)
  456. for k,v in pairs(MonsterBot.Ents()) do
  457. if not(MonsterBot.Entities[v]) then
  458. local i = elist:AddChoice(v)
  459. end
  460. end
  461. elist.OnSelect = function(index,value,data)
  462. print(data)
  463. elist2 = data
  464. end
  465. end
  466. local function makeelistc()
  467. elistc = vgui.Create("DComboBox", menu.t.e)
  468. elistc:SetPos(235, menu.t.e:GetTall()-43)
  469. elistc:SetSize(130,20)
  470. for k,v in pairs(MonsterBot.Entities) do
  471. local i = elistc:AddChoice(v)
  472. end
  473. elistc.OnSelect = function(index,value,data)
  474. elistc2 = data
  475. end
  476. end
  477. makeelist()
  478. makeelistc()
  479. AddButton(menu.t.e, "Add Entity", 35, menu.t.e:GetTall()-23, function()
  480. if(elist2) then
  481. for k,v in pairs(MonsterBot.Ents()) do
  482. if (v == elist2) then
  483. print(v)
  484. table.insert(MonsterBot.Entities, v)
  485. MonsterBot.Update("entity")
  486. end
  487. end
  488. end
  489. makeelist()
  490. makeelistc()
  491. end)
  492. AddButton(menu.t.e, "Remove Entity", 260, menu.t.e:GetTall()-23, function()
  493. if(elistc2) then
  494. for k,v in pairs(MonsterBot.Entities) do
  495. if (v == elistc2) then
  496. MonsterBot.Entities[k] = nil;
  497. MonsterBot.Update("entity")
  498. end
  499. end
  500. end
  501. makeelist()
  502. makeelistc()
  503. end)
  504. /*local flist
  505. local flist2
  506. local flistc
  507. local flistc2
  508. local function makeflist()
  509. flist = vgui.Create("DComboBox", menu.t.a)
  510. flist:SetPos(10,menu.t.a:GetTall()-43)
  511. flist:SetSize(130,20)
  512. for k,v in pairs(player.GetAll()) do
  513. if v ~= LocalPlayer() then
  514. if not(MonsterBot.Whitelist[v:SteamID()]) then
  515. local i = flist:AddChoice(v:Nick())
  516. end
  517. end
  518. end
  519. flist.OnSelect = function(index,value,data)
  520. print(data)
  521. elist2 = data
  522. end
  523. end
  524. local function makeflistc()
  525. flistc = vgui.Create("DComboBox", menu.t.a)
  526. flistc:SetPos(235, menu.t.a:GetTall()-43)
  527. flistc:SetSize(130,20)
  528. for k,v in pairs(player.GetAll()) do
  529. if v ~= LocalPlayer() then
  530. if MonsterBot.Whitelist[v:SteamID()] then
  531. local i = flistc:AddChoice(v:Nick())
  532. end
  533. end
  534. end
  535. flistc.OnSelect = function(index,value,data)
  536. flistc2 = data
  537. end
  538. end
  539. makeflist()
  540. makeflistc()
  541. AddButton(menu.t.a, "Add Friend", 35, menu.t.a:GetTall()-23, function()
  542. if(flist2) then
  543. for k,v in pairs(player.GetAll()) do
  544. if (v:Nick() == flist2) then
  545. print(v:Nick())
  546. table.insert(MonsterBot.Whitelist, v:SteamID())
  547. PrintTable(MonsterBot.Whitelist)
  548. MonsterBot.Update("friend")
  549. end
  550. end
  551. end
  552. makeflist()
  553. makeflistc()
  554. end)
  555. AddButton(menu.t.a, "Remove Friend", 260, menu.t.a:GetTall()-23, function()
  556. if(flistc2) then
  557. for k,v in pairs(MonsterBot.Whitelist) do
  558. if (v:SteamID() == flistc2) then
  559. MonsterBot.Whitelist[k] = nil;
  560. MonsterBot.Update("friend")
  561. end
  562. end
  563. end
  564. makeflist()
  565. makeflistc()
  566. end)*/
  567. end
  568.  
  569. hook.Add("HUDPaint", "catHUD", function()
  570. if MonsterBot.Settings["esp_player"] or MonsterBot.Settings["esp_entity"] then
  571. for k,v in pairs(ents.GetAll()) do
  572. if MonsterBot.Settings["esp_player"] && v:IsPlayer() then
  573. if(espcheck("player", v) and espdistance("player", v))then
  574. local ESP = (v:EyePos()):ToScreen()
  575. local name,health,rank,col,distance = "","","","",""
  576. local outcol = Color(0,0,0,255)
  577. local white = Color(255,255,255,255)
  578. local outcol2 = outcol
  579. if MonsterBot.Settings["esp_player_name"] then
  580. if v.GetRPName then name = v:GetRPName()
  581. else name = v:Nick() end
  582. end
  583. if v:Nick() ~= name then rank = " "..v:Nick() end
  584. if v.SteamName and name ~= v:SteamName() then rank = " "..v:SteamName() end
  585. if MonsterBot.Settings["esp_player_rank"] then
  586. if v:IsSuperAdmin() then
  587. rank = "[Super Admin]"..rank
  588. elseif v:IsAdmin() then
  589. rank = "[Admin]"..rank
  590. elseif v:IsUserGroup("moderator") or v:IsUserGroup("mod") then
  591. rank = "[Moderator]"..rank
  592. elseif v:IsUserGroup("vip") or v:IsUserGroup("donator") then
  593. rank = "[Donator]"..rank
  594. end
  595. end
  596. if MonsterBot.Settings["esp_player_health"] and not(MonsterBot.Settings["esp_player_armor"]) then
  597. health = v:Health().."H"
  598. elseif MonsterBot.Settings["esp_player_armor"] and not(MonsterBot.Settings["esp_player_health"]) then
  599. health = v:Armor().."A"
  600. elseif MonsterBot.Settings["esp_player_armor"] and MonsterBot.Settings["esp_player_health"] then
  601. health = v:Health().. "H - "..v:Armor().."A"
  602. end
  603. if MonsterBot.Settings["esp_player_showdist"] then
  604. distance = v:GetPos():Distance(LocalPlayer():GetPos())
  605. distance = math.Round(distance).." m"
  606. end
  607. col = team.GetColor(v:Team())
  608. if (not col) or (col == nil) then
  609. col = Color(255,255,255,255)
  610. end
  611. if(col.r <= 50 and col.g <= 50 and col.b <= 50) then
  612. outcol2 = Color(200,200,200,255)
  613. end
  614. if col.a <= 50 then
  615. col = Color(col.r,col.g,col.b, 255)
  616. end
  617. draw.SimpleTextOutlined(rank, "monsfontesp2", ESP.x, ESP.y -46, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  618. draw.SimpleTextOutlined(name, "monsfontesp1", ESP.x, ESP.y - 34, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  619. if health ~= "" then
  620. draw.SimpleTextOutlined(health, "monsfontesp2", ESP.x, ESP.y -22, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  621. draw.SimpleTextOutlined(distance, "monsfontesp2", ESP.x, ESP.y - 10, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  622. else
  623. draw.SimpleTextOutlined(distance, "monsfontesp2", ESP.x, ESP.y - 22, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  624. end
  625. if MonsterBot.Settings["esp_player_glow"] then
  626. halo.Add({v}, col, 2, 2, 1, true, true)
  627. end
  628. end
  629. end
  630. if (MonsterBot.Settings["esp_entity"] and espcheck("entity", v) and espdistance("entity", v))then
  631. if table.HasValue(MonsterBot.Entities, v:GetClass()) then
  632. local ESP = (v:EyePos()):ToScreen()
  633. draw.SimpleTextOutlined(v:GetClass(), "monsfontesp1", ESP.x, ESP.y - 46, Color(255,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))
  634. if MonsterBot.Settings["esp_entity_glow"] then
  635. halo.Add({v}, Color(255,0,0,255), 2, 2, 1, true, true)
  636. end
  637. end
  638. end
  639. end
  640. end
  641. end)
  642. if input.IsKeyDown(KEY_TAB) and string.find(gmod.GetGamemode().Name, "Trouble in Terrorist Town") and MonsterBot.Settings["ttt_showalive"] then
  643. local t = {}
  644. for k,v in pairs(player.GetAll()) do
  645. if v:IsValid() and v:Team() ~= TEAM_SPECTATOR and MonsterBot.Alive[v:UniqueID()] == true and v ~= LocalPlayer() then
  646. table.insert(t, v)
  647. end
  648. end
  649.  
  650. local height = 30
  651. local offs = 30
  652. for i = 1, #t do
  653. height = height + 15;
  654. end
  655. surface.SetDrawColor(0,0,0,255)
  656. surface.DrawRect(ScrW()-185, ScrH()-ScrH()+5, 175, height);
  657.  
  658. surface.SetTextColor(Color(255, 255, 255, 255));
  659. surface.SetTextPos(ScrW()-125, ScrH()-ScrH()+5);
  660. surface.SetFont("Trebuchet24");
  661. surface.DrawText("ALIVE");
  662.  
  663. surface.SetFont("Trebuchet18");
  664. for k,v in pairs(t) do
  665. local nick = string.sub(v:Nick(), 0, 22);
  666. surface.SetTextPos(ScrW()-175, ScrH()-ScrH()+offs)
  667. surface.DrawText(nick)
  668. offs = offs + 15
  669. end
  670. end
  671. hook.Add("CalcView", "catVIEW", function(ply, pos, angles, fov)
  672. if MonsterBot.Settings["thirdperson"] and LocalPlayer():Alive() then
  673. local view = {}
  674. view.origin = pos-(angles:Forward()*100)
  675. view.angles = angles
  676. view.fov = fov
  677.  
  678. return view
  679. end
  680. end)
  681. hook.Add("ShouldDrawLocalPlayer", "catLOCAL", function()
  682. if MonsterBot.Settings["thirdperson"] then
  683. return true
  684. end
  685. end)
  686. hook.Add("Think", "catBOT", function()
  687. if(input.IsKeyDown(KEY_TAB) && input.IsKeyDown(KEY_Q) && !menu.frame)then
  688. DrawMenu()
  689. elseif(menu.frame && input.IsKeyDown(KEY_ESCAPE))then
  690. menu.frame:Remove();menu.frame = nil
  691. end
  692.  
  693. timer.Remove("DoFuel");
  694. timer.Create("DoFuel",5,0,function()
  695. if string.find(gmod.GetGamemode().Name, "PERP") and MonsterBot.Settings["perp_fuel"] then
  696. DoFuel();
  697. end
  698. end)
  699.  
  700. if MonsterBot.Settings["flashlight_spam"] and input.IsKeyDown(KEY_LEFT) then
  701. RunConsoleCommand("impulse", "100")
  702. end
  703.  
  704. if(MonsterBot.Settings["triggerbot"] && (not MonsterBot.Settings["developer"] and input.IsKeyDown(MonsterBot.Triggerkey)) or (MonsterBot.Settings["developer"] and input.IsMouseDown(MOUSE_4))) then
  705. local pos = LocalPlayer():GetShootPos()
  706. local ang = LocalPlayer():GetAimVector()
  707. local tracedata = {}
  708. tracedata.start = pos
  709. tracedata.endpos = pos+(ang*9999999999999)
  710. local trace = util.TraceLine(tracedata)
  711. if(trace.HitNonWorld) then
  712. target = trace.Entity
  713. if(target:IsPlayer() and MonsterBot.CanTarget(target)) then
  714. RunConsoleCommand("+attack")
  715. timer.Simple(0.000000000000000000001, function() RunConsoleCommand("-attack") end)
  716. end
  717. end
  718. end
  719. if(MonsterBot.Settings["aimbot"] && (not MonsterBot.Settings["developer"] and input.IsKeyDown(MonsterBot.AimKey)) or (MonsterBot.Settings["developer"] and input.IsKeyDown(KEY_LALT))) then
  720. for k,v in pairs(player.GetAll()) do
  721. if MonsterBot.CanTarget(v) then
  722. local head = v:LookupBone("ValveBiped.Bip01_Head1")
  723. if head ~= nil then
  724. local fov = MonsterBot.Settings["aimbot_fov"]
  725. if fov == 0 then
  726. local headpos,targetheadang = v:GetBonePosition(head)
  727. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  728. else
  729. local lpang = LocalPlayer():GetAngles();
  730. local ang = (v:GetPos() - LocalPlayer():GetPos()):Angle();
  731. local ady = math.abs(math.NormalizeAngle(lpang.y - ang.y))
  732. local adp = math.abs(math.NormalizeAngle(lpang.p - ang.p ))
  733. if not(ady > fov or adp > fov) then
  734. local headpos,targetheadang = v:GetBonePosition(head)
  735. if headpos != nil and targetheadang != nil then
  736. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  737. end
  738. end
  739. end
  740. end
  741. end
  742. end
  743. end
  744. if (string.find(gmod.GetGamemode().Name, "Trouble in Terrorist Town") or _G.KARMA) and MonsterBot.Settings["ttt_deathnotifs"] then
  745. for k,v in pairs(player.GetAll()) do
  746. if v:Alive() and not (MonsterBot.Alive[v:UniqueID()] == true) then
  747. MonsterBot.Alive[v:UniqueID()] = true
  748. elseif not v:Alive() and (MonsterBot.Alive[v:UniqueID()] == true) then
  749. MonsterBot.Alive[v:UniqueID()] = false
  750. MonsterBot.Alert(v:Nick().. " has died!")
  751. end
  752. end
  753. end
  754. for k,v in pairs(player.GetAll()) do
  755. if v and v:IsValid() and v:IsPlayer() and v.GetObserverTarget and v:GetObserverTarget() and v:GetObserverTarget():IsValid() and v:GetObserverTarget():IsPlayer() and v:GetObserverTarget() == LocalPlayer() then
  756. if not(MonsterBot.Spectators[v:UniqueID()] == true) then
  757. MonsterBot.Spectators[v:UniqueID()] = true
  758. MonsterBot.Alert(v:Nick().." began spectating you!")
  759. surface.PlaySound("buttons/blip1.wav")
  760. end
  761. end
  762. if MonsterBot.Spectators[v:UniqueID()] == true then
  763. if not (v.GetObserverTarget and v:GetObserverTarget() and v:GetObserverTarget():IsValid() and v:GetObserverTarget():IsPlayer() and v:GetObserverTarget() == LocalPlayer()) then
  764. MonsterBot.Spectators[v:UniqueID()] = nil
  765. MonsterBot.Alert(v:Nick().." stopped spectating you.")
  766. surface.PlaySound("buttons/blip1.wav")
  767. end
  768. end
  769. end
  770. for k,v in pairs(MonsterBot.Spectators) do
  771. local play = player.GetByUniqueID(k)
  772. if not play then
  773. MonsterBot.Spectators[k] = nil
  774. MonsterBot.Alert(v:Nick().." stopped spectating you.")
  775. surface.PlaySound("buttons/blip1.wav")
  776. end
  777. end
  778. end)
  779. if MonsterBot.Settings["norecoil"] and LocalPlayer():GetActiveWeapon().Primary then
  780. LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
  781. end
  782. if MonsterBot.Settings["developer"] then
  783. concommand.Add("blowc4test", function()
  784. for k, v in pairs(ents.FindByClass("ttt_c4")) do
  785. RunConsoleCommand("ttt_c4_disarm", v:EntIndex(), math.random(1000, 5000))
  786. end
  787. end)
  788. concommand.Add("debug", function()
  789. local pcash,gname = "", gmod.GetGamemode().Name
  790. print("Game-mode:\n "..gname)
  791. if string.find(gname, "DarkRP") then
  792. print("Player Cash Amounts")
  793. for k,v in pairs(player.GetAll()) do
  794. if not(v.DarkRPVars and v.DarkRPVars.money)and(darkrpvar == true) then
  795. darkrpvar = false
  796. end
  797. if v ~= LocalPlayer() then
  798. pcash = pcash.." "..v:Nick().." - $"..v.DarkRPVars.money.."\n"
  799. end
  800. end
  801. if pcash ~= "" then
  802. print(pcash)
  803. end
  804. elseif string.find(gname, "PERP") then
  805. local b = GetGlobalInt("perp_druggy_buy", 0);
  806. local s = GetGlobalInt("perp_druggy_sell", 0);
  807. if b then print("Buying: "..b) end
  808. if s then print("Selling: "..s) end
  809. end
  810. if LocalPlayer().PS_GetPoints then
  811. print("Player Pointshop Points")
  812. for k,v in pairs(player.GetAll()) do
  813. if v ~= LocalPlayer() and v.PS_GetPoints then
  814. print(" "..v:Nick().." - "..v:PS_GetPoints().." points")
  815. end
  816. end
  817. end
  818. if LocalPlayer().GetActiveWeapon and LocalPlayer():GetActiveWeapon() ~= nil and IsValid(LocalPlayer():GetActiveWeapon()) then
  819. print("Current Weapon")
  820. print(" Class: "..LocalPlayer():GetActiveWeapon():GetClass())
  821. end
  822. local pos = LocalPlayer():GetShootPos()
  823. local ang = LocalPlayer():GetAimVector()
  824. local tracedata = {}
  825. tracedata.start = pos
  826. tracedata.endpos = pos+(ang*9999999999999)
  827. local trace = util.TraceLine(tracedata)
  828. if(trace.HitNonWorld) then
  829. target = trace.Entity
  830. print("Entity Info")
  831. print(" Class: "..target:GetClass())
  832. print(" Model: "..target:GetModel())
  833. end
  834. end)
  835. end
  836.  
  837. // Aim Assist //
  838.  
  839. aimassist = {}
  840.  
  841. bot = {}
  842. aimassist.Version = 1.0
  843. aimassist.Owner = LocalPlayer()
  844. aimassist.Enabled = false
  845. aimassist.Target = NULL
  846.  
  847. function aimassist.Think() -- Starting the function
  848. if ( aimassist.Enabled ) then
  849. local ply = LocalPlayer() -- Getting ourselves
  850. local trace = util.GetPlayerTrace( ply ) -- Player Trace part. 1
  851. local traceRes = util.TraceLine( trace ) -- Player Trace part. 2
  852. if traceRes.HitNonWorld then -- If the aimbot aims at something that isn't the map..
  853. local target = traceRes.Entity -- It's obviously an entity.
  854. if target:IsPlayer() then -- But it must be a player.
  855. local targethead = target:LookupBone("ValveBiped.Bip01_Head1") -- In this aimassist we only aim for the head.
  856. local targetheadpos,targetheadang = target:GetBonePosition(targethead) -- Get the position/angle of the head.
  857. ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle()) -- And finally, we snap our aim to the head of the target.
  858. end
  859. end
  860. end
  861.  
  862.  
  863. if ( aimassist.AttackState ) then
  864. local targethead = target:LookupBone()
  865. aimassist.AttackState = false
  866. end
  867. end
  868.  
  869. hook.Add( "Think", "aimassistThink", aimassist.Think )
  870. hook.Add("Think","aimassist",aimassist)
  871.  
  872. function aimassist.Command( ply, command, args )
  873. if ( #args == 0 ) then
  874. aimassist.Enabled = !aimassist.Enabled
  875. if ( aimassist.Enabled ) then
  876. LocalPlayer():ChatPrint( "[AimAssist] Enabled.\n" )
  877. else
  878. LocalPlayer():ChatPrint( "[AimAssist] Disabled.\n" )
  879. end
  880. end
  881. end
  882.  
  883. concommand.Add( "Monster_aimassist",aimassist.Command )
  884.  
  885. // TTT Prop-Kill //
  886.  
  887. function MagnetoThrow()
  888. -- Nice and easy, turn it slow 180
  889. timer.Simple(.02,Turn)
  890. timer.Simple(.04,Turn)
  891. timer.Simple(.06,Turn)
  892. timer.Simple(.08,Turn)
  893. timer.Simple(.10,Turn)
  894. timer.Simple(.12,Turn)
  895. timer.Simple(.14,Turn)
  896. timer.Simple(.16,Turn)
  897. timer.Simple(.18,Turn)
  898. timer.Simple(.20,Turn)
  899. timer.Simple(.22,Turn)
  900. timer.Simple(.24,Turn)
  901. timer.Simple(.26,Turn)
  902. timer.Simple(.28,Turn)
  903. timer.Simple(.30,Turn)
  904. timer.Simple(.32,Turn)
  905. timer.Simple(.34,Turn)
  906. timer.Simple(.36,Turn)
  907. -- OH MY GOD WHIP AROUND 180
  908. timer.Simple(.46,TurnBack)
  909. -- And deliver the final blow by pressing right click
  910. timer.Simple(.7,function() RunConsoleCommand("+attack") end)
  911. timer.Simple(.72,function() RunConsoleCommand("-attack") end)
  912. end
  913.  
  914. function Turn()
  915. -- Turn function
  916. LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles ()-Angle(0,10,0))
  917. end
  918.  
  919. function TurnBack()
  920. -- Turn 180 function
  921. LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles ()-Angle(0,180,0))
  922. end
  923. -- Making it a console command
  924. concommand.Add("ThrowMagneto",MagnetoThrow)
  925.  
  926. // Free Cam //
  927.  
  928. local MBN = {}
  929.  
  930. MBN.Enabled = false
  931. MBN.ViewOrigin = Vector( 0, 0, 0 )
  932. MBN.ViewAngle = Angle( 0, 0, 0 )
  933. MBN.Velocity = Vector( 0, 0, 0 )
  934.  
  935. function MBN.CalcView( ply, origin, angles, fov )
  936. if ( !MBN.Enabled ) then return end
  937. if ( MBN.SetView ) then
  938. MBN.ViewOrigin = origin
  939. MBN.ViewAngle = angles
  940.  
  941. MBN.SetView = false
  942. end
  943. return { origin = MBN.ViewOrigin, angles = MBN.ViewAngle }
  944. end
  945. hook.Add( "CalcView", "MonsterBot-Noclip", MBN.CalcView )
  946.  
  947. function MBN.CreateMove( cmd )
  948. if ( !MBN.Enabled ) then return end
  949.  
  950. // Add and reduce the old velocity.
  951. local time = FrameTime()
  952. MBN.ViewOrigin = MBN.ViewOrigin + ( MBN.Velocity * time )
  953. MBN.Velocity = MBN.Velocity * 0.95
  954.  
  955. // Rotate the view when the mouse is moved.
  956. local sensitivity = 0.022
  957. MBN.ViewAngle.p = math.Clamp( MBN.ViewAngle.p + ( cmd:GetMouseY() * sensitivity ), -89, 89 )
  958. MBN.ViewAngle.y = MBN.ViewAngle.y + ( cmd:GetMouseX() * -1 * sensitivity )
  959.  
  960. // What direction we're going to move in.
  961. local add = Vector( 0, 0, 0 )
  962. local ang = MBN.ViewAngle
  963. if ( cmd:KeyDown( IN_FORWARD ) ) then add = add + ang:Forward() end
  964. if ( cmd:KeyDown( IN_BACK ) ) then add = add - ang:Forward() end
  965. if ( cmd:KeyDown( IN_MOVERIGHT ) ) then add = add + ang:Right() end
  966. if ( cmd:KeyDown( IN_MOVELEFT ) ) then add = add - ang:Right() end
  967. if ( cmd:KeyDown( IN_JUMP ) ) then add = add + ang:Up() end
  968. if ( cmd:KeyDown( IN_DUCK ) ) then add = add - ang:Up() end
  969.  
  970. // Speed.
  971. add = add:GetNormal() * time * 100
  972. if ( cmd:KeyDown( IN_SPEED ) ) then add = add * 2 end
  973.  
  974. MBN.Velocity = MBN.Velocity + add
  975.  
  976. // This stops us looking around crazily while spiritwalking.
  977. if ( MBN.LockView == true ) then
  978. MBN.LockView = cmd:GetViewAngles()
  979. end
  980. if ( MBN.LockView ) then
  981. cmd:SetViewAngles( MBN.LockView )
  982. end
  983.  
  984. // This stops us moving while spiritwalking.
  985. cmd:SetForwardMove( 0 )
  986. cmd:SetSideMove( 0 )
  987. cmd:SetUpMove( 0 )
  988. end
  989. hook.Add( "CreateMove", "MonsterBotNoclip", MBN.CreateMove )
  990.  
  991. function MBN.Toggle()
  992. MBN.Enabled = !MBN.Enabled
  993. MBN.LockView = MBN.Enabled
  994. MBN.SetView = true
  995.  
  996. local status = { [ true ] = "ON", [ false ] = "OFF" }
  997. print( "MonsterBot-Noclip " .. status[ MBN.Enabled ] )
  998. end
  999. concommand.Add( "MBN_toggle", MBN.Toggle )
  1000.  
  1001. concommand.Add( "MBN_pos", function() print( MBN.ViewOrigin )
  1002. end )
  1003.  
  1004. // CrossHair //
  1005.  
  1006. local shouldDraw = true
  1007.  
  1008. local hzCross = CreateClientConVar("HZ_Crosshair","0",false)
  1009.  
  1010. function Crosshair1()
  1011. surface.SetDrawColor (235, 235, 235, 235)
  1012. surface.DrawLine(ScrW() / 2 - 10, ScrH() / 2, ScrW() / 2 + 11 , ScrH() / 2)
  1013. surface.DrawLine(ScrW() / 2 - 0, ScrH() / 2 - 10, ScrW() / 2 - 0 , ScrH() / 2 + 11)
  1014. end
  1015. hook.Add("HUDPaint","CustomCross",Crosshair1)
  1016.  
  1017. Color(0, 0, 255, 255)
  1018.  
  1019. // Laser Sight \\
  1020.  
  1021. function MonsterBot.Barrel( )
  1022. if GetConVarNumber( "misc_removelaser" ) >= 1 then return end
  1023. local ViewModel = LocalPlayer():GetViewModel()
  1024. local Attach = ViewModel:LookupAttachment( '1' )
  1025. if( !LocalPlayer():Alive() || LocalPlayer():GetActiveWeapon() == NULL ) then return; end
  1026. if ( Attach == 0 ) then Attach = ViewModel:LookupAttachment( 'muzzle' ) end
  1027. //if( !table.HasValue( LaserSightAllowed, LocalPlayer():GetActiveWeapon():GetClass() ) ) then return; end
  1028. cam.Start3D( EyePos(), EyeAngles() )
  1029. render.SetMaterial(Material("sprites/physbeam"))
  1030. render.DrawBeam( ViewModel:GetAttachment( Attach ).Pos, LocalPlayer():GetEyeTrace().HitPos, 5, 0, 0, Color(255, 255, 255, 255) )
  1031. local Size = math.random() * 1.35
  1032. render.SetMaterial(Material("sprites/redglow1"))
  1033. render.DrawQuadEasy(LocalPlayer():GetEyeTrace().HitPos, (EyePos() - LocalPlayer():GetEyeTrace().HitPos):GetNormal(), 30, 30, Color(235,235,235,235) )
  1034. cam.End3D()
  1035. end
  1036. hook.Add( 'HUDPaint', '\2\3', MonsterBot.Barrel )
  1037.  
  1038. CreateClientConVar( "misc_removelaser", 0, true, false )
  1039.  
  1040. // BHOP \\
  1041.  
  1042. if CLIENT then
  1043. concommand.Add("+bhop",function()
  1044. hook.Add("Think","hook",function()
  1045. RunConsoleCommand(((LocalPlayer():IsOnGround() or LocalPlayer():WaterLevel() > 0) and "+" or "-").."jump")
  1046. end)
  1047. end)
  1048.  
  1049. concommand.Add("-bhop",function()
  1050. RunConsoleCommand("-jump")
  1051. hook.Remove("Think","hook")
  1052. end)
  1053. end
  1054.  
  1055. // PropKill \\
  1056. function Propkill()
  1057. local ply = LocalPlayer()
  1058. local Angles = LocalPlayer():EyeAngles()
  1059. LocalPlayer():SetEyeAngles(Angle(30, Angles.yaw + 180, Angles.roll))
  1060. timer.Create("spawn", 0.1, 1, function()
  1061. LocalPlayer():ConCommand("gm_spawn models/props_junk/sawblade001a.mdl")
  1062. LocalPlayer():ConCommand("+attack")
  1063. end)
  1064. timer.Create("jump", 0.15, 1, function()
  1065. LocalPlayer():ConCommand("+jump")
  1066. end)
  1067. timer.Create("turnback", 0.35, 1, function()
  1068. LocalPlayer():SetEyeAngles(Angle(40, Angles.yaw, Angles.roll))
  1069. end)
  1070. timer.Create("release", 0.37, 1, function()
  1071. LocalPlayer():ConCommand("-attack")
  1072. end)
  1073. timer.Create("-jummp", 0.3, 1, function()
  1074. LocalPlayer():ConCommand("-jump")
  1075. end)
  1076. timer.Create("undo", 1.2, 1, function()
  1077. LocalPlayer():ConCommand("undo")
  1078. end)
  1079. end
  1080.  
  1081. concommand.Add("propkill", Propkill)
  1082.  
  1083. // TDetector \\
  1084.  
  1085. if string.find(gmod.GetGamemode().Name, "Trouble in Terrorist Town") then
  1086.  
  1087. local matOverlay = Material( "sprites/glow08" )
  1088. local matTraitor = Material( "sprites/dot" )
  1089. local twep = {"spiderman's_swep", "weapon_ttt_trait_defilibrator", "weapon_ttt_xbow", "weapon_ttt_dhook", "weapon_awp", "weapon_ttt_ak47", "weapon_jihadbomb", "weapon_ttt_knife", "weapon_ttt_c4", "weapon_ttt_decoy", "weapon_ttt_flaregun", "weapon_ttt_phammer", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_sipistol", "weapon_ttt_teleport", "weapon_ttt_awp", "weapon_ttt_silencedsniper", "weapon_ttt_turtlenade", "weapon_ttt_death_station", "weapon_ttt_sg552", "weapon_ttt_tripmine"}
  1090.  
  1091. for _,v in pairs(player.GetAll()) do
  1092. v.HatTraitor = nil
  1093. end
  1094. for _,v in pairs(ents.GetAll()) do
  1095. v.HatESPTracked = nil
  1096. end
  1097.  
  1098. hook.Add("PostDrawOpaqueRenderables", "wire_animations_idle", function()
  1099. if GAMEMODE.round_state != ROUND_ACTIVE then
  1100. for _,v in pairs(player.GetAll()) do
  1101. v.HatTraitor = nil
  1102. end
  1103. for _,v in pairs(ents.GetAll()) do
  1104. v.HatESPTracked = nil
  1105. end
  1106. return
  1107. end
  1108. for _,v in pairs( ents.GetAll() ) do
  1109. if v and IsValid(v) and (table.HasValue(twep, v:GetClass()) and !v.HatESPTracked) then
  1110. local pl = v.Owner
  1111. if pl and IsValid(pl) and pl:IsTerror() then
  1112. if pl:IsDetective() then
  1113. v.HatESPTracked = true
  1114. else
  1115. v.HatESPTracked = true
  1116. pl.HatTraitor = true
  1117. chat.AddText( pl, Color(255,125,0), " is a ",Color(255,0,0), "TRAITOR",Color(255,125,0), " with a ",Color(255,0,0),v:GetClass().."!")
  1118. end
  1119. end
  1120. end
  1121. end
  1122.  
  1123.  
  1124. //Add a name for anyone we tracked
  1125. // cam.Start2D()
  1126. // local pos = (pl:GetPos()+Vector(0,0,100)):ToScreen()
  1127. // draw.DrawText( pl:Nick(), "ScoreboardText", pos['x'], pos['y'], team.GetColor( pl:Team() ), TEXT_ALIGN_CENTER )
  1128. // cam.End2D()
  1129. // end
  1130. end)
  1131. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement