Called when the entity is about to be removed.
See also Entity:CallOnRemove, which can even be used on engine (non-Lua) entities.
This hook may be called at odd times (when entity has actually not yet been removed from the server). This happens during fullupdate with the ENTITY:Initialize function not being called even when the entity reappears. You can debug this behaviour by enabling cheats and running cl_fullupdate on the client.
Create an explosion when the entity will be removed. To create an entity, you can read ents.Create.