Know how entity is spawned


I am creating an entity, which will be given certain values on spawn. If the entity is spawned via the Q menu, it will create errors. I want it to be able to be spawned, via the Q menu, without errors occurring. How can I tell if my entity was spawned by a player or a lua script?

ENT:SpawnFunction is called when you spawn it via the spawn menu.