llGetScriptName
string llGetScriptName()Returns the name of the script that this function is used in.
Returns the name of this script.
Remove the current script from the object:
default{ state_entry() { llRemoveInventory(llGetScriptName()); }}