Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on break:
- if player's gamemode is survival:
- cancel event
- if event-block is coal ore:
- play "BLOCK_STONE_BREAK" to player at volume 5 and pitch 15
- give coal ore to player
- chance of 3%:
- give gunpowder named "&7&lLesser Arcane Dust" with lore "&8Hint: Used to enchant pickaxes." to player
- message "&c&lHey! &7You randomly found &f&nLesser Arcane Dust&7 while mining!"
- set event-block to cobble
- wait 2 seconds
- set event-block to stone
- wait 2 seconds
- set event-block to coal ore
- on place:
- if player's gamemode is survival:
- if player does not have permission "admin":
- cancel event
- command /sell [<text>]:
- trigger:
- if arg 1 is "coalore":
- if player has coal ore:
- while amount of coal ore in player's inventory is bigger than 0:
- add 1 to {_amount.%player%}
- remove 1 coal ore from player's inventory
- add 0.03 to {_payout.%player%}
- message ""
- message " &e&lSold %{_amount.%player%}% Items:"
- message ""
- message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
- message "&7 and received &a$%{_payout.%player%}% &7in total."
- message ""
- add {_payout.%player%} to player's balance
- stop
- else:
- message "&c&lHey! &7You don't have enough of this item to sell it."
- if arg 1 is not set:
- execute player command "/sellall"
- command /sellall:
- trigger:
- open chest with 4 rows named "Sell your items" to player
- wait 0.6 ticks
- format slot 0 of player with paper named "&a&lYour Balance" with lore "&fMoney &a%player's balance%" to be unstealable
- format slot 10 of player with coal ore named "&eCoal Ore" with lore "&r ||&7Price &a$0.03 each||&r ||&6Click to sell this item." to run [player command "/sell coalore"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement