You could iterate through the players and increase their stamina if it can be increased
local function IncreaseStamina(player, amount)
-- Code to increase stamina (should clamp the value to max value)
end
coroutine.wrap(function()
local nextUpdate = tick()
local staminaIncrementConnection = game:GetService('RunService').Heartbeat:Connect(function()
if tick() - nextUpdate > 1 then
nextUpdate += 1
for _, player in pairs(game:GetService('Players'):GetPlayers()) do
IncreaseStamina(player, 10)
end
end
end)
end)()