Back to Scripts
Simple infinite mag

Simple infinite mag

ScriptBlox
Free

Game: AniPhobia

84 Views
1 Likes
0 Dislikes
alexpear

alexpear

offline

Features

Infinite mag (that's it)

Script Code

-- infinite mag pls dont skid
-- set getgenv().InfiniteMag = false before exec if u want it off

getgenv().InfiniteMag = true

local magSize = 100      -- can be 10, 50, 999 or whatever, loop will keep forcing it anyway
local plsWait = 0.1      -- dont touch this, controls how fast mag refreshes

local plrs = game:GetService("Players")
local lp = plrs.LocalPlayer

local function forceMag(gunClient)
    if not gunClient then return end

    local magTbl

    for _,v in pairs(getgc(true)) do
        if typeof(v) == "function" then
            local fenv = getfenv(v)
            if fenv and fenv.script == gunClient then
                local info = debug.getinfo(v)
                if info and info.name == "OnSwitching" then
                    local up = debug.getupvalue(v, 6) -- yes its 6, dont ask
                    if type(up) == "table" and up.Mag ~= nil then
                        magTbl = up
                        break
                    end
                end
            end
        end
    end
    if magTbl then
        task.spawn(function()
            while true do
                task.wait(plsWait)
                if getgenv().InfiniteMag then
                    magTbl.Mag = magSize
                end
            end
        end)
    end
end

local function onChar(char)
    for _,c in ipairs(char:GetChildren()) do
        local gc = c:FindFirstChild("GunClient")
        if gc then
            forceMag(gc)
        end
    end

    char.ChildAdded:Connect(function(c)
        task.wait(0.1) -- roblox moment
        local gc = c:FindFirstChild("GunClient")
        if gc then
            forceMag(gc)
        end
    end)
end

if lp.Character then
    onChar(lp.Character)
end

lp.CharacterAdded:Connect(onChar)

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...