Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x = 500, y = 200, width = 200, height = 25;
- menucolor = [51, 51, 51, 150]
- difference = [0, 0]
- var getHotkey2keyName = {
- 1: "M1",
- 2: "M2",
- 4: "M3",
- 5: "M4",
- 6: "M5",
- 8: "BackS",
- 9: "TAB",
- 13: "ENTER",
- 16: "SHIFT",
- 17: "CTRL",
- 18: "ALT",
- 20: "CAPS",
- 32: "SPACE",
- 33: "PGUP",
- 34: "PGDOWN",
- 35: "END",
- 36: "HOME",
- 37: "LEFT",
- 38: "UP",
- 39: "RIGHT",
- 40: "DOWN",
- 48: "0",
- 49: "1",
- 50: "2",
- 51: "3",
- 52: "4",
- 53: "5",
- 54: "6",
- 55: "7",
- 56: "8",
- 57: "9",
- 65: "A",
- 66: "B",
- 67: "C",
- 68: "D",
- 69: "E", // nice
- 70: "F",
- 71: "G",
- 72:"H",
- 73:"I",
- 74:"J",
- 75:"K",
- 76:"L",
- 77:"M",
- 78:"N",
- 79:"O",
- 80:"P",
- 81:"Q",
- 82:"R",
- 83:"S",
- 84:"T",
- 85:"U",
- 86:"V",
- 87:"W",
- 88:"X",
- 89:"Y",
- 90:"Z",
- 96:"NUM0",
- 97:"NUM1",
- 98:"NUM2",
- 99:"NUM3",
- 100:"NUM4",
- 101:"NUM5",
- 102:"NUM6",
- 103:"NUM7",
- 104:"NUM8",
- 105:"NUM9",
- 106:"*",
- 107:"+",
- 109:"-",
- 110:".",
- 111:"/",
- 112:"F1",
- 113:"F2",
- 114:"F3",
- 115:"F4",
- 116:"F5",
- 117:"F6",
- 118:"F7",
- 119:"F8",
- 120:"F9",
- 121:"F10",
- 122:"F11",
- 123:"F12"
- };
- UI.AddSubTab(["Config", "SUBTAB_MGR"], "Keybinds");
- UI.AddSliderInt(["Config", "Keybinds", "Keybinds"], "Opacity", 0, 255)
- // Hotkey paths to tabs and stuff, commented out useless keybinds
- // HOTKEY_ragebotactive = ["Rage", "General", "General", "Key assignment", "Ragebot activation"]
- HOTKEY_resolveroverride = ["Rage", "General", "General", "Key assignment", "Resolver override"]
- HOTKEY_forcebodyaim = ["Rage", "General", "General", "Key assignment", "Force body aim"]
- HOTKEY_forcesafepoint = ["Rage", "General", "General", "Key assignment", "Force safe point"]
- HOTKEY_doubletap = ["Rage", "Exploits", "Keys", "Key assignment", "Double tap"]
- HOTKEY_hideshots = ["Rage", "Exploits", "Keys", "Key assignment", "Hide shots"]
- // HOTKEY_leftdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Left direction"]
- // HOTKEY_backdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Back direction"]
- // HOTKEY_rightdirection = ["Rage", "Anti Aim", "General", "Key assignment", "Right direction"]
- // HOTKEY_mousedirection = ["Rage", "Anti Aim", "General", "Key assignment", "Mouse direction"]
- HOTKEY_aainverter = ["Rage", "Anti Aim", "General", "Key assignment", "AA Direction inverter"]
- // HOTKEY_jitter = ["Rage", "Anti Aim", "General", "Key assignment", "Jitter"]
- HOTKEY_slowwalk = ["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"]
- HOTKEY_fakeduck = ["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"]
- HOTKEY_edgejump = ["Misc.", "Keys", "General", "Key assignment", "Edge jump"]
- HOTKEY_autopeek = ["Misc.", "Keys", "General", "Key assignment", "Auto peek"]
- HOTKEY_thirdperson = ["Misc.", "Keys", "General", "Key assignment", "Thirdperson"]
- HOTKEY_zoom = ["Misc.", "Keys", "General", "Key assignment", "Zoom"]
- HOTKEY_freecam = ["Misc.", "Keys", "General", "Key assignment", "Freecam"]
- Cheat.RegisterCallback("Draw", "hotkeylist")
- // functions \/
- function states(path) {
- return UI.GetHotkeyState(path);
- }
- function keys(path) {
- return UI.GetHotkey(path).toString();
- }
- function dragMenu(i) {
- cursor_pos = Input.GetCursorPosition();
- 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))))))) {
- x = cursor_pos[0] - difference[0];
- y = cursor_pos[1] - difference[1];
- } else {
- difference[0] = cursor_pos[0] - x;
- difference[1] = cursor_pos[1] - y;
- }
- }
- function RenderText(x, y, centered, text, color, font) {
- Render.String(x + 1, y + 1, centered, text, [0, 0, 0, 255], font);
- Render.String(x, y, centered, text, [255, 255, 255, 255], font);
- }
- function hotkeylist() {
- menucolorchanged = UI.GetValue(["Config", "Keybinds", "Keybinds", "Opacity"]);
- menucolor = [51, 51, 51, menucolorchanged]
- var font = Render.GetFont("Verdana.ttf", 11, true);
- Render.FilledRect(x + 3, y - 3, width - 6, 1, menucolor)
- Render.FilledRect(x + 2, y - 2, width - 4, 1, menucolor)
- Render.FilledRect(x + 1, y - 1, width - 2, 1, menucolor)
- Render.FilledRect(x, y, width, height, menucolor)
- Render.FilledRect(x + 10, y + 20, width - 20, 1, [255, 20, 20, 255])
- Render.String(x + 100, y + 2, 1, "K E Y B I N D S", [200, 88, 59, 255], font)
- var keyText = []
- var hotkeyText = []
- var enabledText = []
- if (UI.GetValue(HOTKEY_resolveroverride)) {
- hotkeyText.push("Resolver ")
- enabledText.push(states(HOTKEY_resolveroverride))
- keyText.push(keys(HOTKEY_resolveroverride))
- }
- if (UI.GetValue(HOTKEY_forcebodyaim)) {
- hotkeyText.push("Body aim ")
- enabledText.push(states(HOTKEY_forcebodyaim))
- keyText.push(keys(HOTKEY_forcebodyaim))
- }
- if (UI.GetValue(HOTKEY_forcesafepoint)) {
- hotkeyText.push("Safe point ")
- enabledText.push(states(HOTKEY_forcesafepoint))
- keyText.push(keys(HOTKEY_forcesafepoint))
- }
- if (UI.GetValue(HOTKEY_doubletap)) {
- hotkeyText.push("Doubletap ")
- enabledText.push(states(HOTKEY_doubletap))
- keyText.push(keys(HOTKEY_doubletap))
- }
- if (UI.GetValue(HOTKEY_hideshots)) {
- hotkeyText.push("Hideshots ")
- enabledText.push(states(HOTKEY_hideshots))
- keyText.push(keys(HOTKEY_hideshots))
- }
- if (UI.GetValue(HOTKEY_aainverter)) {
- hotkeyText.push("Inverter ")
- enabledText.push(states(HOTKEY_aainverter))
- keyText.push(keys(HOTKEY_aainverter))
- }
- if (UI.GetValue(HOTKEY_slowwalk)) {
- hotkeyText.push("Slowwalk ")
- enabledText.push(states(HOTKEY_slowwalk))
- keyText.push(keys(HOTKEY_slowwalk))
- }
- if (UI.GetValue(HOTKEY_fakeduck)) {
- hotkeyText.push("Fakeduck ")
- enabledText.push(states(HOTKEY_fakeduck))
- keyText.push(keys(HOTKEY_fakeduck))
- }
- if (UI.GetValue(HOTKEY_edgejump)) {
- hotkeyText.push("Edgejump ")
- enabledText.push(states(HOTKEY_edgejump))
- keyText.push(keys(HOTKEY_edgejump))
- }
- if (UI.GetValue(HOTKEY_autopeek)) {
- hotkeyText.push("Autopeek ")
- enabledText.push(states(HOTKEY_autopeek))
- keyText.push(keys(HOTKEY_autopeek))
- }
- if (UI.GetValue(HOTKEY_thirdperson)) {
- hotkeyText.push("Thirdperson ")
- enabledText.push(states(HOTKEY_thirdperson))
- keyText.push(keys(HOTKEY_thirdperson))
- }
- if (UI.GetValue(HOTKEY_zoom)) {
- hotkeyText.push("Zoom ")
- enabledText.push(states(HOTKEY_zoom))
- keyText.push(keys(HOTKEY_zoom))
- }
- if (UI.GetValue(HOTKEY_freecam)) {
- hotkeyText.push("Freecam ")
- enabledText.push(states(HOTKEY_freecam))
- keyText.push(keys(HOTKEY_freecam))
- }
- for (i = 0; i < hotkeyText.length; i++) {
- if (enabledText[i] == "Always") {
- needDiff = 51
- renderKeyText = "[-]";
- }
- else if (enabledText[i] == "Hold") {
- needDiff = 36
- renderKeyText = "[" + getHotkey2keyName[keyText[i]].toString() + "]";
- }
- else if (enabledText[i] == "Toggle") {
- needDiff = 49
- renderKeyText = "[" + getHotkey2keyName[keyText[i]].toString() + "]";
- }
- Render.FilledRect(x, y + height + 16 * i, width, 16, menucolor)
- RenderText(x + 105, y + height + 16 * i, 1, hotkeyText[i], [255, 255, 255, 255], font)
- RenderText(x + width - needDiff, y + height + 16 * i, 0, enabledText[i], [0, 0, 0, 255], font)
- RenderText(x + 7, y + height + 16 * i, 0, renderKeyText, [255, 255, 255, 255], font)
- if (i + 1 == hotkeyText.length) { // DO LATER PLS IM TIRED ASF
- Render.FilledRect(x + 1, y + height + 16 * i + 16, width - 2, 1, menucolor)
- Render.FilledRect(x + 2, y + height + 16 * i + 16 + 1, width - 4, 1, menucolor)
- Render.FilledRect(x + 3, y + height + 16 * i + 16 + 2, width - 6, 1, menucolor)
- dragMenu(i);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement