Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------- Giveaway Create Command ---------------
- $eval
- prize = '$messageAfterCommand'
- var check2 = (check2 == null) ? 0 : check2 += 1
- if(typeof started === "undefined" && check2 === 0 && prize !== '') {var reply = "**A Giveaway has been started by $name!!**\n**Prize :**__" + prize + "__\n> Do `.join` to join!!"
- started = "true"
- arr = []}
- if(check2 > 0) {var reply = "A Giveaway is already being ran rn... end it to create a new one!\n**End it using `.ga end`"}
- if(prize === '') {var reply = "You need to set a prize!\n**Usage Example: `.ga create nitro classic`**"
- delete check2}
- $halt
- $get(reply)
- -------------- Giveaway Join Command ---------------
- $eval
- var mess = '$ID'
- var check = "true"
- if(typeof safety === 'undefined') {var safety = 1}
- if(safety === 1) {
- var safety = safety + 1
- var check = "false"}
- if(typeof started !== 'undefined') {
- if(arr.indexOf("$ID") !== -1){
- var reply = "**You have already joined this giveaway >:O**"
- var check3 = "false"
- } else{
- var reply = "**You have joined the giveaway :D**"
- check3 = "true"
- var array = '• `@' + "$namePlain" + '`'
- if(safety === 2 && check !== "false") {
- var array2 = array + '\n• `@' + "$namePlain" + '`'}
- if(safety === 2 && check !== "false") {var array3 = array2
- var array = array2}
- if(safety === 2 && check === "false") {var array3 = array}
- }
- if(check3 === "true") {arr.push(mess);}
- }
- if(typeof started === 'undefined') {var reply = "**No Giveaway has been started by the mods...**"}
- $halt $get(reply)
- -------------- Giveaway Participants Command ---------------
- $eval
- if(typeof started === "undefined") {var reply = "No Giveaway has been started yet..."
- }else if(typeof array3 === "undefined") {var reply = "No-one has joined the giveaway..."
- }else {var reply = "**__People Currently Contesting :~__**\n> " + array3}
- $halt $get(reply)
- -------------- Giveaway End Command ---------------
- $eval
- if(typeof arr === 'undefined' && typeof started === 'undefined') {var reply2 = "No giveaway has been started to end"}
- else{
- var reply = arr[Math.floor(Math.random() * arr.length)]
- delete started
- delete arr
- delete check
- delete check2
- delete check3
- var reply2 = "**Giveaway has ended!**\n<@" + reply + "> won!! 🎉🎉";
- }
- $halt
- $get(reply2)
- ----------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement