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) -- to prevent it from being stuck on end if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then recoilx4 = not recoilx4 spot = not spot end if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoilx4) then if recoilx4 then repeat MoveMouseRelative(0, 2) Sleep(10) MoveMouseRelative(-1,6) Sleep(17) MoveMouseRelative(1,-6) Sleep(17) MoveMouseRelative(1, 2) Sleep(15) until not IsMouseButtonPressed(1) end end end