local UserInputService = game:GetService("UserInputService") local StarterGui = game:GetService("StarterGui") local Players = game:GetService("Players") local player = Players.LocalPlayer -- Configuration local INTERVAL = 0.25 -- Delay between fires (increase if you experience lag, e.g. 0.5) local toggled = false local currentEvent = nil -- Screen Notification Helper local function notify(title, text, duration) pcall(function() StarterGui:SetCore("SendNotification", { Title = title, Text = text, Duration = duration or 2 }) end) end -- Cache Character & Event references to avoid performance drops local function updateCharacter(char) currentEvent = nil if not char then return end local stamina = char:WaitForChild("Stamina", 5) if stamina then currentEvent = stamina:WaitForChild("StaminaEvent", 5) end end if player.Character then updateCharacter(player.Character) end player.CharacterAdded:Connect(updateCharacter) -- Main Toggle Loop local function startLoop() task.spawn(function() while toggled do if currentEvent then currentEvent:FireServer("StaminaHold", false) end task.wait(INTERVAL) end end) end -- Keybind Listener UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.N then toggled = not toggled if toggled then notify("Infinite Stamina", "Status: ENABLED", 2) startLoop() else notify("Infinite Stamina", "Status: DISABLED", 2) end end end)