Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 16 - Modern Warfare › Logitech Recoil (Mouse&Keyboard) Script - Humanized with randomization for ALL GUNS

CoolLogitech Recoil (Mouse&Keyboard) Script - Humanized with randomization for ALL GUNS

Posts 16–30 of 60 · Page 2 of 4
SP
spam4goldeneagles
How to account for horizontal recoil?
Hey Sbuj, I have poked around the internals of this and it is working really nicely so far. Editing the recoil_table for each weapon is fairly intuitive.

Now the question is, how can I customize the horizontal recoil? I THINK the function MoveMouseRelative(0, recovery / 10) part is where it feeds in the mouse movements in X and Y planes. Now, the Y value reads off recovery / 10, but the X value (horizontal recoil) currently stays set at 0. Is it possible for you to add an input from another set of recoil tables to feed into the horizontal movement value, so that we can tinker with the horizontal recoil?

Cant wait to tinker with this more.
#16 · 6y ago
K4
k4t5u
aa
Quote Originally Posted by sbuj View Post
Modern Warfare NoRecoil Script
Logitech GHUB


Features:
Randomized variables
Human Recoil compensation
No recoil
Universal DPI


Instructions:

1. Install GHUB, if it is not already installed (only for GHUB and Gkey enabled mice)

2. Download the Lua file

3. Click on the top and go on the profiles area

4.Create or hover over a profile and click the little scripting button


5. Go on edit script or OPTIONAL: Edit on emeditor or notepad++

6. Import script via files


7. go where the keybinds for the mouse/keyboard are


8. Change the binds according to your Gkeys: example (local Kilo141_key = 5 > for G5 Key)
Check under system if you are unsure if you have gkeys

9. Set the profile as persistent

10. IMPORTANT! EXPORT THE LUA OUT TO ANOTHER PART OF YOUR PC
I.e windows D: or C: drive somewhere out of your desktop make sure u empty out the script that is in the script editor!

11. Edit the script again and type this :
data = dofile[[D:\Luaname.lua]] Change D: with whatever and luaname as the name you have it on, if it doesnt work on launch and u dont see ur mouse going down just put the actual location of the script


12. FOR OPTIMAL PERFORMANCE SET SETTINGS TO:

8.I
Mouse sens: 8.00
Vertical Sensitivity Multipliers : 1.00


IF YOU WANT TO RUN WITHOUT ATTACHMENTS DO SCROLL LOCK OFF
TO SCOPE, do NUM LOCK + SCROLL LOCK ON

 
best attachments for every gun

Attachments for each weapon
Kilo
Muzzle: Compensator
Barrel: Singuad Arms 19.8" Prowler
Underbarrel: Operator Foregrip
Rear Grip: Rubberized Grip Tape
M4A1:
Muzzle: Compensator
Barrel: stock m16 grenadier
Underbarrel: operator foregrip
Stock: m16 stock
AK-47:
Muzzle: Compensator
Barrel: 23.0" RPK Barrel
Underbarrel: Ranger Foregrip
Stock: Field LMG Stock
ODEN:
Muzzle: Compensator
Barrel: Oden Factory 810mm
UnderBarrel: Operator Foregrip
Stock: Forge TAC Ballast Pack
M13:
Muzzle: Compensator
Barrel: Tempus Marksman
Underbarrel: Operator Foregrip
Stock: Forge TAC Stalker
SCAR17:
Muzzle: Compensator
Barrel: Forge TAC 20.0" LB
Underbarrel: Merc Foregrip
Stock: XRK Obelisk Pro
AUG:
Muzzle: Compensator
Barrel: 622mm Long Barrel
Underbarrel: Operator Foregrip
Rear Grip: Rubberized Grip Tape
PKM:
Muzzle: Compensator
Barrel: 26.9" Extended Barrel
Underbarrel: Snatch Grip
Rear Grip: Granulated Grip Tape
SA87:
Muzzle Compensator
Underbarrel: Ranger Foregrip
Rear Grip: Granulated Grip Tape
Stock: FSS SA87 Heavy Stock Pro
M91:
Muzzle: Compensator
Barrel: M91 Heavy
Underbarrel: Ranger Foregrip
Stock: FORGE TAC Stalker
MG34:
Muzzle: Compensator
Underbarrel: Ranger Foregrip
Rear Grip: Granulated Grip Tape
Stock: Forge TAC Stalker
Holger-26:
Muzzle: Compensator
Underbarrel: Commando Foregrip
Rear Grip: Granulated Grip Tape
Stock: FSS RangerP90:
Muzzle: Compensator
Barrel: FORGE TAC Retribution
Underbarrel: Stippled Grip Tape
Stock: FSS Heavy Stock Pro
MP5:
Muzzle: Compensator
Underbarrel: Tactical Foregrip
Rear Grip: Granulated Grip Tape
Stock: Classic Straight-line Stock
BIZON:
Muzzle: Compensator
Barrel: 8.7 Steel
Rear Grip: Granulated Grip Tape
Laser: Tac Laser
MP7:
Muzzle: Compensator
Barrel: FSS Recon
Underbarrel: Ranger Foregrip
Rear Grip: Granulated Grip Tape
UZI:
Muzzle: Compensator
Barrel: 16.5" Factory Carbine
Underbarrel: Ranger Foregrip
Stock: Standard-issue Wood Stock
Striker 45:
Muzzle: Compensator
Barrel: 400mm Stainless Steel
Underbarrel: Commando Foregrip
Stock: FTAC Precision Fixed Stock
RAM-7:
Muzzle: Compensator
Barrel:: RK Ranger
Underbarrel: Commando Foregrip
Stock: FTAC EE uilibrium
Grau 5.56
Muzzle: Compensator
Barrel: FSS 26.4" Archangel
Underbarrel: Ranger Foregrip
Rear Grip: Cronen Sniper Elite





https://virusscan.jotti.org/en-US/fi...job/ynj2qb8s0y
https://www.virustotal.com/gui/file/...1252/detection

8
8.8
this isnt working , i got a G403 and nothing is happeing on game.i did all you say in ur post :/
#17 · 6y ago
Jov
[MPGH]Jov
Quote Originally Posted by spam4goldeneagles View Post
Hey Sbuj, I have poked around the internals of this and it is working really nicely so far. Editing the recoil_table for each weapon is fairly intuitive.

Now the question is, how can I customize the horizontal recoil? I THINK the function MoveMouseRelative(0, recovery / 10) part is where it feeds in the mouse movements in X and Y planes. Now, the Y value reads off recovery / 10, but the X value (horizontal recoil) currently stays set at 0. Is it possible for you to add an input from another set of recoil tables to feed into the horizontal movement value, so that we can tinker with the horizontal recoil?

Cant wait to tinker with this more.
I will look into it, i will also release another very basic one that works universally on mw thanks for asking @k4t5u
#18 · 6y ago
Fire099
Fire099
Is it possible to activate a gun recoil script with a non-logitech keyboard? Like I have a logitech mouse but I only have three extra mouse keys and I want to be able to activate more in a game.
#19 · 6y ago
JO
jojojojo1976
I dl this script, i pu it in J:\lua\scriptwz.lua
I load G HUB
Modern warfar
modify scipit
activ
inport
i put this line at the 1st line
data = dofile [[j:\lua\scriptwz.lua]]

but after i dont want to know for start the script

I modify the script Keyboard key bind
local m4a1_gkey = 1

Its good ?
#20 · 6y ago
QU
queseyo
I don't know if it's because of my resolution but the recoil compensation for me is really little or maybe it's because I play with low dpi+sens?
#21 · edited 6y ago · 6y ago
VI
vini20073
how can I change the x axis
how can I change the x axis? please
#22 · 6y ago
US
username-51501155
This doesn't work and the instructions are pretty unclear.

"drive somewhere out of your desktop make sure u empty out the script that is in the script editor!"

What? Make sure you empty out what exactly...?

11. Edit the script again and type this :
... Change D: with whatever and luaname as the name you have it on, if it doesnt work on launch and u dont see ur mouse going down just put the actual location of the script

Again, what? This doesn't make sense. Put the actual location of the script..? I followed these instructions as they were and it just doesn't work, period. I use a newer Logitech keyboard with 5 programmable G keys.
#23 · 6y ago
illerthansick
illerthansick
Hi,

Can you do something with corsair keyboard + mouse ?

Thanks
#24 · 6y ago
MO
Mosadas
Quote Originally Posted by username-51501155 View Post
This doesn't work and the instructions are pretty unclear.

"drive somewhere out of your desktop make sure u empty out the script that is in the script editor!"

What? Make sure you empty out what exactly...?

11. Edit the script again and type this :
... Change D: with whatever and luaname as the name you have it on, if it doesnt work on launch and u dont see ur mouse going down just put the actual location of the script

Again, what? This doesn't make sense. Put the actual location of the script..? I followed these instructions as they were and it just doesn't work, period. I use a newer Logitech keyboard with 5 programmable G keys.
:
no, it's actually quite clear, but it still doesn't work for me for some reason.
#25 · 6y ago
SP
Spped42
For the G502 does not work, I found in the topic this one and works very well according to the weapon

Code:
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 == 4) then
            recoilx4 = not recoilx4
            spot = not spot
        end
       if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoilx4) then
            if recoilx4 then
                repeat
    				Sleep(17)
    				MoveMouseRelative(0, 2.5)
    				Sleep(17)
    				MoveMouseRelative(-3, 0)
    				Sleep(17)
    				MoveMouseRelative(2, 0)
    				Sleep(17)
    				MoveMouseRelative(0, 2)
    				Sleep(17)
    				MoveMouseRelative(0, 2.5)
    				Sleep(17)
    				MoveMouseRelative(-3, 0)
    				Sleep(17)
    				MoveMouseRelative(2, 0)
    				Sleep(17)
    				MoveMouseRelative(0, 2)
    				Sleep(17)
    				MoveMouseRelative(0, 2.5)
    				Sleep(17)
    				MoveMouseRelative(-3, 0)
    				Sleep(17)
    				MoveMouseRelative(2, 0)
    				Sleep(17)
    				MoveMouseRelative(0, 2)
                until not IsMouseButtonPressed(1)
            end
        end
    end
#26 · 6y ago
WI
wiku03
One question, why does it only work for me in the first 10-15 rounds approximately? then the recoil is still normal ... how do I modify this?
#27 · 6y ago
FL
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.

1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)

2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now

3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script

4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save

Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.

If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
#28 · 6y ago
PI
piero891
i follow all the steps but it doesnt work for me...
Quote Originally Posted by fleshlightx View Post
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.

1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)

2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now

3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script

4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save

Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.

If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...

- - - Updated - - -

Quote Originally Posted by fleshlightx View Post
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.

1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)

2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now

3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script

4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save

Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.

If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...

- - - Updated - - -

Quote Originally Posted by fleshlightx View Post
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.

1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)

2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now

3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script

4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save

Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.

If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...

- - - Updated - - -

Quote Originally Posted by fleshlightx View Post
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.

1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)

2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now

3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script

4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save

Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.

If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.

it works ! but not run while im in the game... i this it s detected
#29 · 6y ago
SL
slydevil24
works outside the game for me but not in the game. I have dual monitors so i can click inside the game, nothing happens, alt+tab out and go onto the desktop on the other monitor and i can see it drag down my mouse. Any thoughts? followed all directions.
#30 · 6y ago
Posts 16–30 of 60 · Page 2 of 4

Post a Reply

Similar Threads

  • Help me with Logitech gaming mouse script.By asscold1 in Coders Lounge
    0Last post 9y ago
  • Real No-Recoil with configs for Logitech G MouseBy Kriptsz in PLAYERUNKNOWN'S BATTLEGROUNDS (PUBG) Hacks & Cheats
    203Last post 8y ago
  • Is their a liantian logitech recoil script with fkeys? [f1,f2,f3]By AirierObverse in PUBG Discussions & Help
    1Last post 8y ago
  • PS3 Gaming with Mouse and keyboard, MW3,BO2 ectBy laytonanthony in Playstation General Discussion
    1Last post 13y ago

Tags for this Thread

#hacks#modern warfare#recoil