function onCreated() { temp.callstack = getcallstack(); if (callstack[callstack.size() - 2].scriptcallobject.name != "-Inventory") { echo("Item has been placed illegally!"); destroy(); } // item stuff }