-- -- ToggleScope v1.9.1 -- Last modified: 2022.01.24 -- https://github.com/Ishmaeel/toggle-scope -- KEY_TOGGLE_SCOPE = DIK_keys.DIK_ADD -- KeyPad Plus local mcm_keybinds = ui_mcm and ui_mcm.key_hold function on_game_start() RegisterScriptCallback("on_option_change", on_option_change) on_option_change(mcm_keybinds) end function on_mcm_load() return { id = "toggle_scope", sh = true, gr = { -- LuaFormatter off {id = "title", type = "slide", link = "ui_options_slider_player", text = "ui_mcm_menu_toggle_scope", size = {512, 50}, spacing = 20}, {id = "key_bind_toggle", type = "key_bind", val = 2, def = KEY_TOGGLE_SCOPE} -- LuaFormatter on } } end function on_option_change(mcm) if mcm then KEY_TOGGLE_SCOPE = ui_mcm.get("toggle_scope/key_bind_toggle") or KEY_TOGGLE_SCOPE end end