local rs = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local stamina = require(rs.Resources.Client.MovementHandler.Stamina) local ev = require(rs.Communication.EventHandler) local ann = require(Players.LocalPlayer:WaitForChild("PlayerScripts").UiHandler.Modules.Notifications.Logic.Announcement) local cd = false task.wait(3) task.spawn(function() ann.Display("Thanks for using my script! Your stamina will refill at 5.
If you have any suggestions comment it on my scriptblox.", "the script creator or smth") end) task.spawn(function() while true do task.wait(0.1) if stamina.Get() <= 5 and not cd then -- change the 5 to the number u want it to refill at cd = true stamina.DrainStamina(-100, 0, true) stamina.DestroyDrainer("BaseDrain") ev:FireSelf("DisplayPopup", "Saved", "Stamina refilled!") -- comment this part out if u dont want a notification task.wait(1) cd = false end end end)