Usage: /votestart [option1] [option2] [time]
Code:
command /votestart <text> <text> <number = 20>:
permission: op
trigger:
set {vote1} to arg-1
set {vote2} to arg-2
set {opt1} to 0
set {opt2} to 0
open chest with 1 rows named "&bVote" to all players
format slot 3 of player with iron ingot named arg-1 with lore "&cC&4l&6i&ec&2k &at&bo &3V&1o&dt&5e&f!" to close then run [execute player command "/vote %player% %{vote1}%"]
format slot 5 of player with gold ingot named arg-2 with lore "&cC&4l&6i&ec&2k &at&bo &3V&1o&dt&5e&f!" to close then run [execute player command "/vote %player% %{vote2}%"]
broadcast "&bVoting Start..."
wait "%arg-3% seconds" parsed as timespan
broadcast "&bVoting End!"
set {total} to {opt1} + {opt2}
broadcast "&f%{vote1}%: &a%{opt1}%%newline%&f%{vote2}%: &a%{opt2}%%newline%&fTotal: &b%{total}%"
command /vote <text> <text>:
trigger:
if arg-2 is {vote1}:
broadcast "&a%arg-1% &fvoted for &b%arg-2%&f!"
add 1 to {opt1}
if arg-2 is {vote2}:
broadcast "&a%arg-1% &fvoted for &b%arg-2%&f!"
add 1 to {opt2}