Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Voteitem: music disc named "&6Lootbox Chip" with lore "&fStecke den Coin in die Musikbox am Spawn"
- command /coin:
- permission: admin
- trigger:
- give player {@Voteitem}
- command /voteitem:
- permission: admin
- trigger:
- add player's tool to skript-yaml list "Votecrate" from "plugins/Config/Votecrate.yml"
- save yaml "plugins/Config/Votecrate.yml"
- load yaml "plugins/Config/Votecrate.yml" as "plugins/Config/Votecrate.yml"
- send "&c%player's tool% &azum Votecrate hinzugefügt."
- on vote:
- add 1 to {Votes::%event-player%}
- add 1 to {Votes.Voteparty}
- give event-player {@Voteitem}
- Voteparty()
- loop all players:
- Scoreboard(loop-player)
- broadcast "&2&lVKTR &8» &a+1 Vote: &7%player% &6(/vote)"
- send "&a+1 Votechip"
- on rightclick on jukebox:
- "%region at event-block%" is "jukebox in world world and spawn in world world"
- if player's tool is {@Voteitem}:
- cancel event
- set {_item::*} to skript-yaml list "Votecrate" from "plugins/Config/Votecrate.yml"
- open chest with 1 row named "&cVotecrate" to player
- set metadata tag "CrateGui" of player to player's current inventory
- set {Votegui.%player%} to true
- set {_turns} to 20
- set {_wait} to 1 ticks
- loop {_item::*}:
- add random element out of {_item::*} to {_item2::*}
- remove {_item2::*} from {_item::*}
- set {_item::*} to {_item2::*}
- while {Votegui.%player%} is true:
- loop {_item::*}:
- set {_clone_%{_size}%} to loop-value
- add 1 to {_size}
- {_size} is 18:
- set {_size} to 0
- loop 9 times:
- set {_name} to loop-number -1
- set slot {_name} of player's current inventory to {_clone_%{_name}%}
- subtract 1 from {_turns}
- play "UI_BUTTON_CLICK" to player at volume 1
- {_turns} = 0:
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- give player {_clone_4}
- remove player's tool from player's inventory
- stop loop
- add 1 ticks to {_wait}
- wait {_wait}
- set {_c1} to 4
- set {_c2} to 4
- wait 2 seconds
- loop 5 times:
- {Votegui.%player%} is true:
- set slot {_c1} of player's current inventory to green stained glass pane named " "
- set slot {_c2} of player's current inventory to green stained glass pane named " "
- add 1 to {_c1}
- subtract 1 from {_c2}
- play "BLOCK_LAVA_EXTINGUISH" to player at volume 1
- wait 5 ticks
- else:
- stop
- set {_c1} to 8
- set {_c2} to 0
- loop 4 times:
- {Votegui.%player%} is true:
- set slot {_c1} of player's current inventory to red stained glass pane named " "
- set slot {_c2} of player's current inventory to red stained glass pane named " "
- add 1 to {_c2}
- subtract 1 from {_c1}
- play "BLOCK_LAVA_EXTINGUISH" to player at volume 1
- wait 5 ticks
- else:
- stop
- {_clone_4} is not air:
- {Votegui.%player%} is true
- set slot 4 of player's current inventory to {_clone_4} named "&cDein Gewinn"
- else:
- {Votegui.%player%} is true:
- set slot 4 of player's current inventory to barrier named "&4Du hast nichts gewonnen"
- wait 5 seconds
- stop
- else:
- player's tool is music disc
- remove player's tool from player's inventory
- stop
- on inventory click:
- if event-inventory is metadata tag "CrateGui" of player:
- cancel event
- if {Votegui.%player%} is true:
- cancel event
- on drop:
- if {Votegui.%player%} is true:
- cancel event
- on login:
- set {Votegui.%player%} to false
- on inventory close:
- set {Votegui.%player%} to false
Add Comment
Please, Sign In to add comment