Tema2021

CS:GO keybind lua AIMWARE.net

Mar 26th, 2022 (edited)
2,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. --Pre-view: https://imgur.com/PRITP0c
  2.  
  3.  
  4.  
  5. print("Loaded key_bind by Clyde 🍏")
  6.  
  7. print("Loaded Keybind by Clyde | Fixed by Verieth")
  8.  
  9. local mouseX, mouseY, x, y, dx, dy, w, h = 0, 0, 128, 290, 0, 0, 1, 50;
  10. local shouldDrag = false;
  11. local font = draw.CreateFont("Verdana", 12, 12);
  12. local topbarSize = 23;
  13. local imgRGBA, imgWidth, imgHeight = common.DecodePNG( svgData );
  14. local texture = draw.CreateTexture( imgRGBA, imgWidth, imgHeight );
  15. local render = {};
  16.  
  17. render.outline = function( x, y, w, h, col )
  18. draw.Color( col[1], col[2], col[3], col[4] );
  19. draw.OutlinedRect( x, y, x + w, y + h );
  20. end
  21. render.rect = function( x, y, w, h, col )
  22. draw.Color( col[1], col[2], col[3], col[4] );
  23.  
  24. end
  25. render.rect2 = function( x, y, w, h )
  26. draw.FilledRect( x, y, x + w, y + h );
  27. end
  28. render.gradient = function( x, y, w, h, col1, col2, is_vertical )
  29. render.rect( x, y, w, h, col1 );
  30.  
  31. local r, g, b = col2[1], col2[2], col2[3];
  32.  
  33. if is_vertical then
  34. for i = 1, h do
  35. local a = i / h * 255;
  36. render.rect( x, y + i, w, 1, { r, g, b, a } );
  37. end
  38. else
  39. for i = 1, w do
  40. local a = i / w * 255;
  41. render.rect( x + i, y, 1, h, { r, g, b, a } );
  42. end
  43. end
  44. end
  45.  
  46. local function getKeybinds()
  47. local Keybinds = {};
  48. local i = 1;
  49.  
  50. hLocalPlayer = entities.GetLocalPlayer();
  51. wid = hLocalPlayer:GetWeaponID()
  52.  
  53.  
  54. if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.attack.shared.fire") == '"Shift Fire"' then
  55. Keybinds[i] = ' On shot AA';
  56. i = i + 1;
  57. end
  58.  
  59. if gui.GetValue("rbot.master") and cheat.IsFakeDucking() then
  60. Keybinds[i] = ' Fake Duck';
  61. i = i + 1;
  62. end
  63.  
  64. if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.movement.slowkey") ~= 0 and input.IsButtonDown(gui.GetValue("rbot.accuracy.movement.slowkey")) then
  65. Keybinds[i] = ' Slowwalk';
  66. i = i + 1;
  67. end
  68.  
  69.  
  70. if gui.GetValue("esp.master") and gui.GetValue("esp.world.thirdperson") then
  71. Keybinds[i] = ' Thirdperson';
  72. i = i + 1;
  73. end
  74.  
  75. if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.attack.shared.fire") == '"Defensive Warp Fire"'
  76. or ((wid == 1 or wid == 64) and gui.GetValue("rbot.accuracy.attack.hpistol.fire") == '"Defensive Warp Fire"') then
  77.  
  78. Keybinds[i] = ' Double shot';
  79. i = i + 1;
  80.  
  81.  
  82. elseif gui.GetValue("rbot.master") and (wid == 2 or wid == 3 or wid == 4 or wid == 30 or wid == 32 or wid == 36 or wid == 61 or wid == 63) and gui.GetValue("rbot.accuracy.attack.pistol.fire") == '"Defensive Warp Fire"' then
  83. Keybinds[i] = ' Double shot';
  84. i = i + 1;
  85.  
  86.  
  87. elseif gui.GetValue("rbot.master") and (wid == 11 or wid == 38) and gui.GetValue("rbot.accuracy.attack.asniper.fire") == '"Defensive Warp Fire"' then
  88. Keybinds[i] = ' Double shot';
  89. i = i + 1;
  90.  
  91.  
  92. elseif gui.GetValue("rbot.master") and (wid == 40) and gui.GetValue("rbot.accuracy.attack.scout.fire") == '"Defensive Warp Fire"' then
  93. Keybinds[i] = ' Double shot';
  94. i = i + 1;
  95.  
  96.  
  97.  
  98. elseif gui.GetValue("rbot.master") and (wid == 9) and gui.GetValue("rbot.accuracy.attack.sniper.fire") == '"Defensive Warp Fire"' then
  99. Keybinds[i] = ' Double shot';
  100. i = i + 1;
  101.  
  102. end
  103.  
  104.  
  105. return Keybinds;
  106. end
  107.  
  108. local function drawkeybinds(Keybinds)
  109. local temp = false;
  110. for index in pairs(Keybinds) do
  111.  
  112. if (temp) then
  113. render.gradient( x+9, (y + topbarSize + 5) + (index * 15), 198, 1, { 13, 14, 15, 255 }, {40, 30, 30, 255 }, false );
  114. end
  115. temp=true;
  116. draw.SetFont(font);
  117. draw.Color(0, 0, 0, 200);
  118. draw.Text(x + 10, (y + topbarSize + 5) + (index * 15), Keybinds[index])
  119. draw.Text(x + 85, (y + topbarSize + 5) + (index * 15), " [ 👍 ] ")
  120.  
  121. draw.SetFont(font);
  122. draw.Color(255, 255, 255, 255);
  123. draw.Text(x + 84, (y + topbarSize + 4) + (index * 15), " [ 👍 ] " )
  124. draw.Text(x + 9, (y + topbarSize + 4) + (index * 15), Keybinds [index])
  125. end
  126. end
  127.  
  128. local function drawRectFill(r, g, b, a, x, y, w, h, texture)
  129. if (texture ~= nil) then
  130. draw.SetTexture(texture);
  131. else
  132. draw.SetTexture(texture);
  133. end
  134. draw.Color(r, g, b, a);
  135. draw.FilledRect(x, y, x + w, y + h);
  136. end
  137.  
  138.  
  139. local function dragFeature()
  140. if input.IsButtonDown(1) then
  141. mouseX, mouseY = input.GetMousePos();
  142. if shouldDrag then
  143. x = mouseX - dx;
  144. y = mouseY - dy;
  145. end
  146. if mouseX >= x and mouseX <= x + w and mouseY >= y and mouseY <= y + 40 then
  147. shouldDrag = true;
  148. dx = mouseX - x;
  149. dy = mouseY - y;
  150. end
  151. else
  152. shouldDrag = false;
  153. end
  154. end
  155.  
  156. local function drawOutline(r, g, b, a, x, y, w, h, howMany)
  157. for i = 1, howMany do
  158. draw.Color(r, g, b, a);
  159. draw.OutlinedRect(x - i, y - i, x + w + i, y + h + i);
  160. end
  161. end
  162.  
  163. local function drawWindow(Keybinds)
  164. local tW, _ = draw.GetTextSize(keytext);
  165. local h2 = 5 + (Keybinds * 15);
  166. local h = h + (Keybinds * 15);
  167.  
  168. drawRectFill(164,93,145, 180, x + 7, y + 21, 121, 1);
  169. drawRectFill(164,93,145, 190, x + 7, y + 20, 121, 1);
  170. drawRectFill(0, 0, 0, 150, x + 7, y + 22, 121, 17);
  171.  
  172. draw.Color(0, 0, 0, 255);
  173. draw.SetFont(font);
  174. local keytext = "⚔❤ keybinds ❤⚔";
  175.  
  176. draw.Text(x + ((40 - tW) / 2), y + 26, keytext)
  177.  
  178. draw.Color(255, 255, 255, 255);
  179. draw.SetFont(font);
  180.  
  181. draw.Text(x + ((40 - tW) / 2), y + 26, keytext)
  182.  
  183. draw.Color(255, 255, 255);
  184. draw.SetTexture( texture );
  185.  
  186.  
  187. end
  188.  
  189. panorama.RunScript([[
  190. SteamOverlayAPI.OpenUrlInOverlayOrExternalBrowser("https://www.youtube.com/watch?v=19KC0QLbDqQ");
  191. ]])
  192.  
  193. callbacks.Register("Draw", function()
  194. if keybindlist:GetValue() == false then return end
  195. if not entities.GetLocalPlayer() or not entities.GetLocalPlayer():IsAlive() then return end
  196.  
  197. draw.SetTexture( texture );
  198. local Keybinds = getKeybinds();
  199. drawWindow(#Keybinds);
  200.  
  201. drawkeybinds(Keybinds);
  202. dragFeature();
  203. end)
  204.  
  205. function DrawUI()
  206. --colortop = gui. ColorPicker( gui.Reference("Misc","General","Extra") , "keycolor ", 255, 255, 255, 255 )
  207. keybindlist = gui.Checkbox(gui.Reference("Misc","General","Extra"),"keybindlist","Keybind", true);
  208.  
  209. end
  210. DrawUI();
  211.  
Advertisement
Add Comment
Please, Sign In to add comment