Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FREE SCRIPTS - TESTED AND WORKING ON KITELY
- // If you paid for this script, you were ripped off.
- // You may use in your creations.
- // You may not sell it as a script or in a script collection.
- //Copy and paste the contents of this notecard into a new script.
- //The message to give the person that has paid a tip
- string gMessage = "Thank you for your tip, It is appreciated!";
- //This is a recommendation which will be the set amount in the pay box
- integer gRecommendedTip = 50;
- //The color of the hover text
- vector gColor = <1,1,1>;
- //Show name of tipper? 'yes' or 'no'
- string gShowSwitch = "yes";
- //Notify you when someone has tipped? 'yes' or 'no'
- string gNotifySwitch = "yes";
- //_______________Do not edit below here____________
- integer gTotal = 0;
- default
- {
- state_entry()
- {
- llSetText("", <1,1,1>, 1);
- llSetClickAction(CLICK_ACTION_PAY);
- llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
- }
- run_time_permissions(integer perms)
- {
- if(perms)
- {
- llSetPayPrice(gRecommendedTip, [100, 150, 200, 250]);
- }
- }
- money(key customer, integer amount)
- {
- string CustomerName = llKey2Name(customer);
- integer Last = amount;
- gTotal += amount;
- string Prefix = "";
- if(llToLower(gShowSwitch) == "yes")
- Prefix = "Last Tipper: "+CustomerName+"\n";
- llSetText(Prefix+"Last Tip: $L "+(string)Last+"\nTotal: $L "+(string)gTotal,gColor, 1); // Change this to your Grid's Currency type
- llInstantMessage(customer, gMessage);
- if(llToLower(gNotifySwitch) == "yes")
- llInstantMessage(llGetOwner(), CustomerName+" has just made a donation of $L "+(string)amount+"."); // Change this to your Grid's Currency type
- }
- on_rez(integer start_param)
- {
- llResetScript();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement