1c7

COINFLIP - Version 1

1c7
Mar 13th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. # Coinflip
  2. # by plugins.pixelservers.org
  3.  
  4. command /cf [<integer>] [<text>]:
  5. aliases: coinflip
  6. trigger:
  7. if arg-1 is set:
  8. if arg-2 is "heads" or "tails":
  9. if player's balance is greater than or equal to arg-1:
  10. if arg-1 is greater than or equal to 10:
  11. set {_flip} to a random integer between 1 and 2
  12. if {_flip} is 1:
  13. set {_coin} to "heads"
  14. if {_coin} is equal to arg-2:
  15. send "&b&l[CF] &6You have won! Congratulations."
  16. add arg-1 to {_money}
  17. add arg-1 to {_money}
  18. console command "/eco give %executor% %{_money}%"
  19. else:
  20. send "&b&l[CF] &6You have lost! Sorry."
  21. console command "/eco take %executor% %{_money}%"
  22. else if {_flip} is 2:
  23. set {_coin} to "tails"
  24. if {_coin} is arg-2:
  25. send "&b&l[CF] &6You have won! Congratulations."
  26. add arg-1 to {_money}
  27. add arg-1 to {_money}
  28. console command "/eco give %executor% %{_money}%"
  29. else:
  30. send "&b&l[CF] &6You have lost! Sorry."
  31. console command "/eco take %executor% %{_money}%"
  32. else:
  33. send "&b&l[CF] &6Sorry, but the minium bet is $10."
  34. else:
  35. send "&b&l[CF] &6You do not have enough money."
  36. else:
  37. send "&b&l[CF] &6Syntax: /cf <Bet> <Heads/Tails>"
  38. else:
  39. send "&b&l[CF] &6Please enter a bet. (Syntax: /cf <Bet> <Heads/Tails>)"
Advertisement
Add Comment
Please, Sign In to add comment