// ============================================================ // A-PermGuard-Root.lsl // PermGuard v2.0 — Root Punishment Engine // Part of IMAGE framework | Credit: Spax Orion & Dirty Helga // Released under CC BY-NC // ------------------------------------------------------------ // Watches for unauthorized ownership at rez and on link change. // On trigger: crushes all links to a deep red sculpt blob, // strips all prim inventories, self-destructs. // No llDie. Just a useless glowing clot. // ============================================================ // ------------------------------------------------------------ // CONFIGURATION // ------------------------------------------------------------ string CREATOR_UUID = "00000000-0000-0000-0000-000000000000"; // ^ Replace with your avatar UUID. This is the ONLY permitted owner. integer CHILD_TRIGGER = 812; // ^ Link message number broadcast to all children on trigger. // ------------------------------------------------------------ // CONSTANTS // ------------------------------------------------------------ vector BLOB_SCALE = <0.1, 0.1, 0.1>; // ^ Punishment scale applied to every prim in the linkset. vector BLOOD_RED = <0.6, 0.0, 0.0>; // ^ Full bright blood red. No glow. Maximum spite. float STRIP_DELAY = 1.0; // ^ Seconds to wait after NJP() before self-delete. // Gives child scripts time to receive the link message. // ------------------------------------------------------------ // HELPERS // ------------------------------------------------------------ // NJP — Non Judicial Punishment // Strips all inventory from THIS prim except this script. NJP() { string tsc = llGetScriptName(); string iIn; integer index = llGetInventoryNumber(INVENTORY_ALL); while (index) { --index; iIn = llGetInventoryName(INVENTORY_ALL, index); if (iIn != tsc) llRemoveInventory(iIn); } } // PUNISH — Crushes every link in the set to a useless blob. // Sculpt with null key = broken invisible geometry. // Color and full bright ensure it registers as a crime scene. PUNISH() { integer total = llGetNumberOfPrims(); integer i; for (i = 1; i <= total; i++) { llSetLinkPrimitiveParamsFast(i, [ PRIM_TYPE, PRIM_TYPE_SCULPT, (key)"", PRIM_SCULPT_TYPE_SPHERE, PRIM_SIZE, BLOB_SCALE, PRIM_COLOR, ALL_SIDES, BLOOD_RED, 1.0, PRIM_FULLBRIGHT, ALL_SIDES, TRUE ]); } } // ------------------------------------------------------------ // RUNTIME — INTERNAL // ------------------------------------------------------------ // Central trigger sequence. // Called from any event that confirms unauthorized ownership. TRIGGER() { PUNISH(); llMessageLinked(LINK_ALL_CHILDREN, CHILD_TRIGGER, "", ""); NJP(); llSleep(STRIP_DELAY); llRemoveInventory(llGetScriptName()); } // ------------------------------------------------------------ // STATE — DEFAULT // ------------------------------------------------------------ default { // --- Rez / reset check --- state_entry() { if (llGetOwner() != (key)CREATOR_UUID) TRIGGER(); } // --- Linkset structure change check --- changed(integer x) { if (x & CHANGED_LINK) { if (llGetOwner() != (key)CREATOR_UUID) TRIGGER(); } } }