1. Put the script into a child prim which is rezzed on ground.
2. Say, "ON" and "OFF", it works correctly.
3. Wear the object and say, "ON" and "OFF", it works, too.
4. Detach the object and then wear again.
5. Say, "ON", but you should make sure that it doesn't work.
6. Detach it and wear again. It should be rezzed while rotating.
7. And you can make sure that it works correctly.
So, if you stop to rotate it while wearing it and put it into your inventory, it doesn't work when you wear it again. But say command is affected and it will be acted when you re-attach it.
CODE
default
{
state_entry()
{
llListen(0,"",llGetOwner(),"");
}
changed(integer change)
{
if(change & CHANGED_OWNER)
{
llResetScript();
}
}
listen(integer channel, string name, key id, string message)
{
if ( message == "ON")
{
llTargetOmega(<2,0,0> * llGetLocalRot(),PI,1.0);
}
else if ( message == "OFF")
{
llTargetOmega(<0,0,0> * llGetLocalRot(),PI,1.0);
}
}
}