Advertisement
Mister_Stefan

keybind list (OT)

Mar 26th, 2022
1,050
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var x = 500, y = 200, width = 200, height = 25;
  2. menucolor = [51, 51, 51, 150]
  3. difference = [0, 0]
  4.  
  5. var getHotkey2keyName = {
  6.     1: "M1",
  7.     2: "M2",
  8.     4: "M3",
  9.     5: "M4",
  10.     6: "M5",
  11.     8: "BackS",
  12.     9: "TAB",
  13.     13: "ENTER",
  14.     16: "SHIFT",
  15.     17: "CTRL",
  16.     18: "ALT",
  17.     20: "CAPS",
  18.     32: "SPACE",
  19.     33: "PGUP",
  20.     34: "PGDOWN",
  21.     35: "END",
  22.     36: "HOME",
  23.     37: "LEFT",
  24.     38: "UP",
  25.     39: "RIGHT",
  26.     40: "DOWN",
  27.     48: "0",
  28.     49: "1",
  29.     50: "2",
  30.     51: "3",
  31.     52: "4",
  32.     53: "5",
  33.     54: "6",
  34.     55: "7",
  35.     56: "8",
  36.     57: "9",
  37.     65: "A",
  38.     66: "B",
  39.     67: "C",
  40.     68: "D",
  41.     69: "E", // nice
  42.     70: "F",
  43.     71: "G",
  44.     72:"H",
  45.     73:"I",
  46.     74:"J",
  47.     75:"K",
  48.     76:"L",
  49.     77:"M",
  50.     78:"N",
  51.     79:"O",
  52.     80:"P",
  53.     81:"Q",
  54.     82:"R",
  55.     83:"S",
  56.     84:"T",
  57.     85:"U",
  58.     86:"V",
  59.     87:"W",
  60.     88:"X",
  61.     89:"Y",
  62.     90:"Z",
  63.     96:"NUM0",
  64.     97:"NUM1",
  65.     98:"NUM2",
  66.     99:"NUM3",
  67.     100:"NUM4",
  68.     101:"NUM5",
  69.     102:"NUM6",
  70.     103:"NUM7",
  71.     104:"NUM8",
  72.     105:"NUM9",
  73.     106:"*",
  74.     107:"+",
  75.     109:"-",
  76.     110:".",
  77.     111:"/",
  78.     112:"F1",
  79.     113:"F2",
  80.     114:"F3",
  81.     115:"F4",
  82.     116:"F5",
  83.     117:"F6",
  84.     118:"F7",
  85.     119:"F8",
  86.     120:"F9",
  87.     121:"F10",
  88.     122:"F11",
  89.     123:"F12"
  90. };
  91.  
  92. UI.AddSubTab(["Config", "SUBTAB_MGR"], "Keybinds");
  93. UI.AddSliderInt(["Config", "Keybinds", "Keybinds"], "Opacity", 0, 255)
  94.  
  95. // Hotkey paths to tabs and stuff, commented out useless keybinds
  96.  
  97. // HOTKEY_ragebotactive = ["Rage", "General", "General", "Key assignment", "Ragebot activation"]
  98. HOTKEY_resolveroverride = ["Rage", "General", "General", "Key assignment", "Resolver override"]
  99. HOTKEY_forcebodyaim = ["Rage", "General", "General", "Key assignment", "Force body aim"]
  100. HOTKEY_forcesafepoint = ["Rage", "General", "General", "Key assignment", "Force safe point"]
  101.  
  102. HOTKEY_doubletap = ["Rage", "Exploits", "Keys", "Key assignment", "Double tap"]
  103. HOTKEY_hideshots = ["Rage", "Exploits", "Keys", "Key assignment", "Hide shots"]
  104.  
  105. // HOTKEY_leftdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Left direction"]
  106. // HOTKEY_backdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Back direction"]
  107. // HOTKEY_rightdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Right direction"]
  108. // HOTKEY_mousedirection = ["Rage", "Anti Aim", "General", "Key assignment", "Mouse direction"]
  109. HOTKEY_aainverter = ["Rage", "Anti Aim", "General", "Key assignment", "AA Direction inverter"]
  110. // HOTKEY_jitter = ["Rage", "Anti Aim", "General", "Key assignment", "Jitter"]
  111. HOTKEY_slowwalk = ["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"]
  112. HOTKEY_fakeduck = ["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"]
  113.  
  114. HOTKEY_edgejump = ["Misc.", "Keys", "General", "Key assignment", "Edge jump"]
  115. HOTKEY_autopeek = ["Misc.", "Keys", "General", "Key assignment", "Auto peek"]
  116. HOTKEY_thirdperson = ["Misc.", "Keys", "General", "Key assignment", "Thirdperson"]
  117. HOTKEY_zoom = ["Misc.", "Keys", "General", "Key assignment", "Zoom"]
  118. HOTKEY_freecam = ["Misc.", "Keys", "General", "Key assignment", "Freecam"]
  119.  
  120.  
  121. Cheat.RegisterCallback("Draw", "hotkeylist")
  122.  
  123. // functions \/
  124.  
  125. function states(path) {
  126.     return UI.GetHotkeyState(path);
  127. }
  128.  
  129. function keys(path) {
  130.     return UI.GetHotkey(path).toString();
  131. }
  132.  
  133. function dragMenu(i) {
  134.     cursor_pos = Input.GetCursorPosition();
  135.  
  136.     if (Input.IsKeyPressed(0x01) && (cursor_pos[0] > x && (cursor_pos[0] < (x + width) && (cursor_pos[1] > y - 20 && (cursor_pos[1] < (y + height + 16 * (i + 1))))))) {
  137.         x = cursor_pos[0] - difference[0];
  138.         y = cursor_pos[1] - difference[1];
  139.  
  140.     } else {
  141.         difference[0] = cursor_pos[0] - x;
  142.         difference[1] = cursor_pos[1] - y;
  143.     }
  144. }
  145.  
  146. function RenderText(x, y, centered, text, color, font) {
  147.     Render.String(x + 1, y + 1, centered, text, [0, 0, 0, 255], font);
  148.     Render.String(x, y, centered, text, [255, 255, 255, 255], font);
  149. }
  150.  
  151. function hotkeylist() {
  152.  
  153.     menucolorchanged = UI.GetValue(["Config", "Keybinds", "Keybinds", "Opacity"]);
  154.     menucolor = [51, 51, 51, menucolorchanged]
  155.  
  156.     var font = Render.GetFont("Verdana.ttf", 11, true);
  157.  
  158.     Render.FilledRect(x + 3, y - 3, width - 6, 1, menucolor)
  159.     Render.FilledRect(x + 2, y - 2, width - 4, 1, menucolor)
  160.     Render.FilledRect(x + 1, y - 1, width - 2, 1, menucolor)
  161.  
  162.     Render.FilledRect(x, y, width, height, menucolor)
  163.     Render.FilledRect(x + 10, y + 20, width - 20, 1, [255, 20, 20, 255])
  164.  
  165.     Render.String(x + 100, y + 2, 1, "K  E  Y  B  I  N  D  S", [200, 88, 59, 255], font)
  166.  
  167.     var keyText = []
  168.     var hotkeyText = []
  169.     var enabledText = []
  170.  
  171.     if (UI.GetValue(HOTKEY_resolveroverride)) {
  172.         hotkeyText.push("Resolver ")
  173.         enabledText.push(states(HOTKEY_resolveroverride))
  174.         keyText.push(keys(HOTKEY_resolveroverride))
  175.     }
  176.     if (UI.GetValue(HOTKEY_forcebodyaim)) {
  177.         hotkeyText.push("Body aim ")
  178.         enabledText.push(states(HOTKEY_forcebodyaim))
  179.         keyText.push(keys(HOTKEY_forcebodyaim))
  180.     }
  181.     if (UI.GetValue(HOTKEY_forcesafepoint)) {
  182.         hotkeyText.push("Safe point ")
  183.         enabledText.push(states(HOTKEY_forcesafepoint))
  184.         keyText.push(keys(HOTKEY_forcesafepoint))
  185.     }
  186.  
  187.     if (UI.GetValue(HOTKEY_doubletap)) {
  188.         hotkeyText.push("Doubletap ")
  189.         enabledText.push(states(HOTKEY_doubletap))
  190.         keyText.push(keys(HOTKEY_doubletap))
  191.     }
  192.     if (UI.GetValue(HOTKEY_hideshots)) {
  193.         hotkeyText.push("Hideshots ")
  194.         enabledText.push(states(HOTKEY_hideshots))
  195.         keyText.push(keys(HOTKEY_hideshots))
  196.     }
  197.  
  198.     if (UI.GetValue(HOTKEY_aainverter)) {
  199.         hotkeyText.push("Inverter ")
  200.         enabledText.push(states(HOTKEY_aainverter))
  201.         keyText.push(keys(HOTKEY_aainverter))
  202.     }
  203.     if (UI.GetValue(HOTKEY_slowwalk)) {
  204.         hotkeyText.push("Slowwalk ")
  205.         enabledText.push(states(HOTKEY_slowwalk))
  206.         keyText.push(keys(HOTKEY_slowwalk))
  207.     }
  208.     if (UI.GetValue(HOTKEY_fakeduck)) {
  209.         hotkeyText.push("Fakeduck ")
  210.         enabledText.push(states(HOTKEY_fakeduck))
  211.         keyText.push(keys(HOTKEY_fakeduck))
  212.     }
  213.  
  214.     if (UI.GetValue(HOTKEY_edgejump)) {
  215.         hotkeyText.push("Edgejump ")
  216.         enabledText.push(states(HOTKEY_edgejump))
  217.         keyText.push(keys(HOTKEY_edgejump))
  218.     }
  219.     if (UI.GetValue(HOTKEY_autopeek)) {
  220.         hotkeyText.push("Autopeek ")
  221.         enabledText.push(states(HOTKEY_autopeek))
  222.         keyText.push(keys(HOTKEY_autopeek))
  223.     }
  224.     if (UI.GetValue(HOTKEY_thirdperson)) {
  225.         hotkeyText.push("Thirdperson ")
  226.         enabledText.push(states(HOTKEY_thirdperson))
  227.         keyText.push(keys(HOTKEY_thirdperson))
  228.     }
  229.     if (UI.GetValue(HOTKEY_zoom)) {
  230.         hotkeyText.push("Zoom ")
  231.         enabledText.push(states(HOTKEY_zoom))
  232.         keyText.push(keys(HOTKEY_zoom))
  233.     }
  234.     if (UI.GetValue(HOTKEY_freecam)) {
  235.         hotkeyText.push("Freecam ")
  236.         enabledText.push(states(HOTKEY_freecam))
  237.         keyText.push(keys(HOTKEY_freecam))
  238.     }
  239.  
  240.     for (i = 0; i < hotkeyText.length; i++) {
  241.         if (enabledText[i] == "Always") {
  242.             needDiff = 51
  243.  
  244.             renderKeyText = "[-]";
  245.         }
  246.         else if (enabledText[i] == "Hold") {
  247.             needDiff = 36
  248.  
  249.             renderKeyText = "[" + getHotkey2keyName[keyText[i]].toString() + "]";
  250.         }
  251.         else if (enabledText[i] == "Toggle") {
  252.             needDiff = 49
  253.             renderKeyText = "[" + getHotkey2keyName[keyText[i]].toString() + "]";
  254.         }
  255.  
  256.         Render.FilledRect(x, y + height + 16 * i, width, 16, menucolor)
  257.         RenderText(x + 105, y + height + 16 * i, 1, hotkeyText[i], [255, 255, 255, 255], font)
  258.         RenderText(x + width - needDiff, y + height + 16 * i, 0, enabledText[i], [0, 0, 0, 255], font)
  259.         RenderText(x + 7, y + height + 16 * i, 0, renderKeyText, [255, 255, 255, 255], font)
  260.  
  261.         if (i + 1 == hotkeyText.length) { // DO LATER PLS IM TIRED ASF
  262.             Render.FilledRect(x + 1, y + height + 16 * i + 16, width - 2, 1, menucolor)
  263.             Render.FilledRect(x + 2, y + height + 16 * i + 16 + 1, width - 4, 1, menucolor)
  264.             Render.FilledRect(x + 3, y + height + 16 * i + 16 + 2, width - 6, 1, menucolor)
  265.  
  266.             dragMenu(i);
  267.         }
  268.     }
  269. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement