// Get the instance of the trait that belongs to the target NPC
LookClose trait = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen().getTrait(LookClose.class);
// Handle toggle
if (scriptEntry.hasObject("toggle"))
trait.lookClose(scriptEntry.getElement("toggle").asBoolean());
// Handle realistic
if (scriptEntry.hasObject("realistic"))
trait.setRealisticLooking(true);
else trait.setRealisticLooking(false);