---BASE
local rapidfire = false
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
ReleaseMouseButton(2)
end
---RAPID FIRE ACTIVE
if (event == "MOUSE_BUTTON_PRESSED" and arg == 7) then
rapidfire = not rapidfire
end
---RAPIDFIRE ACTION
if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and rapidfire then
if rapidfire then
repeat
PressKey("k")
Sleep(40)
ReleaseKey("k")
Sleep(40)
until not IsMouseButtonPressed(1)
end
end
end