Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #WORKS
- #checks if at least two players are online. if so, give the all players a gray dye.
- every second:
- if {players} is greater than 1:
- if {dontudarestackvote} is false:
- if {game} is false:
- if {start} is false:
- set {dontudarestackvote} to true
- play raw sound "note.pling" at all players with pitch 1.189207f volume 100
- broadcast "&f"
- broadcast "&fThere is enough players for the game to start! You can use the &a&lVote Start &fitem in your inventory to vote for the game to start, or you can use the command &a&l/votestart&f."
- broadcast "&f"
- loop all players:
- set slot 4 of loop-player to gray dye named "&7&lVote Start" with lore "&7&m---------------------------||&fClick this item to vote for the game to be started.||&fIf all players vote for the game to be started, the game will start.||&7&m---------------------------"
- #DOESN'T WORK
- #checks to see if the dye is clicked. if the dye is gray change the dye to green, if the dye is green, change it to gray.
- on rightclick holding dye:
- if player's tool is a gray dye named "&7&lVote Start":
- remove 1 gray dye from player's inventory
- set slot 4 of player to lime dye named "&a&lVote Start" with lore "&a&m---------------------------||&fClick this item to vote for the game to be started.||&fIf all players vote for the game to be started, the game will start.||&a&m---------------------------"
- add 1 to {votestart}
- set {playersleftvote} to {players} - {votestart}
- broadcast "&4&l> &c%player% &fwants the game to start! &c%{playersleftvote}% &fneeded to start the game"
- else if player's tool is a lime dye named "&a&lVote Start":
- remove 1 gray dye from player's inventory
- set slot 4 of player to gray dye named "&7&lVote Start" with lore "&7&m---------------------------||&fClick this item to vote for the game to be started.||&fIf all players vote for the game to be started, the game will start.||&7&m---------------------------"
- subtract 1 from {votestart}
- set {playersleftvote} to {players} - {votestart}
- broadcast "&4&l> &c%player% &fremoved their vote. &c%{playersleftvote}% &fneeded to start the game"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement