local check = ui.new_checkbox("LUA", "A", "DT MODE")
local hotkey = ui.new_hotkey("LUA", "A", "DT MODE SWITCH KEY", true)
local dt_mode = ui.reference("RAGE", "Other", "Double tap mode")
local state = false
local function on_paint()
state = ui.get(hotkey)
if state then
renderer.indicator(207, 206, 204, 255, "OFFENSIVE")
end
end
local last_state = false
local function on_setup_command(c)
if ui.get(hotkey) then
ui.set(dt_mode, "Offensive")
else
ui.set(dt_mode, "Defensive")
last_state = state
end
end
ui.set_callback(check, function(c)
if ui.get(c) then
client.set_event_callback("paint", on_paint)
client.set_event_callback("setup_command", on_setup_command)
else
client.unset_event_callback("paint", on_paint)
client.unset_event_callback("setup_command", on_setup_command)
end
end)