local function updateDamage() local playerPets = playersFolder[player.Name]:GetChildren() for _, pet in ipairs(playerPets) do local attackValue = pet.Attack.Value if attackValue then local drop = attackValue.Parent local currentPoints = drop.CurrentPoints currentPoints.Value = math.max(currentPoints.Value - pet.Damage.Value, 0) if currentPoints.Value == 0 then for _, pet in pairs(playerPets) do pet.Attack.Value = nil end destroyDrop(drop) end end end end local function updateDropDisplay() local drops = workspace:WaitForChild("Drops"):GetDescendants() for _, drop in pairs(drops) do if drop:IsA("Model") then local display = drop:FindFirstChild("Display") local bar = display.Background.Bar local displayText = display.Background.Amount displayText.Text = tostring(drop.CurrentPoints.Value) bar:TweenSize( UDim2.fromScale(drop.CurrentPoints.Value / drop.MaxPoints.Value, 1), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.3) end end end task.spawn(function() while task.wait(1) do updateDamage() updateDropDisplay() end end)