DonateButtons:
type: world
pre:
- if <player.flag[money]> < %price% {
- narrate "<&4>Not enough money."
- queue clear
}
- if <player.flag[money]> >= %price% {
- flag player money:-:%price%
- narrate "<&b>Donated $%price% to the Donation Fund."
- flag server donation_fund:+:%price%
}
events:
- on player right clicks block:
+ on player right clicks STONE_BUTTON:
- - if <context.location.material.contains[button]> queue clear
- choose <context.location.simple>:
- case 1044,63,967,Dekara:
- define price 100
- case 1044,63,970,Dekara:
- define price 1000
- case 1044,63,973,Dekara:
- define price 10000
- inject locally pre