local Players = game:GetService("Players") local Player = Players.LocalPlayer local GENV = getgenv() if GENV.AnomalyLockdown and GENV.AnomalyLockdown.Unload then pcall(GENV.AnomalyLockdown.Unload) end local State = { InfiniteStamina = false, InfiniteAmmo = false, Running = true, Guns = {}, GunConnections = {}, Connections = {}, StaminaConnections = {}, OriginalMaxStamina = nil } GENV.AnomalyLockdown = State local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))() local Window = Rayfield:CreateWindow({ Name = "Anomaly Lockdown", Icon = 0, LoadingTitle = "Anomaly Lockdown", LoadingSubtitle = "Utilities", ShowText = "Anomaly Lockdown", Theme = "Default", ToggleUIKeybind = "K", DisableRayfieldPrompts = false, DisableBuildWarnings = false, ConfigurationSaving = { Enabled = false, FolderName = nil, FileName = "AnomalyLockdown" }, Discord = { Enabled = false, Invite = "", RememberJoins = false }, KeySystem = false }) local Main = Window:CreateTab("Main", 4483362458) local Extras = Window:CreateTab("Extras", 4483362458) local function DisconnectList(List) for _, Connection in ipairs(List) do pcall(function() Connection:Disconnect() end) end table.clear(List) end local function GetPlayerData() return Player:FindFirstChild("PlayerData") end local function GetStaminaValues() local PlayerData = GetPlayerData() if not PlayerData then return nil, nil end return PlayerData:FindFirstChild("MaxStamina"), PlayerData:FindFirstChild("Stamina") end local function ForceStamina() if not State.InfiniteStamina then return end local MaxStamina, Stamina = GetStaminaValues() if not MaxStamina or not Stamina then return end pcall(function() if MaxStamina.Value ~= 999999 then MaxStamina.Value = 999999 end if Stamina.Value ~= 999999 then Stamina.Value = 999999 end end) end local function SetupStaminaWatch() DisconnectList(State.StaminaConnections) local MaxStamina, Stamina = GetStaminaValues() if not MaxStamina or not Stamina then return false end if State.OriginalMaxStamina == nil then State.OriginalMaxStamina = MaxStamina.Value end table.insert( State.StaminaConnections, MaxStamina:GetPropertyChangedSignal("Value"):Connect(function() if State.InfiniteStamina and MaxStamina.Value ~= 999999 then MaxStamina.Value = 999999 end end) ) table.insert( State.StaminaConnections, Stamina:GetPropertyChangedSignal("Value"):Connect(function() if State.InfiniteStamina and Stamina.Value ~= 999999 then Stamina.Value = 999999 end end) ) ForceStamina() return true end local function DisableStamina() DisconnectList(State.StaminaConnections) local MaxStamina, Stamina = GetStaminaValues() if MaxStamina and State.OriginalMaxStamina ~= nil then pcall(function() MaxStamina.Value = State.OriginalMaxStamina end) end if Stamina and MaxStamina then pcall(function() if Stamina.Value > MaxStamina.Value then Stamina.Value = MaxStamina.Value end end) end end local function IsGunConfig(Object) if not Object then return false end if Object.Name ~= "GunConfigs" then return false end return Object:FindFirstChild("Ammo") ~= nil or Object:FindFirstChild("Clip") ~= nil end local function IsOwnedByLocalPlayer(Object) if not Object then return false end local Backpack = Player:FindFirstChildOfClass("Backpack") local Character = Player.Character if Backpack and Object:IsDescendantOf(Backpack) then return true end if Character and Object:IsDescendantOf(Character) then return true end return false end local function FindMaxValues(Config) local MaxAmmo local MaxClip local AmmoConfigs = Config:FindFirstChild("AmmoConfigs") if AmmoConfigs then MaxAmmo = AmmoConfigs:FindFirstChild("MaxAmmo", true) MaxClip = AmmoConfigs:FindFirstChild("MaxClip", true) end return MaxAmmo, MaxClip end local function FillGun(Config) if not State.InfiniteAmmo then return end if not Config or not Config.Parent then return end if not IsOwnedByLocalPlayer(Config) then return end local Ammo = Config:FindFirstChild("Ammo") local Clip = Config:FindFirstChild("Clip") local MaxAmmo, MaxClip = FindMaxValues(Config) pcall(function() if MaxAmmo and MaxAmmo.Value ~= 999999 then MaxAmmo.Value = 999999 end end) pcall(function() if MaxClip and MaxClip.Value ~= 999999 then MaxClip.Value = 999999 end end) pcall(function() if Ammo and Ammo.Value ~= 999999 then Ammo.Value = 999999 end end) pcall(function() if Clip and Clip.Value ~= 999999 then Clip.Value = 999999 end end) end local function RemoveGun(Config) State.Guns[Config] = nil local Connections = State.GunConnections[Config] if Connections then DisconnectList(Connections) State.GunConnections[Config] = nil end end local function RegisterGun(Config) if not IsGunConfig(Config) then return end if State.Guns[Config] then if State.InfiniteAmmo then FillGun(Config) end return end State.Guns[Config] = true State.GunConnections[Config] = {} local Connections = State.GunConnections[Config] local Ammo = Config:FindFirstChild("Ammo") local Clip = Config:FindFirstChild("Clip") local MaxAmmo, MaxClip = FindMaxValues(Config) local function WatchValue(ValueObject) if not ValueObject then return end table.insert( Connections, ValueObject:GetPropertyChangedSignal("Value"):Connect(function() if State.InfiniteAmmo then FillGun(Config) end end) ) end WatchValue(Ammo) WatchValue(Clip) WatchValue(MaxAmmo) WatchValue(MaxClip) table.insert( Connections, Config.AncestryChanged:Connect(function() task.delay(0.15, function() if not State.Running then return end if not Config.Parent then RemoveGun(Config) return end if not IsOwnedByLocalPlayer(Config) then RemoveGun(Config) end end) end) ) if State.InfiniteAmmo then FillGun(Config) end end local function RegisterTool(Tool) if not Tool then return end local Config = Tool:FindFirstChild("GunConfigs") if Config and IsGunConfig(Config) then RegisterGun(Config) return end for _, Object in ipairs(Tool:GetChildren()) do if IsGunConfig(Object) then RegisterGun(Object) return end end local DescendantConnection DescendantConnection = Tool.DescendantAdded:Connect(function(Object) if IsGunConfig(Object) then RegisterGun(Object) if DescendantConnection then DescendantConnection:Disconnect() DescendantConnection = nil end end end) task.delay(5, function() if DescendantConnection then DescendantConnection:Disconnect() DescendantConnection = nil end end) end local function ScanContainerOnce(Container) if not Container then return end for _, Object in ipairs(Container:GetChildren()) do RegisterTool(Object) end end local function ScanCurrentGuns() local Backpack = Player:FindFirstChildOfClass("Backpack") local Character = Player.Character ScanContainerOnce(Backpack) ScanContainerOnce(Character) end local function CountGuns() local Count = 0 for Config in pairs(State.Guns) do if Config and Config.Parent and IsOwnedByLocalPlayer(Config) then Count += 1 end end return Count end local function FillAllGuns() if not State.InfiniteAmmo then return end for Config in pairs(State.Guns) do if Config and Config.Parent and IsOwnedByLocalPlayer(Config) then FillGun(Config) end end end local function IsLoseClipRemote(Object) if typeof(Object) ~= "Instance" then return false end if Object.Name ~= "LoseClip" then return false end if not IsOwnedByLocalPlayer(Object) then return false end local Current = Object.Parent while Current do if Current.Name == "ServerMain" then return true end Current = Current.Parent end return false end if type(hookmetamethod) == "function" and type(getnamecallmethod) == "function" and type(newcclosure) == "function" then local OldNamecall OldNamecall = hookmetamethod( game, "__namecall", newcclosure(function(Self, ...) local Method = getnamecallmethod() if State.InfiniteAmmo and ( Method == "FireServer" or Method == "InvokeServer" ) and IsLoseClipRemote(Self) then return nil end return OldNamecall(Self, ...) end) ) end local WatchedContainers = {} local function WatchContainer(Container) if not Container then return end if WatchedContainers[Container] then return end WatchedContainers[Container] = true ScanContainerOnce(Container) local AddedConnection = Container.ChildAdded:Connect(function(Object) task.defer(function() RegisterTool(Object) end) end) local RemovedConnection = Container.ChildRemoved:Connect(function(Object) task.delay(0.15, function() if Object.Parent then return end for Config in pairs(State.Guns) do if Config and ( Config == Object or Config:IsDescendantOf(Object) ) then RemoveGun(Config) end end end) end) table.insert(State.Connections, AddedConnection) table.insert(State.Connections, RemovedConnection) end local function SetupPlayerWatchers() local Backpack = Player:FindFirstChildOfClass("Backpack") if Backpack then WatchContainer(Backpack) end if Player.Character then WatchContainer(Player.Character) end table.insert( State.Connections, Player.CharacterAdded:Connect(function(Character) task.wait(0.15) WatchContainer(Character) if State.InfiniteStamina then SetupStaminaWatch() end if State.InfiniteAmmo then ScanCurrentGuns() FillAllGuns() end end) ) table.insert( State.Connections, Player.ChildAdded:Connect(function(Object) if Object:IsA("Backpack") then task.defer(function() WatchContainer(Object) if State.InfiniteAmmo then ScanCurrentGuns() FillAllGuns() end end) end end) ) end Main:CreateSection("Player") Main:CreateToggle({ Name = "Infinite Stamina", CurrentValue = false, Flag = "AnomalyInfiniteStamina", Callback = function(Value) State.InfiniteStamina = Value if Value then local Worked = SetupStaminaWatch() Rayfield:Notify({ Title = "Infinite Stamina", Content = Worked and "Enabled" or "Stamina values not found", Duration = 4 }) else DisableStamina() Rayfield:Notify({ Title = "Infinite Stamina", Content = "Disabled", Duration = 3 }) end end }) Main:CreateSection("Weapons") Main:CreateToggle({ Name = "Infinite Ammo", CurrentValue = false, Flag = "AnomalyInfiniteAmmo", Callback = function(Value) State.InfiniteAmmo = Value if Value then ScanCurrentGuns() FillAllGuns() Rayfield:Notify({ Title = "Infinite Ammo", Content = "Enabled | Guns: " .. tostring(CountGuns()), Duration = 4 }) else Rayfield:Notify({ Title = "Infinite Ammo", Content = "Disabled", Duration = 3 }) end end }) Main:CreateButton({ Name = "Rescan My Guns", Callback = function() ScanCurrentGuns() if State.InfiniteAmmo then FillAllGuns() end Rayfield:Notify({ Title = "Gun Scanner", Content = "Guns found: " .. tostring(CountGuns()), Duration = 4 }) end }) Main:CreateButton({ Name = "Print Detected Guns", Callback = function() ScanCurrentGuns() print("========== ANOMALY LOCKDOWN ==========") print("Player:", Player.Name) print("") for Config in pairs(State.Guns) do if Config and Config.Parent and IsOwnedByLocalPlayer(Config) then print(Config:GetFullName()) local Ammo = Config:FindFirstChild("Ammo") local Clip = Config:FindFirstChild("Clip") local MaxAmmo, MaxClip = FindMaxValues(Config) if Ammo then print("Ammo:", Ammo.Value) end if Clip then print("Clip:", Clip.Value) end if MaxAmmo then print("MaxAmmo:", MaxAmmo.Value) end if MaxClip then print("MaxClip:", MaxClip.Value) end print("--------------------------------") end end print("TOTAL:", CountGuns()) print("====================================") end }) Extras:CreateSection("Themes") local Themes = { ["Default"] = "Default", ["Dark Blue"] = "DarkBlue", ["Amber"] = "AmberGlow", ["Purple"] = "Amethyst", ["Bloom"] = "Bloom", ["Green"] = "Green", ["Ocean"] = "Ocean", ["Serenity"] = "Serenity", ["Light"] = "Light" } Extras:CreateDropdown({ Name = "Theme", Options = { "Default", "Dark Blue", "Amber", "Purple", "Bloom", "Green", "Ocean", "Serenity", "Light" }, CurrentOption = {"Default"}, MultipleOptions = false, Callback = function(Option) local Selected = type(Option) == "table" and Option[1] or Option if Selected and Themes[Selected] then pcall(function() Window.ModifyTheme( Themes[Selected] ) end) end end }) Extras:CreateSection("UI") Extras:CreateKeybind({ Name = "Hide / Show UI", CurrentKeybind = "K", HoldToInteract = false, Callback = function() pcall(function() Rayfield:Toggle() end) end }) SetupPlayerWatchers() ScanCurrentGuns() State.Unload = function() State.Running = false State.InfiniteAmmo = false State.InfiniteStamina = false DisconnectList(State.StaminaConnections) for Config in pairs(State.Guns) do RemoveGun(Config) end DisconnectList(State.Connections) table.clear(State.Guns) table.clear(State.GunConnections) pcall(function() Rayfield:Destroy() end) end Rayfield:Notify({ Title = "Anomaly Lockdown", Content = "Loaded | " .. Player.Name, Duration = 5 })