local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local localPlayer = Players.LocalPlayer local isModified = true local function getActiveActors() local actors = {} local function searchContainer(container) if not container then return end for _, obj in ipairs(container:GetDescendants()) do if obj:IsA("Actor") and obj:FindFirstChild("weap_cl", true) then table.insert(actors, obj) end end end if localPlayer.Character then searchContainer(localPlayer.Character) end searchContainer(localPlayer:FindFirstChild("Backpack")) if #actors == 0 then if getactors then for _, actor in ipairs(getactors()) do if actor:FindFirstChild("weap_cl", true) then table.insert(actors, actor) end end else searchContainer(workspace) end end return actors end local function runInjection() local recoilScale = isModified and 0 or 1 local disableAnims = isModified local scriptCode = string.format([[ local RECOIL_SCALE = %f local DISABLE_ANIMS = %s local ReplicatedStorage = game:GetService("ReplicatedStorage") local success, sharedLib = pcall(function() return require(ReplicatedStorage.gun_res.lib.shared) end) if success and sharedLib and sharedLib.getStat then if not _G._oldGetStat then _G._oldGetStat = sharedLib.getStat sharedLib.getStat = function(p1, p2, ...) local result = _G._oldGetStat(p1, p2, ...) if p2 == "mult" or p2 == "recoilMult" then if type(result) == "number" then return result * _G._RECOIL_SCALE end end if _G._DISABLE_ANIMS and (p2 == "fire" or p2 == "adsFire" or p2 == "Stockedfire") then return "" end return result end end _G._RECOIL_SCALE = RECOIL_SCALE _G._DISABLE_ANIMS = DISABLE_ANIMS print("[Actor VM] Updated! Recoil Scale: " .. tostring(RECOIL_SCALE) .. " | Disable Fire Anims: " .. tostring(DISABLE_ANIMS)) end ]], recoilScale, tostring(disableAnims)) local actors = getActiveActors() local injectedCount = 0 for _, actor in ipairs(actors) do if actor and actor.Parent then pcall(function() runonactor(actor, scriptCode) injectedCount = injectedCount + 1 end) end end if injectedCount > 0 then print(string.format("[Injector] Successfully updated %d weapon Actor(s) | State -> Recoil: %s, Anims Disabled: %s", injectedCount, tostring(recoilScale), tostring(disableAnims))) else warn("[Injector] No active weapon Actors found. Equip a weapon first.") end end runInjection() UserInputService.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.KeyCode == Enum.KeyCode.B then -- Toggle the state isModified = not isModified print(string.format("\n[Keybind] 'B' pressed, Toggling weapon state to: [Recoil Enabled: %s]", tostring(not isModified))) runInjection() end end) localPlayer.CharacterAdded:Connect(function(char) task.wait(1) runInjection() end)