local plr = game:GetService("Players").LocalPlayer local rs = game:GetService("RunService") rs.Heartbeat:Connect(function() local max = workspace:GetAttribute("MaxStamina") if max then plr:SetAttribute("Stamina", max) end end)