This is a very basic Security prim that, when an avatar walks through it, it will send the owner an Instant Message notification of the infilitrator.
//Basic Security Script designed by KingHenrik Lundquist
//llSetAlpha(0.0); //Un-comment to make the prim invisible; WARNING: hard to fix position when invisible, in order to see invisible prims, hit Ctrl-Alt-T, again to disable
llVolumeDetect(TRUE); //Makes the prim phantom
string perp = llDetectedName(0); //gets the name of the infiltrator
llInstantMessage(llGetOwner(), perp+" is in your building."); //sends the message