Advertisement
Guest User

Untitled

a guest
Nov 7th, 2020
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. #WORKS
  2. #checks if at least two players are online. if so, give the all players a gray dye.
  3. every second:
  4. if {players} is greater than 1:
  5. if {dontudarestackvote} is false:
  6. if {game} is false:
  7. if {start} is false:
  8. set {dontudarestackvote} to true
  9. play raw sound "note.pling" at all players with pitch 1.189207f volume 100
  10. broadcast "&f"
  11. 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."
  12. broadcast "&f"
  13. loop all players:
  14. 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---------------------------"
  15.  
  16. #DOESN'T WORK
  17. #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.
  18. on rightclick holding dye:
  19. if player's tool is a gray dye named "&7&lVote Start":
  20. remove 1 gray dye from player's inventory
  21. 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---------------------------"
  22. add 1 to {votestart}
  23. set {playersleftvote} to {players} - {votestart}
  24. broadcast "&4&l> &c%player% &fwants the game to start! &c%{playersleftvote}% &fneeded to start the game"
  25. else if player's tool is a lime dye named "&a&lVote Start":
  26. remove 1 gray dye from player's inventory
  27. 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---------------------------"
  28. subtract 1 from {votestart}
  29. set {playersleftvote} to {players} - {votestart}
  30. 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