integer amount=02;// how much you wanna give away
default//this is the normal state we are used to, call it the first one
{
touch_start(integer num_detected)
{
if(llDetectedKey(0)==llGetOwner())
{
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);//asks for permission to give out L$
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_DEBIT)
{
llOwnerSay("Permissions passed...ready to work"

;
state run; //if you give it permission it goes to the next state
}
else
{
llOwnerSay("Invalid Permissions...resetting now"

;
state reset; //if not it goes to the reset state
}
}
changed(integer change) { // something changed
if (change & CHANGED_OWNER) { state reset;}}
}
state run // the state what runs (the main one in this case)
{
state_entry()
{
llOwnerSay("Ok its time to give out some L$"

;
}
touch_start(integer total_number)
{
llGiveMoney(llDetectedKey(0),amount);
state sleep; // The state that sleeps (massachuesetttes?)
}
}
state reset // Saves writing llResetScript all ove the place
{
state_entry()
{
llResetScript();
}
}
state sleep // The sleepy bit sets the time and then goes to the main state
{
state_entry()
{
llSetTimerEvent(00060);
}
timer()
{
state run;
}
touch_start(integer total_number)
{
integer i;
for(i=0;i<total_number;i++)
{
if( llDetectedGroup(i)==FALSE )
{
llSay(0, "Sorry, " + llDetectedName(i) + " but I'm not giving you anything because you're not wearing the right group tag."

;
}
else
{
llSay(0, "Good news, " + llDetectedName(i) + " you are wearing the right tag, so you get the money."

;
// plus whatever it does to give them money, obviously.
}
}
}
}
I cant seem to find the right place to put the get group id so heres the script. One other thing also If im right here this will allow the giver to reset every hour. is that just for the person who touched it or can someone else touch it to take ? In other words is the hour reset on each person?