Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /giveaway [<Text>] [<Text>]:
- trigger:
- if arg 1 is "join":
- if "%{giveaway::list::*}%" doesn't contain "%player%":
- add player to {giveaway::list::*}
- broadcast "&b[Giveaway] &f%player% entered the giveaway!"
- stop
- else:
- send "&b[Giveaway]&r You're already entered in the giveaway!"
- stop
- if arg 1 is "end":
- permission: op
- broadcast "&b[Giveaway]&r Giveaway ended, winner announcing shortly!"
- wait 100 ticks
- set {_result} to random player out of {giveaway::list::*}
- broadcast "&b[Giveaway] &f%{_result}% won the giveaway!"
- execute console command "/sudo * giveaway leave"
- stop
- if arg 1 is "leave":
- remove player from {giveaway::list::*}
- stop
- if arg 1 is "start":
- permission: op
- set {prize} to arg 2
- broadcast "&b[Giveaway]&r Do /giveaway join for a chance to win &b%{prize}%&r!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement