Command that has a 20 percent chance

So i want to have a comand that has a 20 percent chance of returning a YOU HIT THE BLUE DOT 8 point and the other 80 percent it returns a U MISSED u scored 0

Does this work? Im not great with coding so please let me know if it does or doesn’t!

!addcom !shoot $(eval var roll = Math.floor(Math.random() * 100) + 1; if (roll <= 20) { "YOU HIT THE BLUE DOT! 8 points" } else { "U MISSED. You scored 0" })

1 Like

it worked thank you so much

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.