-
Автор темы
- #1
Шапка
JavaScript:
function clamp(v, min_int, max_int){
return Math.max(Math.min(v, max_int), min_int);
}
UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "keybinds_x", false);
UI.SetEnabled("Misc", "JAVASCRIPT", "Script items", "keybinds_y", false);
var kb_x = UI.GetValue("Script items", "keybinds_x");
var kb_y = UI.GetValue("Script items", "keybinds_y");
function kb()
{
var windowkb = UI.GetValue("Script items", "Window")
var windowkbtype = (windowkb & (1 << 0))
if(windowkbtype)
{
UI.SetValue("Misc", "PERFOMANCE & INFORMATION", "Information", "Show keybind states", 0)
var mindmgkey = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Minimum Damage Override")
var ping_csgooo = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
var maincolor1 = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Main Color")
var h = [];
const fontpixel = Render.AddFont( "Arial", 8, 100);
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Slow walk")) {
h.push("Slow Walk")
}
if (UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck")) {
h.push("Fake Duck")
}
if (UI.IsHotkeyActive("Misc", "General", "Movement", "Auto peek")) {
h.push("Auto Peek")
}
if (UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")) {
h.push("Anti-Aim invert")
}
if (UI.IsHotkeyActive("Rage", "General", "General", "Force safe point")) {
h.push("Safe Point")
}
if (UI.IsHotkeyActive("Rage", "General", "General", "Force body aim")) {
h.push("Body Aim")
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Double tap")) {
h.push("Double Tap")
}
if (UI.IsHotkeyActive("Rage", "Exploits", "Hide shots")) {
h.push("Hide shots")
}
if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Damage Override")) {
h.push("Min DMG " + "[" + mindmgkey + "]")
}
if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Freestand on Key")) {
h.push("Freestand")
}
if (UI.GetValue("Script items", "Ping - Spike") && UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Ping - Spike on Key")) {
h.push("Ping - Spike " + "[" + ping_csgooo + "]")
}
if (UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "At - Targets on Key")) {
h.push("Yaw Base")
}
if (UI.GetValue("Script items", "Dormant Aimbot") && UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script items", "Dormant Aimbot on Key")) {
h.push("Dormant Aimbot")
}
const rainbow = [
Math.floor(Math.sin(Global.Realtime() * 2) * 127 + 128),
Math.floor(Math.sin(Global.Realtime() * 2 + 2) * 127 + 128),
Math.floor(Math.sin(Global.Realtime() * 2 + 4) * 127 + 128),
255
];
Render.FilledRect(kb_x, kb_y, 170, 20, [15, 15, 15, 200]);
Render.StringCustom(kb_x + 60, kb_y + 4, 0, "Key Binds", [255, 255, 255, 255], fontpixel);
Render.FilledRect(kb_x, kb_y, 170, 2, [maincolor1[0], maincolor1[1], maincolor1[2], 255]);
Render.FilledRect(kb_x, kb_y + 20, 170, 20 + 15 * (h.length - 1), [15, 15, 15, 20]);
for (i = 0; i < h.length; i++)
{
Render.StringCustom(kb_x + 5, kb_y + 23 + 15 * i, 0, h[i], [255, 255, 255, 255], fontpixel);
Render.StringCustom(kb_x + 123, kb_y + 23 + 15 * i, 0, "[toggled]", [255, 255, 255, 255], fontpixel);
}
}
}
function movekb() {
if(!UI.IsMenuOpen()) return;
cursor_pos = Input.GetCursorPosition();
if(!Input.IsKeyPressed(0x01)){
kb_is_moving = false;
kb_old_cursor = cursor_pos;
}
if((cursor_pos[0] >= kb_x && cursor_pos[0] <= kb_x + 170 && cursor_pos[1] >= kb_y && cursor_pos[1] <= kb_y + 18) || (kb_is_moving)){
kb_is_moving = true;
kb_x = clamp(cursor_pos[0] - kb_old_cursor[0] + kb_x, 0, Render.GetScreenSize()[0] - 170);
kb_y = clamp(cursor_pos[1] - kb_old_cursor[1] + kb_y, 0, Render.GetScreenSize()[1] - 18);
kb_old_cursor = cursor_pos;
UI.SetValue("Script items", "keybinds_x", kb_x);
UI.SetValue("Script items", "keybinds_y", kb_y);
}
}
Cheat.RegisterCallback("Draw", "kb");
Cheat.RegisterCallback("Draw", "movekb");