string menutext = "Select an item to clear, use ALL to Clear all, or DESTRUCT to remove script from prim";
integer handler;
default
{
state_entry()
{
if (handler)
{
llListenRemove(handler);
}
handler =llListen(1,"",llGetOwner(),""

}
touch_start(integer num_detected)
{
llDialog(llGetOwner(), menutext, buttons, 1);
}
listen( integer channel, string name, key id, string message )
{
string lowmsg = llToLower(message);
if (lowmsg == "sittarget"

{
llWhisper(0,"Clearing Sit Position."

llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
}
if (lowmsg == "floattext"

{
llWhisper(0,"Clearing Floating Text."

llSetText("", <1,1,1>, 1.5);
}
if (lowmsg == "particles"

{
llWhisper(0,"Clearing Particles."

llParticleSystem([]);
}
if (lowmsg == "texturean"

{
llWhisper(0,"Clearing Texture Animation."

llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.3);
}
if(lowmsg == "targetomega"

{
llWhisper(0, "Clearing llTargetOmega()."

llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
}
if(lowmsg == "sound"

{
llWhisper(0, "Clearing Sounds."

llStopSound();
}
if(lowmsg == "sittext"

{
llWhisper(0,"Clearing Sit Text."

llSetSitText("Sit Here"

}
if (lowmsg == "all"

{
llWhisper(0,"Clearing Floating Text."

llSetText("", <1,1,1>, 1.5);
llSetSitText("Sit Here"

llWhisper(0,"Clearing Texture Animation."

llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.3);
llWhisper(0,"Clearing Particles."

llParticleSystem([]);
llWhisper(0,"Clearing Sit Position."

llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
llWhisper(0, "Clearing llTargetOmega()."

llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
llStopSound();
}
if (lowmsg == "destruct"

{
llWhisper(0,"Removing script from prim in 0.2 seconds"

llSleep(0.2);
llRemoveInventory(llGetScriptName());
}
}
}