Advertisement
Guest User

clua

a guest
Jul 17th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.02 KB | None | 0 0
  1. -- menu shit
  2.  
  3. -- refs
  4.  
  5. print("cLua | Loaded")
  6.  
  7. local mPlacement = gui.Reference("MISC", "AUTOMATION", "Other");
  8.  
  9. -- checkboxes
  10.  
  11. local cMenu = gui.Checkbox(mPlacement, "cluashow", "cLua", false);
  12.  
  13. -- windows
  14. local cWindow = gui.Window("clua_menu", "cLua main", 1280, 740, 600, 600)
  15. local cDesyncgroup = gui.Groupbox(cWindow, "Desync", 20, 20, 200, 140)
  16. local cFixesGroup = gui.Groupbox(cWindow, "Fixes", 20, 200, 200, 100)
  17. local cKnifeGroup = gui.Groupbox(cWindow, "Knife/Zeus", 250, 20, 200, 72)
  18.  
  19. -- actual features
  20. local me = entities.GetLocalPlayer()
  21. -- invert desync
  22.  
  23. local invertKey = gui.Keybox(cDesyncgroup, "cluainvert_key", "Invert key", false)
  24. local desyncators = gui.Multibox(cDesyncgroup, "Indicators")
  25. local dArrows = gui.Checkbox(desyncators, "cluadesync_arrows", "arrows", false)
  26. local dText = gui.Checkbox(desyncators, "cluadesync_text", "text", false)
  27.  
  28. --local tankCheckBox = gui.Checkbox(cluaInvertGroup, "cluadesync_tank", "Tank AA", false)
  29. local vleftDesync = 3;
  30. local vrightDesync = 2;
  31. local eleftDesync = 2;
  32. local erightDesync = 3;
  33. local activeSide = "null";
  34.  
  35.  
  36. local function inverter()
  37. if entities.GetLocalPlayer() ~= nil then
  38. if invertKey:GetValue() == 0 then return end
  39. if input.IsButtonPressed(invertKey:GetValue()) and not input.IsButtonDown(69) then
  40. if rightDesync == false then
  41. gui.SetValue("rbot_antiaim_stand_desync", vrightDesync);
  42. gui.SetValue("rbot_antiaim_move_desync", vrightDesync);
  43. rightDesync = not rightDesync;
  44. else
  45. gui.SetValue("rbot_antiaim_stand_desync", vleftDesync);
  46. gui.SetValue("rbot_antiaim_move_desync", vleftDesync);
  47. rightDesync = not rightDesync;
  48. end
  49. else if input.IsButtonPressed(invertKey:GetValue()) and input.IsButtonDown(69) then
  50. if rightDesync == false then
  51. gui.SetValue("rbot_antiaim_stand_desync", erightDesync);
  52. gui.SetValue("rbot_antiaim_move_desync", erightDesync);
  53. rightDesync = not rightDesync;
  54. else
  55. gui.SetValue("rbot_antiaim_stand_desync", eleftDesync);
  56. gui.SetValue("rbot_antiaim_move_desync", eleftDesync);
  57. rightDesync = not rightDesync;
  58. end
  59. end
  60. end
  61. end
  62. end
  63. callbacks.Register("Draw", "inverter", inverter)
  64.  
  65. -- anti knife
  66.  
  67. local antiknife_mode = 0;
  68. local antiknife_value = 7;
  69.  
  70. local antiknifeEnabled = gui.Checkbox(cKnifeGroup, "cluaknife_antiknife", "Anti-Knife", false)
  71.  
  72. local antiknife, antiknife_modeB, antiknife_valueB;
  73.  
  74. antiknife_modeB = gui.GetValue("msc_fakelag_mode")
  75. antiknife_valueB = gui.GetValue("msc_fakelag_value")
  76. local function antiknifeE()
  77. if antiknifeEnabled:GetValue() and me ~= nil then
  78. if cMenu:IsActive() then
  79. antiknife_modeB = gui.GetValue("msc_fakelag_mode")
  80. antiknife_valueB = gui.GetValue("msc_fakelag_value")
  81. return
  82. end
  83. if input.IsButtonDown(69) then
  84. gui.SetValue("msc_fakelag_mode", antiknife_mode)
  85. gui.SetValue("msc_fakelag_value", antiknife_value)
  86. else
  87. gui.SetValue("msc_fakelag_mode", antiknife_modeB)
  88. gui.SetValue("msc_fakelag_value", antiknife_valueB)
  89. end
  90. end
  91. end
  92. callbacks.Register("Draw", "antiknifeE", antiknifeE)
  93.  
  94. -- USE desync
  95.  
  96. local desync_pitch, desync_yaw = 0;
  97.  
  98. local desyncEnabled = gui.Checkbox(cDesyncgroup, "cluaknife_desync", "ON USE Desync", false)
  99.  
  100. local desync_pitchS, desync_yawS, desync_pitchM, desync_yawM
  101.  
  102. desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
  103. desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
  104. desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
  105. desync_yawM = gui.GetValue("rbot_antiaim_move_real")
  106. local function eDesync()
  107. if desyncEnabled:GetValue() and me ~= nil then
  108. if cMenu:IsActive() then
  109. desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
  110. desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
  111. desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
  112. desync_yawM = gui.GetValue("rbot_antiaim_move_real")
  113. return
  114. end
  115. if input.IsButtonDown(69) then
  116. gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitch)
  117. gui.SetValue("rbot_antiaim_stand_real",desync_yaw)
  118. gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitch)
  119. gui.SetValue("rbot_antiaim_move_real", desync_yaw)
  120. else
  121. gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitchS)
  122. gui.SetValue("rbot_antiaim_stand_real", desync_yawS)
  123. gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitchM)
  124. gui.SetValue("rbot_antiaim_move_real", desync_yawM)
  125.  
  126. end
  127. end
  128. end
  129. callbacks.Register("Draw", "eDesync", eDesync)
  130.  
  131. -- disable autostrafer on jump
  132.  
  133. local straferDisabled = gui.Checkbox(cFixesGroup, "cluafixes_strafer", "Jumpshot anti-strafer", false)
  134.  
  135. local function jumpStrafer()
  136. if gui.GetValue("cluafixes_strafer") == true then
  137. local velocity = vector.Length(entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]")) -- Thanks to Tomeno!
  138. gui.SetValue("msc_autostrafer_enable", 0)
  139. if input.IsButtonDown(32) then
  140. local x,y,z = entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]") -- Thanks to Tomeno & CloudFlare1337!
  141. local velocity = math.sqrt(x^2 + y^2)
  142. if velocity >= 5 then
  143. gui.SetValue("msc_autostrafer_enable", 1)
  144. else
  145. gui.SetValue("msc_autostrafer_enable", 0)
  146. end
  147. end
  148. end
  149. end
  150. callbacks.Register("CreateMove", jumpStrafer)
  151.  
  152. -- indicators
  153.  
  154. local function indicators()
  155. if entities.GetLocalPlayer() ~= nil then
  156. local x,y = draw.GetScreenSize()
  157. local textFont = draw.CreateFont('Verdana', 50, 700)
  158. draw.SetFont(textFont)
  159. if not rightDesync then
  160. add.IndicatorForCheckbox("DSIDE: LEFT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  161. if gui.GetValue("cluadesync_arrows") == true then
  162. draw.Color(66, 135, 245, 255)
  163. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  164. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  165. draw.Color(255, 255, 255, 255)
  166. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  167. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  168. end
  169. else if rightDesync then
  170. add.IndicatorForCheckbox("DSIDE: RIGHT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  171. if gui.GetValue("cluadesync_arrows") == true then
  172. draw.Color(255, 255, 255, 255)
  173. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  174. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  175. draw.Color(66, 135, 245, 255)
  176. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  177. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  178. end
  179. else
  180. add.IndicatorForCheckbox("DSIDE: OFF","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
  181. if gui.GetValue("cluadesync_arrows") == true then
  182. draw.Color(255, 255, 255, 255)
  183. draw.Text(x/2 - x/16, y/2 - 25, "◄")
  184. draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
  185. draw.Color(255, 255, 255, 255)
  186. draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
  187. draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
  188. end
  189. end
  190. end
  191. end
  192. end
  193. callbacks.Register("Draw", "indicators", indicators)
  194.  
  195.  
  196.  
  197. --[[
  198. FIXES FOR VARIOUS SHIT
  199. ]]--
  200.  
  201. -- revolver fix | credits to adrianobessa5682 OR original author
  202.  
  203. local revolverEnabled = gui.Checkbox(cFixesGroup, "cluafixes_revolver", "Revolver fix", false)
  204.  
  205. local cnt = 0
  206. local cntmax = 15;
  207. local function revolverFix(cmd)
  208. gui.SetValue("rbot_revolver_autocock", 0)
  209. if revolverEnabled:GetValue() and me ~= nil then
  210. local wep = me:GetPropEntity("m_hActiveWeapon")
  211. if wep ~= nil and wep:GetWeaponID() == 64 then
  212. cnt = cnt + 1
  213. if cnt <= cntmax then
  214. cmd:SetButtons(cmd:GetButtons() | (1 << 0))
  215. else
  216. cnt = 0
  217.  
  218. local m_flPostponeFireReadyTime = wep:GetPropFloat("m_flPostponeFireReadyTime")
  219. if m_flPostponeFireReadyTime > 0 and m_flPostponeFireReadyTime < globals.CurTime() then
  220. cmd:SetButtons(cmd:GetButtons() & ~(1 << 0))
  221. end
  222. end
  223. end
  224. end
  225. end
  226.  
  227. callbacks.Register("CreateMove", revolverFix)
  228.  
  229. -- fakeduck fix
  230.  
  231. local fakeduckEnabled = gui.Checkbox(cFixesGroup, "cluafixes_fakeduck", "Fakeduck Fakelag", false)
  232. local fakeduckDisable = gui.Checkbox(cFixesGroup, "cluafixes_fakeduckdisable", "Fakeduck AA fix", false)
  233. local fakeduckKey = gui.GetValue("rbot_antiaim_fakeduck")
  234. local fakeducking = false
  235.  
  236. local fakeduck_mode = 0;
  237.  
  238. local fakeduck_value = 4;
  239. local fakeduck_valueB, fakeduck_modeB, desyncS, desyncM;
  240.  
  241.  
  242. function fakeduckFix()
  243. if entities.GetLocalPlayer() ~= nil then
  244. if fakeduckEnabled:GetValue() == true and fakeduckKey ~= nil then
  245. if input.IsButtonDown( fakeduckKey ) then
  246. if fakeducking == false then
  247. fakeduck_modeB = gui.GetValue("msc_fakelag_mode")
  248. fakeduck_valueB = gui.GetValue("msc_fakelag_value")
  249. desyncS = gui.GetValue("rbot_antiaim_stand_desync")
  250. desyncM = gui.GetValue("rbot_antiaim_move_desync")
  251. fakeducking = true;
  252. end
  253. if fakeduckDisable:GetValue() == true then
  254. gui.SetValue("rbot_antiaim_stand_desync", 0)
  255. gui.SetValue("rbot_antiaim_move_desync", 0)
  256. end
  257. gui.SetValue("msc_fakelag_mode", fakeduck_mode)
  258. gui.SetValue("msc_fakelag_value", fakeduck_value)
  259. else
  260. if fakeducking == true then
  261. gui.SetValue("msc_fakelag_mode", fakeduck_modeB)
  262. gui.SetValue("msc_fakelag_value", fakeduck_valueB)
  263. gui.SetValue("rbot_antiaim_stand_desync", desyncS)
  264. gui.SetValue("rbot_antiaim_move_desync", desyncM)
  265. fakeducking = false;
  266. end
  267. end
  268. end
  269. end
  270. end
  271. callbacks.Register("Draw", "fakeduckFix", fakeduckFix)
  272.  
  273. -- menu hide
  274.  
  275. local ogMenu = gui.Reference("MENU");
  276.  
  277. local function hideMenu()
  278. if ogMenu:IsActive() then
  279. cActive = 1
  280. else
  281. cActive = 0
  282. end
  283. if (cMenu:GetValue()) then
  284. cWindow:SetActive(cActive);
  285. else
  286. cWindow:SetActive(0);
  287. end
  288. end
  289. callbacks.Register("Draw", "hideMenu", hideMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement