local m=script.Parent.StaminaValue local C=script.Parent.StaminaBarBG local W=C.StaminaBar local e=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local function U()local C=m.Value/100 local U=UDim2.new(C,0,1,0)local h=e:Create(W,TweenInfo.new(.1,Enum.EasingStyle.Linear,Enum.EasingDirection.In),{Size=U})h:Play()end U();(m:GetPropertyChangedSignal("\086\097\108\117\101")):Connect(U)

local StaminaValue = script.Parent.StaminaValue
local StaminaBarBG = script.Parent.StaminaBarBG
local StaminaBar = StaminaBarBG.StaminaBar
local TweenService = game:GetService("TweenService")

local function updateStaminaBar()
	local StaminaPercent = StaminaValue.Value / 100
	local newBarSize = UDim2.new(StaminaPercent, 0, 1, 0)

	local StaminaTween = TweenService:Create(
		StaminaBar, 
		TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In),
		{Size = newBarSize}
	)

	StaminaTween:Play()
end

updateStaminaBar()

StaminaValue:GetPropertyChangedSignal("Value"):Connect(updateStaminaBar)
