• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Jun 5, 2022
4
0
1
24
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}
 
Status
Not open for further replies.