I was reminded recently of a script that I wrote quite some time ago and appear not to have published anywhere. I did mean to. Perhaps I did, and have simply forgotten. In any case, it can be found here:
The task that I use it to accomplish is to check the permissions of the contents of an item before sale or distribution. If you are one of these fabled "Content Creator" types, and you are at all similar to me, you will undoubtedly have encountered the situation where an item should by all rights have, say, "copy no-transfer" permission, and in fact, no matter how much one changes, it does not in practice.
The cause of this is most often a rogue script or item in a tiny prim that one has forgotten about entirely, and these things can be exceptionally tiring to track down. This script, however, can be used to scan the Inventory of Every Prim in an Object and indicate which of their contents have Inconvenient Permissions. It can also then delete itself, which would be a good thing to tell it to do before sending the final object out to Customers And Such.
On a more general note it is an example of a script that propagates itself throughout an object, operates differently according to where it is at the time, and has the "Parent" Script issue firm commands of suicide to its Children, which might sound somewhat ethically dubious but honestly, who are you or I to criticise the practices of scripts? We live a pampered existence where we cannot simply be deleted or have our internal organs utterly redesigned on a whim. We have no moral authority here; we have not lived the life of a script. Have some humility for goodness' sake.