Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- commonLore: ||&f&lCommon Win
- rareLore: ||&a&lRare Win
- epicLore: ||&9&lEpic Win
- legendaryLore: ||&c&lLegendary Win
- on right click on ender chest:
- cancel the event
- {bonusbox::%player%} is not set
- open chest with 1 row named "&7Bonus Box" to player
- wait 1 tick
- loop integers between 0 and 3:
- set slot loop-number of player's current inventory to a red stained glass pane named "&cCancel"
- set slot 4 of player's current inventory to a white stained glass pane named " "
- loop integers between 5 and 8:
- set slot loop-number of player's current inventory to a green stained glass pane named "&aConfirm" with lore "&7Costs &e1250 coins&7."
- on inventory close:
- {bonusbox::%player%} is true
- inventory name of player's current inventory is "&7Bonus Box"
- wait 1 tick
- open chest with 3 rows named "&7Bonus Box" to player
- wait 1 tick
- set slot 13 of player's current inventory to {bonusbox::item::%player%}
- loop integers between 0 and 26:
- loop-number-2 is not 13
- set {_dv} to a random integer between 0 and 15
- set {_item} to "160:%{_dv}%" parsed as item
- set slot loop-number-2 of player's current inventory to {_item} named " "
- on join:
- delete {bonusbox::%player%}
- delete {bonusbox::item::%player%}
- on quit:
- delete {bonusbox::%player%}
- delete {bonusbox::item::%player%}
- on inventory click:
- inventory name of player's current inventory is "&7Bonus Box"
- cancel the event
- if clicked item is a red stained glass pane:
- name of clicked item is "&cCancel"
- close player's inventory
- else if clicked item is a green stained glass pane:
- name of clicked item is "&aConfirm"
- $ thread
- set {_coins} to getCoins(player)
- if {_coins} is less than 1250:
- send "&7You do not have enough coins to do that."
- close player's inventory
- else:
- $ thread
- remCoins(player, 1250)
- close player's inventory
- wait 1 tick
- open chest with 3 rows named "&7Bonus Box" to player
- $ thread
- rewardAchievement(sender, "Use the bonus box", "use-bonus-box")
- wait 1 tick
- set {bonusbox::%player%} to true
- add a stick named "&7&lCHAMPION KIT &e(CTF)" with lore "{@legendaryLore}" to {_legendarywins::*}
- add a gold nugget named "&7&l1 DOUBLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
- add a gold ingot named "&7&l1 TRIPLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
- add a gold block named "&7&l1 QUADRUPLE COINS MULTIPLIER" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l500 COINS" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l250 COINS" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l750 COINS" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l1000 COINS" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l1500 COINS" with lore "{@commonLore}" to {_commonwins::*}
- add a sunflower named "&7&l2500 COINS" with lore "{@commonLore}" to {_rarewins::*}
- add a diamond sword with no nbt named "&7&lGLADIATOR KIT &e(CTF)" with lore "{@rareLore}" to {_rarewins::*}
- add a bow named "&7&lARCHER KIT &e(CTF)" with lore "{@rareLore}" to {_rarewins::*}
- add a gold ingot named "&7&l10 TRIPLE COINS MULTIPLIERS" with lore "{@epicLore}" to {_epicwins::*}
- add a gold block named "&7&l10 QUADRUPLE COINS MULTIPLIERS" with lore "{@epicLore}" to {_epicwins::*}
- add a gold nugget named "&7&l10 DOUBLE COINS MULTIPLIERS" with lore "{@legendaryLore}" to {_legendarywins::*}
- add a sunflower named "&7&l10000 COINS" with lore "{@commonLore}" to {_legendarywins::*}
- set {_changetimes} to a random integer between 15 and 25
- set {bonusbox::item::%player%} to a random element out of {_commonwins::*}
- loop {_changetimes} times:
- set {_olditem} to {bonusbox::item::%player%}
- while {bonusbox::item::%player%} is {_olditem}:
- set {_pick} to a random integer between 0 and 100
- if {_pick} is between 0 and 10:
- set {bonusbox::item::%player%} to a random element out of {_epicwins::*}
- else if {_pick} is between 10 and 30:
- set {bonusbox::item::%player%} to a random element out of {_legendarywins::*}
- else if {_pick} is between 30 and 65:
- set {bonusbox::item::%player%} to a random element out of {_rarewins::*}
- else:
- set {bonusbox::item::%player%} to a random element out of {_commonwins::*}
- add 0.5 to {_pitch}
- command "/playsound note.pling %player% ~ ~ ~ 0.5 %{_pitch}% 0.5"
- if inventory name of player's current inventory is "&7Bonus Box":
- set slot 13 of player's current inventory to {bonusbox::item::%player%}
- loop integers between 0 and 26:
- loop-number-2 is not 13
- set {_dv} to a random integer between 0 and 15
- set {_item} to "160:%{_dv}%" parsed as item
- set slot loop-number-2 of player's current inventory to {_item} named " "
- if {_pitch} is 2:
- set {_pitch} to 0
- add 0.67 to {_wait}
- wait "%floor({_wait})% ticks" parsed as timespan
- set {_name} to name of slot 13 of player's current inventory
- set {_lore} to lore of {bonusbox::item::%player%}
- set {_item} to type of slot 13 of player's current inventory
- delete {bonusbox::%player%}
- delete {bonusbox::item::%player%}
- send "&7You won %{_name}% &7(&o%uncolored {_lore}%&7) from the &eBonus Box&7."
- command "/playsound random.levelup %player% ~ ~ ~ 1 1 1"
- if {_name} contains "CHAMPION KIT":
- $ thread
- set {_owns} to sql var "kits::ctf::champion::%player%" exists
- if {_owns} is true:
- set {_coins} to a random integer between 100 and 175
- send "&7Since you already have the &eChampion Kit&7, you recieved &e%{_coins}% coins&7."
- $ thread
- addCoins(player, {_coins})
- else:
- $ thread
- set sql var "kits::ctf::champion::%player%" to "true"
- else if {_name} contains "ARCHER KIT":
- $ thread
- set {_owns} to sql var "kits::ctf::archer::%player%" exists
- if {_owns} is true:
- set {_coins} to a random integer between 50 and 100
- send "&7Since you already have the &eArcher Kit&7, you recieved &e%{_coins}% coins&7."
- $ thread
- addCoins(player, {_coins})
- else:
- $ thread
- set sql var "kits::ctf::archer::%player%" to "true"
- else if {_name} contains "GLADIATOR KIT":
- $ thread
- set {_owns} to sql var "kits::ctf::gladiator::%player%" exists
- if {_owns} is true:
- set {_coins} to a random integer between 75 and 125
- send "&7Since you already have the &eGladiator Kit&7, you recieved &e%{_coins}% coins&7."
- $ thread
- addCoins(player, {_coins})
- else:
- $ thread
- set sql var "kits::ctf::gladiator::%player%" to "true"
- else if {_item} is a sunflower:
- set {_coins} to get digits of uncolored {_name} parsed as integer
- $ thread
- addCoins(player, {_coins})
- else if {_name} contains "1 double coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
- $ thread
- set sql var "multipliers::double::%player%" to "%{_multiplier} + 1%"
- $ thread
- set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
- else if {_name} contains "10 double coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::double::%player%" parsed as integer
- $ thread
- set sql var "multipliers::double::%player%" to "%{_multiplier} + 10%"
- else if {_name} contains "1 quadruple coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::quadruple::%player%" parsed as integer
- $ thread
- set sql var "multipliers::quadruple::%player%" to "%{_multiplier} + 1%"
- else if {_name} contains "10 quadruple coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::quadruple::%player%" parsed as integer
- $ thread
- set sql var "multipliers::quadruple::%player%" to "%{_multiplier} + 10%"
- else if {_name} contains "1 triple coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::triple::%player%" parsed as integer
- $ thread
- set sql var "multipliers::triple::%player%" to "%{_multiplier} + 1%"
- else if {_name} contains "10 triple coins multiplier":
- $ thread
- set {_multiplier} to value of sql var "multipliers::triple::%player%" parsed as integer
- $ thread
- set sql var "multipliers::triple::%player%" to "%{_multiplier} + 10%"
- on skript load:
- delete {bonusbox::*}
- on skript unload:
- delete {bonusbox::*}
- on load:
- loop all armor stands:
- uncolored name of loop-entity contains "BONUS BOX"
- delete entity from loop-entity
- spawn a armor stand at location 1.5 above {bonusbox}
- set {_stand} to the last spawned armor stand
- add "{Marker:1}" to nbt of entity from {_stand}
- add "{CustomNameVisible:true}" to nbt of entity from {_stand}
- add "{Invisible:1}" to nbt of entity from {_stand}
- add "{NoGravity:1}" to nbt of entity from {_stand}
- add "{IsHolo:BonusBox}" to nbt of entity from {_stand}
- set name of entity from {_stand} to "&7&l&k...&7 &e&lBONUS BOX&7 &l&k..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement