Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local font = render.create_font("Verdana", 12, 400, true, true, false)
- menu.add_check_box("Enable keybind list")
- menu.add_color_picker("Keybind color")
- menu.add_slider_int("Keybind position X", 0, engine.get_screen_width())
- menu.add_slider_int("Keybind position Y", 0, engine.get_screen_height())
- local get_state, get_mode = menu.get_key_bind_state, menu.get_key_bind_mode
- local types = { "hold", "toggled" }
- local screen_x, screen_y = engine.get_screen_width(),engine.get_screen_height()
- local count = 0
- local function add_bind(name, bind_name, x, y)
- if get_state(bind_name) then
- render.draw_text(font, x + 5, y + 22 + (15 * count), color.new(255, 255, 255), name)
- text_width = render.get_text_width(font, "[" .. types[get_mode(bind_name)+1] .. "]")
- render.draw_text(font, x + 170 - text_width - 5, y + 22 + (15 * count), color.new(255, 255, 255), "[" .. types[get_mode(bind_name)+1] .. "]")
- count = count + 1
- end
- end
- local function on_paint()
- if not menu.get_bool("Enable keybind list") then return end
- if not engine.is_connected() then return end
- local color = menu.get_color("Keybind color")
- local pos_x = menu.get_int("Keybind position X")
- local pos_y = menu.get_int("Keybind position Y")
- render.draw_rect_filled_gradient(pos_x, pos_y, 170, 20, color.new(0, 0, 0, 255), color.new(0, 0, 0, 0), 1)
- render.draw_rect_filled(pos_x, pos_y, 170, 22 + (15 * count) + 3, color.new(0, 0, 0, 120))
- render.draw_text_centered(font, pos_x + 85, pos_y + 12, color.new(255, 255, 255), true, true, "hotkey list")
- render.draw_rect_filled_gradient(pos_x, pos_y, 85, 2, color.new(0, 0, 0, 0), color, 0)
- render.draw_rect_filled_gradient(pos_x + 85, pos_y, 85, 2, color, color.new(0, 0, 0, 0), 0)
- count = 0
- add_bind("> Doubletap", key_binds.double_tap, pos_x, pos_y)
- add_bind("> Hideshots", key_binds.hide_shots, pos_x, pos_y)
- add_bind("> Force body-aim", key_binds.body_aim, pos_x, pos_y)
- add_bind("> Anti-aim inverter", key_binds.flip_desync, pos_x, pos_y)
- add_bind("> Thirdperson", key_binds.thirdperson, pos_x, pos_y)
- add_bind("> Autopeek", key_binds.automatic_peek, pos_x, pos_y)
- add_bind("> Fakeduck", key_binds.fakeduck, pos_x, pos_y)
- add_bind("> Slowwalk", key_binds.slowwalk, pos_x, pos_y)
- add_bind("> Damage override", key_binds.damage_override, pos_x, pos_y)
- end
- client.add_callback("on_paint", on_paint)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement