Advertisement
Guest User

clua

a guest
Jul 17th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.99 KB | None | 0 0
  1. -- menu shit
  2.  
  3. -- LIBS
  4.  
  5. local box
  6. local wight_slider
  7. local high_slider
  8. local gap_slider
  9. local theme_combo
  10. local font_size
  11. local font_thickness
  12. local setup_done = false
  13.  
  14. local function set_up_gui(x, y)
  15. if (not setup_done) then
  16. vis_main = gui.Reference('VISUALS', "MISC", "Assistance");
  17. box = gui.Groupbox(vis_main, "Indicator")
  18. wight_slider = gui.Slider(box, "wight_slider_indicator", "X Pos", 30, 10, x);
  19. high_slider = gui.Slider(box, "high_slider_indicator", "Y-Pos", 45, 30, y);
  20. gap_slider = gui.Slider(box, "gap_slider", "Gap", 25, 0, 100);
  21. theme_combo = gui.Combobox(box, 'Fonts_Indicator', " Font", "Verdana", "Arial", "Fixedsys");
  22. font_size = gui.Slider(box, "font_slider_indicator", "Font Size", 25, 0, 60);
  23. font_thickness = gui.Slider(box, "font_slider_indicator", "Font Size", 700, 100, 1000);
  24. setup_done = true
  25. end
  26. end
  27.  
  28. local fonts = { "Verdana", "Arial", "Fixedsys" }
  29.  
  30. local indicator_tabl = { {} };
  31.  
  32. add = {}
  33.  
  34. add.Indicator = function(text, r, g, b, a, status)
  35. if status then
  36. indicator_tabl[#indicator_tabl + 1] = { text, r, g, b, a };
  37. end
  38. end
  39.  
  40. add.IndicatorForCheckbox = function(text, var, mode, status, r1, g1, b1, a1, r2, g2, b2, a2)
  41. local on
  42. if mode == 0 then
  43. on = true
  44. if gui.GetValue(var) then
  45. rf, gf, bf, af = r1, g1, b1, a1
  46. else
  47. rf, gf, bf, af = r2, g2, b2, a2
  48. end
  49. else
  50. if gui.GetValue(var) then
  51. on = true
  52. rf, gf, bf, af = r1, g1, b1, a1
  53. else
  54. on = false
  55. end
  56. end
  57. if status and on then
  58. indicator_tabl[#indicator_tabl + 1] = { text, rf, gf, bf, af };
  59. end
  60. end
  61.  
  62. add.IndicatorForKeybox = function(text, var, mode, status, r1, g1, b1, a1, r2, g2, b2, a2)
  63. local on
  64. if entities.GetLocalPlayer() == nil or not entities.GetLocalPlayer():IsAlive() then
  65. return
  66. end
  67. if gui.GetValue(var) ~= 0 then
  68. if mode == 0 or mode == 3 then
  69. on = true
  70. if input.IsButtonDown(gui.GetValue(var)) then
  71. rf, gf, bf, af = r1, g1, b1, a1
  72. else
  73. rf, gf, bf, af = r2, g2, b2, a2
  74. end
  75. elseif mode == 1 then
  76. if input.IsButtonDown(gui.GetValue(var)) then
  77. rf, gf, bf, af = r1, g1, b1, a1
  78. on = true
  79. else
  80. on = false
  81. end
  82. elseif mode == 2 then
  83. on = true
  84. if input.IsButtonDown(gui.GetValue(var)) then
  85. rf, gf, bf, af = r1, g1, b1, a1
  86. else
  87. rf, gf, bf, af = r2, g2, b2, a2
  88. end
  89. elseif mode == 4 then
  90. on = false
  91. end
  92. elseif gui.GetValue(var) == 0 then
  93. if mode == 2 then
  94. rf, gf, bf, af = r2, g2, b2, a2
  95. on = true
  96. elseif mode == 3 then
  97. rf, gf, bf, af = r1, g1, b1, a1
  98. on = true
  99. elseif mode == 4 then
  100. rf, gf, bf, af = r1, g1, b1, a1
  101. on = true
  102. end
  103. end
  104.  
  105. if on and status then
  106. indicator_tabl[#indicator_tabl + 1] = { text, rf, gf, bf, af };
  107. end
  108. end
  109.  
  110. local function draw_Indicator()
  111. local sw, sh = draw.GetScreenSize();
  112. set_up_gui(sw, sh)
  113. if setup_done then
  114. top_text = sh - (gap_slider:GetValue() * #indicator_tabl) - high_slider:GetValue();
  115. draw.SetFont(draw.CreateFont(fonts[theme_combo:GetValue() + 1], math.floor(font_size:GetValue()), math.floor(font_thickness:GetValue())))
  116. for i = 1, #indicator_tabl do
  117. draw.Color(indicator_tabl[i][2], indicator_tabl[i][3], indicator_tabl[i][4], indicator_tabl[i][5]);
  118. draw.TextShadow(wight_slider:GetValue(), top_text + gap_slider:GetValue() * i, indicator_tabl[i][1]);
  119. end
  120. indicator_tabl = {};
  121. end
  122. end
  123.  
  124. callbacks.Register("Draw", "draw_Indicator", draw_Indicator);
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. -- refs
  136.  
  137.  
  138. print("cLua | Loaded")
  139.  
  140. local mPlacement = gui.Reference("MISC", "AUTOMATION", "Other");
  141.  
  142. -- checkboxes
  143.  
  144. local cMenu = gui.Checkbox(mPlacement, "cluashow", "cLua", false);
  145.  
  146. -- windows
  147. local cWindow = gui.Window("clua_menu", "cLua main", 1280, 740, 600, 600)
  148. local cDesyncgroup = gui.Groupbox(cWindow, "Desync", 20, 20, 200, 140)
  149. local cFixesGroup = gui.Groupbox(cWindow, "Fixes", 20, 200, 200, 100)
  150. local cKnifeGroup = gui.Groupbox(cWindow, "Knife/Zeus", 250, 20, 200, 72)
  151.  
  152. -- actual features
  153. local me = entities.GetLocalPlayer()
  154. -- invert desync
  155.  
  156. local invertKey = gui.Keybox(cDesyncgroup, "cluainvert_key", "Invert key", false)
  157. local desyncators = gui.Multibox(cDesyncgroup, "Indicators")
  158. local dArrows = gui.Checkbox(desyncators, "cluadesync_arrows", "arrows", false)
  159. local dText = gui.Checkbox(desyncators, "cluadesync_text", "text", false)
  160.  
  161. --local tankCheckBox = gui.Checkbox(cluaInvertGroup, "cluadesync_tank", "Tank AA", false)
  162. local vleftDesync = 3;
  163. local vrightDesync = 2;
  164. local eleftDesync = 2;
  165. local erightDesync = 3;
  166. local activeSide = "null";
  167.  
  168.  
  169. local function inverter()
  170. if entities.GetLocalPlayer() ~= nil then
  171. if invertKey:GetValue() == 0 then return end
  172. if input.IsButtonPressed(invertKey:GetValue()) and not input.IsButtonDown(69) then
  173. if rightDesync == false then
  174. gui.SetValue("rbot_antiaim_stand_desync", vrightDesync);
  175. gui.SetValue("rbot_antiaim_move_desync", vrightDesync);
  176. rightDesync = not rightDesync;
  177. else
  178. gui.SetValue("rbot_antiaim_stand_desync", vleftDesync);
  179. gui.SetValue("rbot_antiaim_move_desync", vleftDesync);
  180. rightDesync = not rightDesync;
  181. end
  182. else if input.IsButtonPressed(invertKey:GetValue()) and input.IsButtonDown(69) then
  183. if rightDesync == false then
  184. gui.SetValue("rbot_antiaim_stand_desync", erightDesync);
  185. gui.SetValue("rbot_antiaim_move_desync", erightDesync);
  186. rightDesync = not rightDesync;
  187. else
  188. gui.SetValue("rbot_antiaim_stand_desync", eleftDesync);
  189. gui.SetValue("rbot_antiaim_move_desync", eleftDesync);
  190. rightDesync = not rightDesync;
  191. end
  192. end
  193. end
  194. end
  195. end
  196. callbacks.Register("Draw", "inverter", inverter)
  197.  
  198. -- anti knife
  199.  
  200. local antiknife_mode = 0;
  201. local antiknife_value = 7;
  202.  
  203. local antiknifeEnabled = gui.Checkbox(cKnifeGroup, "cluaknife_antiknife", "Anti-Knife", false)
  204.  
  205. local antiknife, antiknife_modeB, antiknife_valueB;
  206.  
  207. antiknife_modeB = gui.GetValue("msc_fakelag_mode")
  208. antiknife_valueB = gui.GetValue("msc_fakelag_value")
  209. local function antiknifeE()
  210. if antiknifeEnabled:GetValue() and me ~= nil then
  211. if cMenu:IsActive() then
  212. antiknife_modeB = gui.GetValue("msc_fakelag_mode")
  213. antiknife_valueB = gui.GetValue("msc_fakelag_value")
  214. return
  215. end
  216. if input.IsButtonDown(69) then
  217. gui.SetValue("msc_fakelag_mode", antiknife_mode)
  218. gui.SetValue("msc_fakelag_value", antiknife_value)
  219. else
  220. gui.SetValue("msc_fakelag_mode", antiknife_modeB)
  221. gui.SetValue("msc_fakelag_value", antiknife_valueB)
  222. end
  223. end
  224. end
  225. callbacks.Register("Draw", "antiknifeE", antiknifeE)
  226.  
  227. -- USE desync
  228.  
  229. local desync_pitch, desync_yaw = 0;
  230.  
  231. local desyncEnabled = gui.Checkbox(cDesyncgroup, "cluaknife_desync", "ON USE Desync", false)
  232.  
  233. local desync_pitchS, desync_yawS, desync_pitchM, desync_yawM
  234.  
  235. desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
  236. desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
  237. desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
  238. desync_yawM = gui.GetValue("rbot_antiaim_move_real")
  239. local function eDesync()
  240. if desyncEnabled:GetValue() and me ~= nil then
  241. if cMenu:IsActive() then
  242. desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
  243. desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
  244. desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
  245. desync_yawM = gui.GetValue("rbot_antiaim_move_real")
  246. return
  247. end
  248. if input.IsButtonDown(69) then
  249. gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitch)
  250. gui.SetValue("rbot_antiaim_stand_real",desync_yaw)
  251. gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitch)
  252. gui.SetValue("rbot_antiaim_move_real", desync_yaw)
  253. else
  254. gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitchS)
  255. gui.SetValue("rbot_antiaim_stand_real", desync_yawS)
  256. gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitchM)
  257. gui.SetValue("rbot_antiaim_move_real", desync_yawM)
  258.  
  259. end
  260. end
  261. end
  262. callbacks.Register("Draw", "eDesync", eDesync)
  263.  
  264. -- disable autostrafer on jump
  265.  
  266. local straferDisabled = gui.Checkbox(cFixesGroup, "cluafixes_strafer", "Jumpshot anti-strafer", false)
  267.  
  268. local function jumpStrafer()
  269. if gui.GetValue("cluafixes_strafer") == true then
  270. local velocity = vector.Length(entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]")) -- Thanks to Tomeno!
  271. gui.SetValue("msc_autostrafer_enable", 0)
  272. if input.IsButtonDown(32) then
  273. local x,y,z = entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]") -- Thanks to Tomeno & CloudFlare1337!
  274. local velocity = math.sqrt(x^2 + y^2)
  275. if velocity >= 5 then
  276. gui.SetValue("msc_autostrafer_enable", 1)
  277. else
  278. gui.SetValue("msc_autostrafer_enable", 0)
  279. end
  280. end
  281. end
  282. end
  283. callbacks.Register("CreateMove", jumpStrafer)
  284.  
  285. -- indicators
  286.  
  287. local function indicators()
  288. if entities.GetLocalPlayer() ~= nil then
  289. local x,y = draw.GetScreenSize()
  290. local textFont = draw.CreateFont('Verdana', 50, 700)
  291. draw.SetFont(textFont)
  292. if not rightDesync then
  293. add.IndicatorForCheckbox("DSIDE: LEFT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  294. if gui.GetValue("cluadesync_arrows") == true then
  295. draw.Color(66, 135, 245, 255)
  296. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  297. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  298. draw.Color(255, 255, 255, 255)
  299. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  300. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  301. end
  302. else if rightDesync then
  303. add.IndicatorForCheckbox("DSIDE: RIGHT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  304. if gui.GetValue("cluadesync_arrows") == true then
  305. draw.Color(255, 255, 255, 255)
  306. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  307. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  308. draw.Color(66, 135, 245, 255)
  309. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  310. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  311. end
  312. else
  313. add.IndicatorForCheckbox("DSIDE: OFF","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  314. if gui.GetValue("cluadesync_arrows") == true then
  315. draw.Color(255, 255, 255, 255)
  316. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  317. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  318. draw.Color(255, 255, 255, 255)
  319. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  320. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  321. end
  322. end
  323. end
  324. end
  325. end
  326. callbacks.Register("Draw", "indicators", indicators)
  327.  
  328.  
  329.  
  330. --[[
  331. FIXES FOR VARIOUS SHIT
  332. ]]--
  333.  
  334. -- revolver fix | credits to adrianobessa5682 OR original author
  335.  
  336. local revolverEnabled = gui.Checkbox(cFixesGroup, "cluafixes_revolver", "Revolver fix", false)
  337.  
  338. local cnt = 0
  339. local cntmax = 15;
  340. local function revolverFix(cmd)
  341. gui.SetValue("rbot_revolver_autocock", 0)
  342. if revolverEnabled:GetValue() and me ~= nil then
  343. local wep = me:GetPropEntity("m_hActiveWeapon")
  344. if wep ~= nil and wep:GetWeaponID() == 64 then
  345. cnt = cnt + 1
  346. if cnt <= cntmax then
  347. cmd:SetButtons(cmd:GetButtons() | (1 << 0))
  348. else
  349. cnt = 0
  350.  
  351. local m_flPostponeFireReadyTime = wep:GetPropFloat("m_flPostponeFireReadyTime")
  352. if m_flPostponeFireReadyTime > 0 and m_flPostponeFireReadyTime < globals.CurTime() then
  353. cmd:SetButtons(cmd:GetButtons() & ~(1 << 0))
  354. end
  355. end
  356. end
  357. end
  358. end
  359.  
  360. callbacks.Register("CreateMove", revolverFix)
  361.  
  362. -- fakeduck fix
  363.  
  364. local fakeduckEnabled = gui.Checkbox(cFixesGroup, "cluafixes_fakeduck", "Fakeduck Fakelag", false)
  365. local fakeduckDisable = gui.Checkbox(cFixesGroup, "cluafixes_fakeduckdisable", "Fakeduck AA fix", false)
  366. local fakeduckKey = gui.GetValue("rbot_antiaim_fakeduck")
  367. local fakeducking = false
  368.  
  369. local fakeduck_mode = 0;
  370.  
  371. local fakeduck_value = 4;
  372. local fakeduck_valueB, fakeduck_modeB, desyncS, desyncM;
  373.  
  374.  
  375. function fakeduckFix()
  376. if entities.GetLocalPlayer() ~= nil then
  377. if fakeduckEnabled:GetValue() == true and fakeduckKey ~= nil then
  378. if input.IsButtonDown( fakeduckKey ) then
  379. if fakeducking == false then
  380. fakeduck_modeB = gui.GetValue("msc_fakelag_mode")
  381. fakeduck_valueB = gui.GetValue("msc_fakelag_value")
  382. desyncS = gui.GetValue("rbot_antiaim_stand_desync")
  383. desyncM = gui.GetValue("rbot_antiaim_move_desync")
  384. fakeducking = true;
  385. end
  386. if fakeduckDisable:GetValue() == true then
  387. gui.SetValue("rbot_antiaim_stand_desync", 0)
  388. gui.SetValue("rbot_antiaim_move_desync", 0)
  389. end
  390. gui.SetValue("msc_fakelag_mode", fakeduck_mode)
  391. gui.SetValue("msc_fakelag_value", fakeduck_value)
  392. else
  393. if fakeducking == true then
  394. gui.SetValue("msc_fakelag_mode", fakeduck_modeB)
  395. gui.SetValue("msc_fakelag_value", fakeduck_valueB)
  396. gui.SetValue("rbot_antiaim_stand_desync", desyncS)
  397. gui.SetValue("rbot_antiaim_move_desync", desyncM)
  398. fakeducking = false;
  399. end
  400. end
  401. end
  402. end
  403. end
  404. callbacks.Register("Draw", "fakeduckFix", fakeduckFix)
  405.  
  406. -- menu hide
  407.  
  408. local ogMenu = gui.Reference("MENU");
  409.  
  410. local function hideMenu()
  411. if ogMenu:IsActive() then
  412. cActive = 1
  413. else
  414. cActive = 0
  415. end
  416. if (cMenu:GetValue()) then
  417. cWindow:SetActive(cActive);
  418. else
  419. cWindow:SetActive(0);
  420. end
  421. end
  422. callbacks.Register("Draw", "hideMenu", hideMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement