--//Controller//--

for _, StatHolder in pairs(Holder:GetChildren()) do
	if StatHolder:IsA("Frame") then
		local DisplayText = StatHolder.DisplayText
		local DisplayFrame = StatHolder.DisplayFrame

		Player:GetAttributeChangedSignal(StatHolder.Name):Connect(function()
			TweenService:Create(
				DisplayFrame,
				TweenInfo.new(
					0.25,
					Enum.EasingStyle.Linear
				),
				{
					Size = UDim2.new(Player:GetAttribute(StatHolder.Name) / 100, 0, 1, 0)
				}
			):Play()
			
			DisplayText.Text = Player:GetAttribute(StatHolder.Name) .. " / 100"
			
		end)
		
	end
	
end
