Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on break:
- cancel drops
- if event-block is grass block or sand block:
- set event-block to event-block
- if event-block is grass block:
- set {block} to 1
- else if event-block is sand block:
- set {block} to 5
- if {fortlvl::%player's uuid%} is not 0:
- set {_val} to floor({block} * "%{fortlvl::%player's uuid%}%" parsed as number + 1)
- add {_val} to {balance::%player's uuid%}
- send action bar "&8&l+ &a&l%{_val}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
- set event-block to event-block
- if {lucklvl::%player's uuid%} is not 0:
- if {fortlvl::%player's uuid%} is 0:
- add {block} to {balance::%player's uuid%}
- send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
- set event-block to event-block
- set {_chance} to floor(1 * "%{lucklvl::%player's uuid%}%" parsed as number)
- chance of {_chance}%:
- set {_reward} to random integer between 500 and 10000
- add {_reward} to {balance::%player's uuid%}
- send "&5&lLucky: &d+%{_reward}%" to player
- if {cratelvl::%player's uuid%} is not 0:
- if {fortlvl::%player's uuid%} is 0:
- add {block} to {balance::%player's uuid%}
- send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
- set event-block to event-block
- set {_chance} to 0.25 * "%{cratelvl::%player's uuid%}%" parsed as number
- chance of {_chance}%:
- chance of 50%:
- set {_reward} to nether star named "&1&lCommon Crate"
- set line 1 of {_reward}'s lore to "&9Right click to redeem"
- give 1 of {_reward} to player
- send "&1&lCrates: &9+ 1 Common Crate" to player
- chance of 25%:
- set {_reward} to nether star named "&1&lUncommon Crate"
- set line 1 of {_reward}'s lore to "&9Right click to redeem"
- give 1 of {_reward} to player
- send "&1&lCrates: &9+ 1 Uncommon Crate" to player
- chance of 10%:
- set {_reward} to nether star named "&1&lRare Crate"
- set line 1 of {_reward}'s lore to "&9Right click to redeem"
- give 1 of {_reward} to player
- send "&1&lCrates: &9+ 1 Rare Crate" to player
- chance of 2.5%:
- set {_reward} to nether star named "&1&lEpic Crate"
- set line 1 of {_reward}'s lore to "&9Right click to redeem"
- give 1 of {_reward} to player
- send "&1&lCrates: &6+ 1 Epic Crate" to player
- if {fortlvl::%player's uuid%} and {lucklvl::%player's uuid%} and {cratelvl::%player's uuid%} is 0:
- add {block} to {balance::%player's uuid%}
- send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
- set event-block to event-block
- if player does not have permission "op":
- if event-block is not grass block or sand block:
- cancel event
- send "&cYou cannot break that!" to player
- on right click:
- if player's tool is shovel:
- cancel event
- sender command "enchant"
- if player's tool is nether star:
- set {_name} to name of player's tool
- if {_name} contains "Common Crate":
- remove 1 of player's tool from player's inventory
- set {_reward} to random integer between 100 and 2000
- add {_reward} to {balance::%player's uuid%}
- send "&9+ %{_reward}%" to player
- if {_name} contains "Uncommon Crate":
- remove 1 of player's tool from player's inventory
- set {_reward} to random integer between 2000 and 10000
- add {_reward} to {balance::%player's uuid%}
- send "&9+ %{_reward}%" to player
- if {_name} contains "Rare Crate":
- remove 1 of player's tool from player's inventory
- set {_reward} to random integer between 10000 and 20000
- add {_reward} to {balance::%player's uuid%}
- send "&9+ %{_reward}%" to player
- if {_name} contains "Epic Crate":
- remove 1 of player's tool from player's inventory
- set {_reward} to random integer between 20000 and 100000
- add {_reward} to {balance::%player's uuid%}
- send "&6+ %{_reward}%" to player
- command /enchant:
- trigger:
- open virtual chest inventory with size 4 named "&8&lEnchanter" to player
- set {_n} to 0
- loop 36 times:
- make gui slot {_n} of player with light gray stained glass pane named " " to do nothing
- add 1 to {_n}
- set {_slot} to glowing gold pickaxe named "&6&lEfficiency"
- set line 1 of {_slot}'s lore to "&8Cost: &e%{effcost::%player's uuid%}%"
- set line 2 of {_slot}'s lore to "&8Level: &e%{efflvl::%player's uuid%}%"
- set line 3 of {_slot}'s lore to "&8Max Level: &e5"
- make gui slot 10 of player with {_slot} to run:
- if {balance::%player's uuid%} is greater than or equal to {effcost::%player's uuid%}:
- if {efflvl::%player's uuid%} is less than 5:
- add 1 to {efflvl::%player's uuid%}
- enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
- subtract {effcost::%player's uuid%} from {balance::%player's uuid%}
- set {_bal} to floor("%{effcost::%player's uuid%}%" parsed as number * 3)
- set {effcost::%player's uuid%} to {_bal}
- sender command "enchant"
- else:
- send "&cYou have maxed this enchant!" to player
- else:
- send "&cInsufficient Funds" to player
- set {_slot} to emerald with name "&2&lFortune"
- set line 1 of {_slot}'s lore to "&8Cost: &a%{fortcost::%player's uuid%}%"
- set line 2 of {_slot}'s lore to "&8Level: &a%{fortlvl::%player's uuid%}%"
- set line 3 of {_slot}'s lore to "&8Max Level: &a3"
- make gui slot 12 of player with {_slot} to run:
- if {balance::%player's uuid%} is greater than or equal to {fortcost::%player's uuid%}:
- if {fortlvl::%player's uuid%} is less than 3:
- add 1 to {fortlvl::%player's uuid%}
- #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
- subtract {fortcost::%player's uuid%} from {balance::%player's uuid%}
- set {_bal} to floor("%{fortcost::%player's uuid%}%" parsed as number * 4)
- set {fortcost::%player's uuid%} to {_bal}
- sender command "enchant"
- else:
- send "&cYou have maxed this enchant!" to player
- else:
- send "&cInsufficient Funds" to player
- set {_slot} to totem of undying with name "&5&lLucky"
- set line 1 of {_slot}'s lore to "&8Cost: &d%{luckcost::%player's uuid%}%"
- set line 2 of {_slot}'s lore to "&8Level: &d%{lucklvl::%player's uuid%}%"
- set line 3 of {_slot}'s lore to "&8Max Level: &d10"
- make gui slot 14 of player with {_slot} to run:
- if {balance::%player's uuid%} is greater than or equal to {luckcost::%player's uuid%}:
- if {lucklvl::%player's uuid%} is less than 10:
- add 1 to {lucklvl::%player's uuid%}
- #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
- subtract {luckcost::%player's uuid%} from {balance::%player's uuid%}
- set {_bal} to floor("%{luckcost::%player's uuid%}%" parsed as number * 2)
- set {luckcost::%player's uuid%} to {_bal}
- sender command "enchant"
- else:
- send "&cYou have maxed this enchant!" to player
- else:
- send "&cInsufficient Funds" to player
- set {_slot} to chest with name "&1&lCrate Finder"
- set line 1 of {_slot}'s lore to "&8Cost: &9%{cratecost::%player's uuid%}%"
- set line 2 of {_slot}'s lore to "&8Level: &9%{cratelvl::%player's uuid%}%"
- set line 3 of {_slot}'s lore to "&8Max Level: &910"
- make gui slot 16 of player with {_slot} to run:
- if {balance::%player's uuid%} is greater than or equal to {cratecost::%player's uuid%}:
- if {cratelvl::%player's uuid%} is less than 10:
- add 1 to {cratelvl::%player's uuid%}
- #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
- subtract {cratecost::%player's uuid%} from {balance::%player's uuid%}
- set {_bal} to floor("%{cratecost::%player's uuid%}%" parsed as number * 2)
- set {cratecost::%player's uuid%} to {_bal}
- sender command "enchant"
- else:
- send "&cYou have maxed this enchant!" to player
- else:
- send "&cInsufficient Funds" to player
- set {_slot} to red stained glass pane named "&8&lDescription"
- set line 1 of {_slot}'s lore to "&8Name: &6Efficiency"
- set line 2 of {_slot}'s lore to "&7Increases the speed at which blocks are broken."
- make gui slot 19 of player with {_slot} to do nothing
- set line 1 of {_slot}'s lore to "&8Name: &6Fortune"
- set line 2 of {_slot}'s lore to "&7Increases the value of each block broken."
- make gui slot 21 of player with {_slot} to do nothing
- set line 1 of {_slot}'s lore to "&8Name: &6Lucky"
- set line 2 of {_slot}'s lore to "&7Chance to get a sum of money with each block broken."
- set line 3 of {_slot}'s lore to "&7Each level is a 1 percent increase in chance"
- make gui slot 23 of player with {_slot} to do nothing
- set line 1 of {_slot}'s lore to "&8Name: &6Efficiency"
- set line 2 of {_slot}'s lore to "&7Chance to find a crate with each block broken."
- set line 3 of {_slot}'s lore to "&7Each level is a 0.25 percent increase in chance"
- make gui slot 25 of player with {_slot} to do nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement