default
{
state_entry()
{
llSetText("llAttachToAvatar\nCopy this object then click it to attach",<1,1,1>,1);
}
touch_start(integer num_detected)
{
key on = llDetectedKey(num_detected - 1);
if (on != NULL_KEY)
{
integer perm = llGetPermissions();
if (perm != (PERMISSION_ATTACH))
{
llRequestPermissions(on, PERMISSION_ATTACH);
}
else
{
llAttachToAvatar(4);
}
}
}
run_time_permissions(integer perm)
{
if (perm)
{
llAttachToAvatar(4);
llWhisper(0, "you have permissions");
}
}
}