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.
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. 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. 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. 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. 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. 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. Setting Default What it does Main_Sensitivity 1.00 Macro strength for ARs and SMGs. Match it to your in-game sensitivity. Circle_Sensitivity 0.178 Strength of the circle jitter add-on. AR_Button 4 Mouse button for the AR macro. SMG_Button 5 Mouse button for the SMG macro. CircleJitter_Button nil Mouse button for circle jitter. nil means not used. AR_Keyboard, SMG_Keyboard, CircleJitter_Keyboard nil Optional keyboard keys for the same modes. REQUIRE_ADS false false: 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!
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.
Test it in-game
Launch Apex Legends and go to the Firing Range. G HUB switches to the Apex Legends profile automatically.
- Press your AR or SMG button to choose the macro for your weapon.
- Shoot at a wall or a dummy and watch the recoil.
- If the gun still climbs or pulls down too much, adjust Main_Sensitivity, save, and test again.