SixMacroShop

← All guides

Install a Lua script macro in Logitech G HUB

This guide installs the no recoil Lua script for Apex Legends on a Logitech G series mouse.

You need
Logitech G HUB, a Logitech G series mouse, and the .lua script file.
Time
About 5 minutes.

Get the script in the SixMacro store. Need custom sensitivity? Use the sensitivity tool.

Steps

Set up the script

Follow the steps in order. Every screenshot is from the video tutorial.

  1. Turn off Onboard Memory Mode

    Open Logitech G HUB and make sure your mouse appears on the home screen. On the mouse card, click the onboard memory icon so Onboard Memory Mode is off.

    Do not skip this. Lua scripts only run while G HUB controls the mouse. With Onboard Memory Mode on, the script does nothing.

    The onboard memory icon on the mouse card.
  2. Open Manage Profiles

    Click the profile dropdown at the top of G HUB (it shows Desktop: Default) and choose MANAGE PROFILES.

    Manage Profiles, at the bottom of the profile list.
  3. Add Apex Legends

    In All Games & Apps, look for Apex Legends. If it is already there, go to the next step.

    Apex Legends in All Games & Apps.

    If it is missing, click ADD GAMES & APPS, tick Apex Legends and click ADD. If the game is not in the list, use BROWSE to pick it from your game folder.

    The Add Games & Apps window.
  4. Create a Lua script

    Click Apex Legends to open it. On the Default profile, click the three-dot menu ⋮ and choose Create LUA Script.

    Create LUA Script, in the profile menu.

    In the scripting window, click CREATE A NEW LUA SCRIPT.

    The button at the bottom of the scripting window.
  5. Import the script file

    The editor opens with a few lines of sample code. Open the Script menu and choose Import.

    Script menu, Import.

    Select the script file (in my case no recoil.lua) and click Open. The sample code is replaced by the script.

    Choosing the .lua file.
  6. Adjust the settings

    The settings are at the top of the script. Change only the values after the = sign.

    The settings section of the imported script.
    SettingDefaultWhat it does
    Main_Sensitivity1.00Macro strength for ARs and SMGs. Match it to your in-game sensitivity.
    Circle_Sensitivity0.178Strength of the circle jitter add-on.
    AR_Button4Mouse button for the AR macro.
    SMG_Button5Mouse button for the SMG macro.
    CircleJitter_ButtonnilMouse button for circle jitter. nil means not used.
    AR_Keyboard, SMG_Keyboard, CircleJitter_KeyboardnilOptional keyboard keys for the same modes.
    REQUIRE_ADSfalsefalse: the macro runs as soon as you left click. true: it only runs while you aim down sights (holding right click).

    Button numbers: in G HUB, open your mouse and go to Assignments, SYSTEM. Each mouse button shows its G number. On a G304, Back is G4 and Forward is G5, so the defaults use the two side buttons.

    Button numbers in Assignments, SYSTEM.

    Do not edit anything below the line that says Don't touch this!

  7. Save and run

    Open the Script menu and choose Save & Run. The console at the bottom of the editor shows LOADED when the script is running.

    LOADED in the script console.

    Note: save again every time you change a setting, otherwise the old values keep running.

  8. Test it in-game

    Launch Apex Legends and go to the Firing Range. G HUB switches to the Apex Legends profile automatically.

    1. Press your AR or SMG button to choose the macro for your weapon.
    2. Shoot at a wall or a dummy and watch the recoil.
    3. If the gun still climbs or pulls down too much, adjust Main_Sensitivity, save, and test again.