--!native -- depso const BlankCFunc = newcclosure(function() return end) const function HookInitFromDef(Function) local Previous; Previous = hookfunction(Function, newcclosure(function(p2, ...) Previous(p2, ...) --p2.FireRate = 0 p2.RecoilRecovery = 0 p2.SpreadAngle = 0 p2.FireMode = "auto" p2.MagAmmo = 69420 p2.RecoilSpring.s = 0 end)) end const function HookWeaponHandler(Handler) hookfunction(rawget(Handler, "ApplyRecoil"), BlankCFunc) hookfunction(rawget(Handler, "_FireScriptedRecoil"), BlankCFunc) hookfunction(rawget(Handler, "_FireAdsShoulderImpact"), BlankCFunc) hookfunction(rawget(Handler, "_ApplyFireDriftImpulse"), BlankCFunc) end const function HookCameraRecoil(Function) if debug.info(Function, "s"):find("CameraController") then hookfunction(Function, BlankCFunc) end end for _, Thing in next, getgc(true) do if typeof(Thing) ~= "table" then continue end --// Weapon handler if rawget(Thing, "ApplyRecoil") then HookWeaponHandler(Thing) --// Camera handler elseif rawget(Thing, "Recoil") and rawget(Thing, "WeaponSwayPhase") then HookCameraRecoil(rawget(Thing, "Recoil")) --// Gun Init elseif rawget(Thing, "InitFromDef") then HookInitFromDef(rawget(Thing, "InitFromDef")) end end