UI.AddSliderInt("Hotkeys_x", 0, screen_size[0]);
UI.AddSliderInt("Hotkeys_y", 0, screen_size[1]);
UI.SetEnabled("Hotkeys_x", 0)
UI.SetEnabled("Hotkeys_y", 0)
function keybinds() {
if(getDropdownValue(UI.GetValue("Script items", "Windows"), 1) && Entity.IsAlive(lp) || UI.IsMenuOpen() && getDropdownValue(UI.GetValue("Script items", "Windows"), 1)){
const x = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Hotkeys_x"), y = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Hotkeys_y");
var font = Render.AddFont("Verdana", 7, 400);
var frames = 6 * Globals.Frametime();
var width = 140;
var cur_dmg = UI.GetValue("Script items", "Damage Override");
col = UI.GetColor("Script items", "Accent Color")
color = [col[0], col[1], col[2], alpha * 255]
col0 = [col[0], col[1], col[2], alpha * 0]
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk")) {
swalpha = Math.min(swalpha + frames, 1);
} else {
swalpha = swalpha - frames;
if (swalpha < 0) swalpha = 0;
if (swalpha == 0) {
h.splice(h.indexOf("Slow walk"));
}
}
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) {
fdalpha = Math.min(fdalpha + frames, 1);
} else {
fdalpha = fdalpha - frames;
if (fdalpha < 0) fdalpha = 0;
if (fdalpha == 0) {
h.splice(h.indexOf("Fake duck"));
}
}
if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek")) {
apalpha = Math.min(apalpha + frames, 1);
} else {
apalpha = apalpha - frames;
if (apalpha < 0) apalpha = 0;
if (apalpha == 0) {
h.splice(h.indexOf("Auto peek"));
}
}
if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force safe point")) {
spalpha = Math.min(spalpha + frames, 1);
} else {
spalpha = spalpha - frames;
if (spalpha < 0) spalpha = 0;
if (spalpha == 0) {
h.splice(h.indexOf("Safe points"));
}
}
if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim")) {
fbalpha = Math.min(fbalpha + frames, 1);
} else {
fbalpha = fbalpha - frames;
if (fbalpha < 0) fbalpha = 0;
if (fbalpha == 0) {
h.splice(h.indexOf("Body aim"));
}
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Doubletap")) {
dtalpha = Math.min(dtalpha + frames, 1);
} else {
dtalpha = dtalpha - frames;
if (dtalpha < 0) dtalpha = 0;
if (dtalpha == 0) {
h.splice(h.indexOf("Double tap"));
}
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) {
hsalpha = Math.min(hsalpha + frames, 1);
} else {
hsalpha = hsalpha - frames;
if (hsalpha < 0) hsalpha = 0;
if (hsalpha == 0) {
h.splice(h.indexOf("Hide shots"));
}
}
if (UI.IsHotkeyActive("Script items", "Damage Override key")) {
dmgalpha = Math.min(dmgalpha + frames, 1);
} else {
dmgalpha = dmgalpha - frames;
if (dmgalpha < 0) dmgalpha = 0;
if (dmgalpha == 0) {
h.splice(h.indexOf("Damage override"));
}
}
if (UI.IsHotkeyActive("Script items", "Dormant Aimbot")) {
daalpha = Math.min(daalpha + frames, 1);
} else {
daalpha = daalpha - frames;
if (daalpha < 0) daalpha = 0;
if (daalpha == 0) {
h.splice(h.indexOf("Dormant aimbot"));
}
}
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk")) {
if (h.indexOf("Slow walk") == -1)
h.push("Slow walk")
}
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) {
if (h.indexOf("Fake duck") == -1)
h.push("Fake duck")
}
if (UI.IsHotkeyActive("Misc", "GENERAL", "Movement", "Auto peek")) {
if (h.indexOf("Auto peek") == -1)
h.push("Auto peek")
}
if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force safe point")) {
if (h.indexOf("Safe point") == -1)
h.push("Safe point")
}
if (UI.IsHotkeyActive("Rage", "GENERAL", "General", "Force body aim")) {
if (h.indexOf("Body aim") == -1)
h.push("Body aim")
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Doubletap")) {
if (h.indexOf("Double tap") == -1)
h.push("Double tap")
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) {
if (h.indexOf("Hide shots") == -1)
h.push("Hide shots")
}
if (UI.IsHotkeyActive("Script items", "Damage Override key")) {
if (h.indexOf("Damage override") == -1)
h.push("Damage override")
}
if (UI.IsHotkeyActive("Script items", "Dormant Aimbot")) {
if (h.indexOf("Dormant aimbot") == -1)
h.push("Dormant aimbot")
}
if (UI.IsMenuOpen()) {
if (h.indexOf("Menu key") == -1)
h.push("Menu key")
}
if (h.length > 0) {
alpha = Math.min(alpha + frames, 1);
} else {
alpha = alpha - frames;
if (alpha < 0) alpha = 0;
}
if (alpha > 0) {
Render.FilledRect(x, y + 6, width, 18, [0, 0, 0, alpha * 75]);
if (UI.GetValue("Script items", "Windows Style") == 0){
Render.FilledRect(x, y + 5, width, 1, color)
}
if (UI.GetValue("Script items", "Windows Style") == 1){
Render.GradientRect( x, y + 5, width / 2, 1, 1, col0, color);
Render.GradientRect( x + width / 2, y + 5, width / 2, 1, 1, color, col0);
}
if (UI.GetValue("Script items", "Windows Style") == 2){
Render.GradientRect(x, y + 5, width / 2, 1, 1, [55, 177, 218, alpha * 255], [203, 70, 205 , alpha * 255]);
Render.GradientRect(x + width / 2, y + 5, width / 2, 1, 1, [203, 70, 205 , alpha * 255], [204, 210, 53, alpha * 255]);
}
Render.StringCustom(x + width / 2 - (Render.TextSizeCustom("keybinds", font)[0] / 2) + 2, y + 9, 0, "keybinds", [0, 0, 0, alpha * 255 / 1.3], font);
Render.StringCustom(x + width / 2 - (Render.TextSizeCustom("keybinds", font)[0] / 2) + 1, y + 8, 0, "keybinds", [255, 255, 255, alpha * 255], font);
for (i = 0; i < h.length; i++) {
switch (h[i]) {
case 'Slow walk':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, swalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, swalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, swalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, swalpha * 255], font);
break;
case 'Fake duck':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fdalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fdalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, fdalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, fdalpha * 255], font);
break;
case 'Auto peek':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, apalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, apalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, apalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, apalpha * 255], font);
break;
case 'Safe point':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, spalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, spalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, spalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, spalpha * 255], font);
break;
case 'Body aim':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, fbalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, fbalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, fbalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, fbalpha * 255], font);
break;
case 'Double tap':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dtalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dtalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, dtalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, dtalpha * 255], font);
break;
case 'Hide shots':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, hsalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, hsalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, hsalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, hsalpha * 255], font);
break;
case 'Hide shots':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dmgalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dmgalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, dmgalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, dmgalpha * 255], font);
break;
case 'Damage override':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, dmgalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, dmgalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[" + cur_dmg + "]", font)[0], y + 26 + 18 * i, 0, "[" + cur_dmg + "]", [0, 0, 0, dmgalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[" + cur_dmg + "]", font)[0], y + 26 + 18 * i, 0, "[" + cur_dmg + "]", [255, 255, 255, dmgalpha * 255], font);
break;
case 'Dormant aimbot':
Render.StringCustom(x + 3, y + 26 + 18 * i, 0, h[i], [0, 0, 0, daalpha * 255 / 1.3], font);
Render.StringCustom(x + 2, y + 26 + 18 * i, 0, h[i], [255, 255, 255, daalpha * 255], font);
Render.StringCustom(x - 3 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [0, 0, 0, daalpha * 255 / 1.3], font);
Render.StringCustom(x - 2 + width - Render.TextSizeCustom("[on]", font)[0], y + 26 + 18 * i, 0, "[on]", [255, 255, 255, daalpha * 255], font);
break;
}
}
}
if (Global.IsKeyPressed(1) && UI.IsMenuOpen()) {
const mouse_pos = Global.GetCursorPosition();
if (in_bounds(mouse_pos, x, y, x + width, y + 30)) {
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Hotkeys_x", mouse_pos[0] - width / 2);
UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Hotkeys_y", mouse_pos[1] - 20);
}
}
}
}