local Players = game:GetService("Players") local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local LocalPlayer = Players.LocalPlayer local MAX_STAMINA = 100 -- i forgto wtf this do, dont touch local staminaValue local infStaminaConnection local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() local success, gameParameters = pcall(function() return require(ReplicatedStorage:WaitForChild("TS"):WaitForChild("modules"):WaitForChild("gameParameters")) end) local InfStaminaEnabled = success and gameParameters.InfStaminaEnabled or nil local function findStamina(char) staminaValue = nil if LocalPlayer:FindFirstChild("Stamina") and LocalPlayer.Stamina:IsA("NumberValue") then staminaValue = LocalPlayer.Stamina elseif char:FindFirstChild("Stamina") and char.Stamina:IsA("NumberValue") then staminaValue = char.Stamina elseif char:GetAttribute("Stamina") ~= nil then staminaValue = "attribute" end end local function setInfiniteStamina() if staminaValue then if staminaValue == "attribute" then character:SetAttribute("Stamina", MAX_STAMINA) else staminaValue.Value = MAX_STAMINA end end end findStamina(character) if InfStaminaEnabled then pcall(function() InfStaminaEnabled:set(true) end) end if staminaValue then infStaminaConnection = RunService.Heartbeat:Connect(setInfiniteStamina) if staminaValue == "attribute" then character:GetAttributeChangedSignal("Stamina"):Connect(setInfiniteStamina) else staminaValue.Changed:Connect(setInfiniteStamina) end end LocalPlayer.CharacterAdded:Connect(function(newCharacter) character = newCharacter findStamina(newCharacter) if InfStaminaEnabled then pcall(function() InfStaminaEnabled:set(true) end) end if staminaValue then if infStaminaConnection then infStaminaConnection:Disconnect() end infStaminaConnection = RunService.Heartbeat:Connect(setInfiniteStamina) if staminaValue == "attribute" then character:GetAttributeChangedSignal("Stamina"):Connect(setInfiniteStamina) else staminaValue.Changed:Connect(setInfiniteStamina) end end end)