Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer     touchable;      //Global Variables - start
  2. key     touched;            //Global Variables - end
  3. default
  4. {
  5.     state_entry()
  6.     {
  7.         llSetTimerEvent(600);
  8.         llRequestPermissions(llGetOwner(), PERMISSION_DEBIT );              //Do you want to pay out on true events?
  9.     }
  10.  
  11.     timer()
  12.     {
  13.         touchable = TRUE;                                                   //Set Status to touchable
  14.     }
  15.     touch_start(integer total_num)
  16.     {
  17.         touched=llDetectedKey(0);                                           //name of the person who touched
  18.         if(touchable )                                                      //Am i touchable check
  19.         {
  20.             llInstantMessage(touched, llKey2Name(llDetectedKey(0)) + " touched Vic's cube and got L$1!");
  21.             touchable = FALSE;
  22.             llGiveMoney(llDetectedKey(0), 1);
  23.         }
  24.         else
  25.         {
  26.             llInstantMessage(touched, llKey2Name(llDetectedKey(0)) + " touched Vic's cube and got nothing!" );
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement