Change Variables and Funcionality as needed.
CODE
//-----------------------------------------------------------------------------------
// NON-PORTABLE SCRIPT FUNCTION
// By
// Mitzpatrick Fitzsimmons
//-----------------------------------------------------------------------------------
// This little function is based on something I use to prevent
// some of my scripts from being ripped out of my creations
// and re-used in something I did not make.
// This particular function is not 100% foolproof, but generally gets the job done.
// Feel free to mod this to make it 100% foolproof for your usage.
//-----------------------------------------------------------------------------------
CheckSum()
{
key ObjectCreator = llGetCreator(); // The UUID of the Creator this script is in (might not be you!)
key Scripter = "YOUR UUID HERE"; // Hard-code YOUR UUID here
key ObjectOwner = llGetOwner(); // The Owner of the Object this script is in
if(ObjectCreator != Scripter) // The Creator of the Object this script is in does not match the Script Creator (you)
{
// UNCOMMENT ANY OPTIONS BELOW TO TAKE THE APPROPRIATE ACTION (OR MAKE YOUR OWN)
llSay(0, "You have violated the rights to use this script."); // Say a Message to the Owner of this violation
//llInstantMessage(Scripter, llKey2Name(ObjectOwner) + " has violated your script usage terms."); // Send yourself a message about the violation
//llRemoveInventory("THIS SCRIPT NAME"); // Delete this script from the Object's Inventory
// llDie(); // Delete the Entire Object
}
}
default
{
state_entry()
{
CheckSum();
}
}