Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- none: &7[&cToken &6Shop&7] You don't have enough tokens!
- prefix: &7[&cToken &6Shop&7]
- on skript load:
- set {sm::stone} to cobblestone
- set {sm::coal ore} to coal
- set {sm::lapis lazuli ore} to 4 lapis lazuli
- set {sm::diamond ore} to 1 diamond
- set {smelt::*} to stone, coal ore, lapis lazuli ore and diamond ore
- on mine:
- if lore of player's tool contains "Explosive ":
- loop all blocks in radius ({expl::%player's uuid%} + 2):
- if loop-block is not barrier, command block, repeating command block, chain command block or bedrock:
- if {smelt::*} doesn't contain loop-block:
- give player loop-block
- set loop-block to air
- if {tokm::%player's uuid%} is not 9:
- add 1 to {tokm::%player's uuid%}
- else:
- set {_tokm::%player's uuid%} to 0
- add 1 to {tokens::%player's uuid%}
- else:
- give player {sm::%type of loop-block%}
- else:
- continue loop
- else if lore of player's tool contains "Luck ":
- send "hi"
- else:
- if {tokm::%player's uuid%} is not 9:
- add 1 to {tokm::%player's uuid%}
- else:
- set {tokm::%player's uuid%} to 0
- add 1 to {tokens::%player's uuid%}
- command tokenshop:
- trigger:
- if player's tool is a pickaxe:
- open virtual chest with 6 rows to player
- loop integers between 0 and 53:
- format gui slot loop-int of player with gray stained glass pane named " " to do nothing
- format gui slot 13 of player with player's tool to do nothing
- format gui slot 29 of player with quartz block named "&aFortune" with lore "&7You &areceive &7more items!" and "&8Price: &71000 Tokens" to run:
- if {tokens::%player's uuid%} >= 1000:
- if player's tool is enchanted with fortune:
- set {_pick::%player%} to player's tool
- set {_ench} to "fortune %level of fortune of player's tool + 1%" parsed as enchantment type
- set player's tool to air
- enchant {_pick::%player%} with {_ench}
- set player's tool to {_pick::%player%}
- remove 1000 from {tokens::%player's uuid%}
- send "{@prefix} You upgraded your Fortune enchantment!"
- else:
- remove 1000 from {tokens::%player's uuid%}
- enchant player's tool with fortune 1
- send "{@prefix} You upgraded your Fortune enchantment!"
- else:
- send "{@none}"
- format gui slot 30 of player with diamond pickaxe named "&aDigspeed" with lore "&7You can now &amine &7faster when you &aupgrade &7this!" and "&8Price: &72000 Tokens" to run:
- if {tokens::%player's uuid%} >= 2000:
- if player's tool is enchanted with efficiency:
- set {_pick::%player%} to player's tool
- set {_ench} to "efficiency %level of efficiency of player's tool + 1%" parsed as enchantment type
- set player's tool to air
- enchant {_pick::%player%} with {_ench}
- set player's tool to {_pick::%player%}
- remove 2000 from {tokens::%player's uuid%}
- send "{@prefix} You upgraded your Digspeed enchantment!"
- else:
- remove 2000 from {tokens::%player's uuid%}
- enchant player's tool with efficiency 1
- send "{@prefix} You upgraded your Digspeed enchantment!"
- else:
- send "{@none}"
- format gui slot 31 of player with anvil named "&aUnbreaking" with lore "&7You can &2avoid &7the chances of your pickaxe breaking!" and "&8Price: &71500 Tokens" to run:
- if {tokens::%player's uuid%} is greater than or equal to 1500:
- if player's tool is enchanted with unbreaking:
- set {_pick::%player%} to player's tool
- set {_ench} to "unbreaking %level of unbreaking of player's tool + 1%" parsed as enchantment type
- set player's tool to air
- enchant {_pick::%player%} with {_ench}
- set player's tool to {_pick::%player%}
- remove 1500 from {tokens::%player's uuid%}
- send "{@prefix} You upgraded your Unbreaking enchantment!"
- else:
- remove 1500 from {tokens::%player's uuid%}
- enchant player's tool with unbreaking 1
- send "{@prefix} You upgraded your Unbreaking enchantment!"
- else:
- send "{@none}"
- format gui slot 32 of player with sunflower named "&aLucky" with lore "&7You'll have a better &dchance &7of findind more &dtokens&7!" and "&8Price: &74000 Tokens" to run:
- if {tokens::%player's uuid%} >= 4000:
- if {luck::%player's uuid%} < 5:
- remove 4000 from {tokens::%player's uuid%}
- add 1 to {luck::%player's uuid%}
- if lore of player's tool contains "Luck %{luck::%player's uuid%}%":
- loop integers between 1 and 25:
- if line loop-int of lore of player's tool is "Luck %{luck::%player's uuid%}%":
- set line loop-int of lore of player's tool to ""
- add 1 to {_luck::%player's uuid%}
- set line loop-int of lore of player's tool to "Luck %{luck::%player's uuid%}%"
- send "{@prefix} You upgraded your Luck enchantment!"
- stop loop
- else:
- loop integers between 1 and 25:
- if line loop-int of lore of player's tool isn't set:
- set line loop-int of lore of player's tool to "Luck %{luck::%player's uuid%}%"
- send "{@prefix} You got the Luck enchantment!"
- stop loop
- else:
- send "{@prefix} Your Luck enchantment is maxed out!"
- else:
- send "{@none}"
- format gui slot 33 of player with tnt named "&aExplosive" with lore "&7You'll have a &cchance &7to create an &cexplosion &7while mining" and "&8Price: &75000 Tokens" to run:
- if {tokens::%player's uuid%} >= 5000:
- if {expl::%player's uuid%} < 5:
- remove 5000 from {tokens::%player's uuid%}
- add 1 to {expl::%player's uuid%}
- if lore of player's tool contains "Explosive ":
- replace "Explosive %{expl::%player's uuid%}%" in lore of player's tool with "Explosive {expl::%player's uuid%}"
- send "{@prefix} You upgraded your Explosive enchantment!"
- else:
- loop integers between 1 and 25:
- if line loop-int of lore of player's tool isn't set:
- set line loop-int of lore of player's tool to "Explosive {expl::%player's uuid%}"
- send "{@prefix} You got the Explosive enchantment!"
- else:
- send "{@prefix} Your Explosive enchantment is maxed out!"
- else:
- send "{@none}"
- format gui slot 34 of player with diamond hoe named "&aKeyfinder" with lore "&7You'll have the &bchance &7to &breceive &7keys whilst mining!" and "&8Price: &77000 Tokens" to run:
- if {tokens::%player's uuid%} >= 7000:
- if {keyf::%player's uuid%} < 5:
- remove 7000 from {tokens::%player's uuid%}
- add 1 to {luck::%player's uuid%}
- if lore of player's tool contains "Keyfinder ":
- replace "Keyfinder %{keyf::%player's uuid%}%" in lore of player's tool with "Keyfinder {keyf::%player's uuid%}"
- send "{@prefix} You upgraded your Keyfinder enchantment!"
- else:
- loop integers between 1 and 25:
- if line loop-int of lore of player's tool isn't set:
- set line loop-int of lore of player's tool to "Keyfinder {keyf::%player's uuid%}"
- send "{@prefix} You got the Keyfinder enchantment!"
- else:
- send "{@prefix} Your Keyfinder enchantment is maxed out!"
- else:
- send "{@none}"
- command token <text> <player> <int>:
- usage: {@prefix} /token pay <player> <amount>
- trigger:
- if arg-text is "pay":
- if arg-int > 0:
- if {tokens::%player's uuid%} >= arg-int:
- remove arg-int from {tokens::%player's uuid%}
- add arg-int to {tokens::%arg-player's uuid%}
- send "{@prefix} You gave %arg-player% &7%arg-int% &7tokens!"
- send "{@prefix} %player% &7gave you %arg-int% &7tokens!" to arg-player
- else:
- send "{@prefix} You do not have enough tokens!"
- else:
- send "{@prefix} Put a number that is higher than 0!"
- else:
- send "{@prefix} Unknown command, do /token pay <player> <amount>"
- command settoken <int>:
- permission: admin.st
- trigger:
- set {tokens::%player's uuid%} to arg-integer
- send "{@prefix} Successfully set tokens to %arg-int%&7!"
- command resetstuff:
- permission: admin.rs
- aliases: /rf
- trigger:
- set {luck::%player's uuid%} to 0
- set {expl::%player's uuid%} to 0
- set {keyf::%player's uuid%} to 0
- send "{@prefix} Successfully reset Luck, Explosion and Keyfinder!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement