Destructible entities

How do I make my custom entity destructible?

Sincerely

With this function: ENTITY:OnTakeDamage - Garry's Mod Wiki

You can simulate the resistance of an entity to bullets and remove it when it has taken too much damage