Essentially all rely on a quick check done at the on_rez() state.
if( "yadda" != llGetObjectName())
llRemoveInventory(llGetScriptName());
Simple. You hard code the name of the object ("yadda"

Obvious variations:
string nameOfObject = "yadda";
if( nameOfObject != llGetObjectName())
llRemoveInventory(llGetScriptName());
or
string nameOfObject = "yadda";
if( nameOfObject != llGetObjectName())
{
llSay(0,"Copy protected script message goes here"

llRemoveInventory(llGetScriptName());
}
or perhaps you have coded something more clever, instead of deleting the script, doing something else, like:
- deleting the object (if you're really mean)
- hard coding your key and IMing you the owner's name so that you can see who is pirating your stuff
- push the person into orbit
- hard code the key to some voice on wav file telling the thief ... whatever

- other stuff which I'm sure you could have fun thinking of.
Pretty obvious, but as not many people sell copy / no transfer items, I'm wagering it's likely no one has posted this.
[edit-moved from the script library]