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 › Steam Games Hacks & Cheats › Garry's Mod Hacks & Cheats › Garry's Mod Discussions & Help › NoRecoil Lua Help?

NoRecoil Lua Help?

Posts 1–15 of 18 · Page 1 of 2
UnrealSkybox
UnrealSkybox
NoRecoil Lua Help?
if GD.bools["norecoil"] then
if wep.Recoil != 0 then
wep.OldRecoil = wep.Recoil
wep.Recoil = 0
end
if wep.Primary.Recoil != 0 then
wep.Primary.OldRecoil = wep.Primary.Recoil
wep.Primary.Recoil = 0
end
if wep.Secondary.Recoil != 0 then
wep.Secondary.OldRecoil = wep.Secondary.Recoil
wep.Secondary.Recoil = 0
end

if wep.Spread != 0.1 then
wep.OldSpread = wep.Spread
wep.Spread = 0.1
end
if wep.Primary.Spread != 0.1 then
wep.Primary.OldSpread = wep.Primary.Spread
wep.Primary.Spread = 0.1
end
if wep.Primary.Spread != 0.1 then
wep.Secondary.OldSpread = wep.Secondary.Spread
wep.Primary.Spread = 0.1
end

if wep.Cone != 0 then
wep.OldCone = wep.Cone
wep.Cone = 0
end
if wep.Primary.Cone != 0 then
wep.Primary.OldCone = wep.Primary.Cone
wep.Primary.Cone = 0
end
if wep.Secondary.Cone != 0 then
wep.Secondary.OldCone = wep.Secondary.Cone
wep.Secondary.Cone = 0
end
else
wep.OldRecoil = wep.OldRecoil or wep.Recoil
wep.Recoil = wep.OldRecoil
wep.Primary.OldRecoil = wep.Primary.OldRecoil or wep.Primary.Recoil
wep.Primary.Recoil = wep.Primary.OldRecoil
wep.Secondary.OldRecoil = wep.Secondary.OldRecoil or wep.Secondary.Recoil
wep.Secondary.Recoil = wep.Secondary.OldRecoil

wep.OldSpread = wep.OldSpread or wep.Spread
wep.Spread = wep.OldSpread
wep.Primary.OldSpread = wep.Primary.OldSpread or wep.Primary.Spread
wep.Primary.Spread = wep.Primary.OldSpread
wep.Secondary.OldSpread = wep.Secondary.OldSpread or wep.Secondary.Spread
wep.Secondary.Spread = wep.Secondary.OldSpread

wep.OldCone = wep.OldCone or wep.Cone
wep.Cone = wep.OldCone
wep.Primary.OldCone = wep.Primary.OldCone or wep.Primary.Cone
wep.Primary.Cone = wep.Primary.OldCone
wep.Secondary.OldCone = wep.Secondary.OldCone or wep.Secondary.Cone
wep.Secondary.Cone = wep.Secondary.OldCone
end
end



This is the code! I need help to fix so I can just lua_openscript_cl norecoil.lua but I keep getting lua errors I don't know how to fix it anyone know how please put it in a pastebin or replay thanks . I got this from the leaked gdaap it's a really good but it's really shitty. I just want the norecoil to work just as a simple script whenever I shoot.
#1 · edited 12y ago · 12y ago
TH
TheMikuChibi
Quote Originally Posted by UnrealSkybox View Post
leaked gdaap it's a really good but it's really shitty.
So it's good and shitty ?

Code:
hook.Add("Think","C+P NoRecoil from gayDaap",function()

if wep.Recoil != 0 then
wep.OldRecoil = wep.Recoil
wep.Recoil = 0
end
if wep.Primary.Recoil != 0 then
wep.Primary.OldRecoil = wep.Primary.Recoil
wep.Primary.Recoil = 0
end
if wep.Secondary.Recoil != 0 then
wep.Secondary.OldRecoil = wep.Secondary.Recoil
wep.Secondary.Recoil = 0
end

end)
#2 · edited 12y ago · 12y ago
UnrealSkybox
UnrealSkybox
The hack gdaap the original is really bad I get 150 fps all the way to 30 fps :/ other hacks I just go down by tell It hits 100 fps. But the norecoil is good it works like on every gun. I use this on deathlegends. The leak is better cause the norecoil works. The original thingy where you have to download and signup thingy with the hwid shit it's really bad the no recoil won't work. I just want this to work as a cvar or just I open the lua script. I need help with this. I don't know much I did a lot stuff to get it to work but didn't do anything. Sorry for English not really good in English.




TEST [lua/lenny.lua][lua/norecoil.lua]

[ERROR] lua/norecoil.lua:3: attempt to index global 'wep' (a nil value)
1. v - lua/norecoil.lua:3
2. unknown - lua/includes/modules/hook.lua:82

is it the lenny? Or just not working properly?
#3 · edited 12y ago · 12y ago
Trollaux
Trollaux
Code:
local function norecoil()
        if LocalPlayer():GetActiveWeapon():Clip1() > 0  then
                if LocalPlayer():GetActiveWeapon().Recoil then
                        LocalPlayer():GetActiveWeapon().Recoil = 0
                end
                if LocalPlayer():GetActiveWeapon().Primary.Recoil then
                        LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
                end
        end
end
hook.Add("PlayerSwitchWeapon", "norecoil", norecoil)
local function nospread()
        if LocalPlayer():GetActiveWeapon():Clip1() > 0 then
                if LocalPlayer():GetActiveWeapon().Cone then
                        LocalPlayer():GetActiveWeapon().Cone = 0
                end
                if LocalPlayer():GetActiveWeapon().Primary.Cone then
                        LocalPlayer():GetActiveWeapon().Primary.Cone = 0
                end
        end
end
hook.Add("PlayerSwitchWeapon", "nospread", nospread)
enjoy
#4 · 12y ago
BigBadWilly
BigBadWilly
Tried with CS Weapons,Darkrp Weapons,M9k it no work.
#5 · 12y ago
TH
TheMikuChibi
@Trollaux You can't make a NoSpread using Lua. Also your norecoil only affects Primary Weapons and not Secondary ones.

Fixed Code:

Code:
hook.Add("Think","C+P NoRecoil from gayDaap",function()

local wep = LocalPlayer():GetActiveWeapon()

if wep.Recoil != 0 then
wep.OldRecoil = wep.Recoil
wep.Recoil = 0
end
if wep.Primary.Recoil != 0 then
wep.Primary.OldRecoil = wep.Primary.Recoil
wep.Primary.Recoil = 0
end
if wep.Secondary.Recoil != 0 then
wep.Secondary.OldRecoil = wep.Secondary.Recoil
wep.Secondary.Recoil = 0
end

end)
#6 · edited 12y ago · 12y ago
Xenocide
Gray
Miku, seriously.
There is no need what so ever to call people stupid.
People will always have different knowledge about different things, that's life.

Get over it.
#7 · 12y ago
Trollaux
Trollaux
Quote Originally Posted by TheMikuChibi View Post
@Trollaux You can't make a NoSpread using Lua. Also your norecoil only affects Primary Weapons and not Secondary ones.

Fixed Code:

Code:
hook.Add("Think","C+P NoRecoil from gayDaap",function()

local wep = LocalPlayer():GetActiveWeapon()

if wep.Recoil != 0 then
wep.OldRecoil = wep.Recoil
wep.Recoil = 0
end
if wep.Primary.Recoil != 0 then
wep.Primary.OldRecoil = wep.Primary.Recoil
wep.Primary.Recoil = 0
end
if wep.Secondary.Recoil != 0 then
wep.Secondary.OldRecoil = wep.Secondary.Recoil
wep.Secondary.Recoil = 0
end

end)
I copypaserino'd from some guy and forgot to remove the nospread part.


@
I tried optimizing your code for my own purposes of learning lua and trying to get as less errors as possible
Code:
local function norecoil()
	local wep = LocalPlayer():GetActiveWeapon()
	if wep.Recoil != 0 then
		wep.Recoil = 0
	end
	if wep.Primary != nil then
		if wep.Primary.Recoil != 0 then
			wep.Primary.Recoil = 0
		end
	end
	if wep.Secondary != nil then
		if wep.Secondary.Recoil != 0 then
			wep.Secondary.Recoil = 0
		end
	end
end
hook.Add("PlayerSwitchWeapon", "norecoil", norecoil)
Also, should the hook be in PlayerSwitchWeapon or Think?
#8 · edited 12y ago · 12y ago
UnrealSkybox
UnrealSkybox
How come I turn on gdaap the leaked with norecoil it works on deathlegends 100% then I use these it don't work. I'm going to use gdaap for now I guess. It works really good. These lua don't give me lua errors but don't work at all.
#9 · 12y ago
MeepDarknessMeep
MeepDarknessMeep
You all know nothing about lua, please learn instead of copy and pasting.
#10 · 12y ago
UnrealSkybox
UnrealSkybox
.................................................. ..................... Well I guess anyone know how to get the nospread to work?
#11 · 12y ago
Zombeezz
Zombeezz
Quote Originally Posted by UnrealSkybox View Post
.................................................. ..................... Well I guess anyone know how to get the nospread to work?
NoSpread doesn't work in lua so you need to make it in c++
#12 · 12y ago
TH
TheMikuChibi
Quote Originally Posted by Zombeezz View Post
NoSpread doesn't work in lua so you need to make it in c++
^this
NoSpreadens = C++
#13 · 12y ago
UnrealSkybox
UnrealSkybox
Can anyone make nospread with +cc with link for me? I don't know much of C++
#14 · 12y ago
Kellyseveride
Kellyseveride
Quote Originally Posted by UnrealSkybox View Post
Can anyone make nospread with +cc with link for me? I don't know much of C++
I think your best bet would be to start reading up on some c++ resources.
#15 · 12y ago
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

  • NoRecoilBy Nerolol in CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    2Last post 15y ago
  • Can someone add NoRecoil for my DLL?By bepokemon in CrossFire Hack Coding / Programming / Source Code
    3Last post 15y ago
  • Can someone add NoRecoil for my DLL?By bepokemon in CrossFire Help
    4Last post 15y ago
  • NoRecoilBy Genesis2 in CrossFire Hack Coding / Programming / Source Code
    5Last post 14y ago

Tags for this Thread

None