Guest User

RApostar

a guest
Aug 22nd, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.85 KB | None | 0 0
  1. # ▒██████ ▒██████████ #
  2. # ▒██ ▒██ ▒████ ▒███████ ▒████ ▒███████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██████ ▒██ ▒██████ ▒████████ ▒████████ #
  3. # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▀▀ #
  4. # ▒██ ▒██ ▒██ ▒██ ▒███████ ▒██ ▒██ ▒███████ ▒██ ▒██████████ ▒████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒████████ #
  5. # ▒██████ ▒████████ ▒██ ▒████████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██████ ▒██ ▒██████ ▒██ ▒██ #
  6. # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ #
  7. # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒███████ ▒███████ ▒██████████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒████████ #
  8.  
  9.  
  10. variables:
  11. {tempoparaapostar.%player%} = false
  12. {ganhouapostas.%player%} = 0
  13. {perdeuaposta.%player%} = 0
  14.  
  15.  
  16. function SpawnApostador(p: player):
  17. spawn a villager at location of {_p}
  18. set name of last spawned villager to "&c&lAPOSTADOR"
  19. add "{NoAI:1}" to nbt of last spawned villager
  20. add "{Gravity:1}" to nbt of last spawned villager
  21.  
  22. function RemoveApostador(p: player):
  23. loop all entities:
  24. if name of loop-entity is "&c&lAPOSTADOR":
  25. clear loop-entity
  26.  
  27. on damage:
  28. if name of victim is "&c&lAPOSTADOR":
  29. if victim is villager:
  30. cancel event
  31.  
  32. on join:
  33. set {tempoparaapostar.%player%} to false
  34.  
  35.  
  36. on rightclick on villager:
  37. if name of clicked entity is "&c&lAPOSTADOR":
  38. cancel event
  39. make player execute command "apostadorapostar"
  40.  
  41. on inventory click:
  42. if inventory name of player's current inventory is "&8Central de apostas":
  43. cancel event
  44.  
  45. command /apostadorapostar [<text>]:
  46. trigger:
  47. if arg 1 is not set:
  48. open chest with 4 rows named "&8Central de apostas" to player
  49. wait 2 tick
  50. format slot 4 of player with paper named "&cAjuda do apostador" with lore "||&7Olá %player% ,sou o apostador.||||&7Será que esse é seu dia de sorte?||&7Venha apostar comigo, para testar||&7sua sorte.||||&7Suas estatisticas:||&7Ganhou: &f%{ganhouapostas.%player%}%||&7Perdeu: &f%{perdeuaposta.%player%}%||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to be unstealable
  51. format slot 20 of player with light green wool named "&aApostar 10000 moedas" with lore "||&7Se você der sorte vai receber||&7em dobro o valor apostado||||&7Boa sorte!||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to close then run [make player execute command "/apostadorapostar 10000"]
  52. format slot 21 of player with green wool named "&aApostar 20000 moedas" with lore "||&7Se você der sorte vai receber||&7em dobro o valor apostado.||||&7Boa sorte!||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to close then run [make player execute command "/apostadorapostar 20000"]
  53. format slot 22 of player with light blue wool named "&aApostar 30000 moedas" with lore "||&7Se você der sorte vai receber||&7em dobro o valor apostado.||||&7Boa sorte!||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to close then run [make player execute command "/apostadorapostar 30000"]
  54. format slot 23 of player with blue wool named "&aApostar 40000 moedas" with lore "||&7Se você der sorte vai receber||&7em dobro o valor apostado.||||&7Boa sorte!||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to close then run [make player execute command "/apostadorapostar 40000"]
  55. format slot 24 of player with gray wool named "&aApostar 50000 moedas" with lore "||&7Se você der sorte vai receber||&7em dobro o valor apostado.||||&7Boa sorte!||||&cATENÇÃO:||&7A staff não devolve moedas.||||&f" to close then run [make player execute command "/apostadorapostar 50000"]
  56. if arg 1 is "10000":
  57. if player's balance is more or equal to 10000:
  58. if {tempoparaapostar.%player%} is false:
  59. remove 10000 from player's balance
  60. set {tempoparaapostar.%player%} to true
  61. send player title "&cApostador" with subtitle "&7Você apostou 10000 moedas." for 2 seconds
  62. wait 2 seconds
  63. send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
  64. wait 5 seconds
  65. chance of 70%:
  66. send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
  67. add 1 to {perdeuaposta.%player%}
  68. wait 20 seconds
  69. set {tempoparaapostar.%player%} to false
  70. chance of 30%:
  71. add 20000 to player's balance
  72. send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
  73. add 1 to {ganhouapostas.%player%}
  74. wait 20 seconds
  75. set {tempoparaapostar.%player%} to false
  76. else:
  77. send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
  78. else:
  79. send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
  80. if arg 1 is "20000":
  81. if player's balance is more or equal to 20000:
  82. if {tempoparaapostar.%player%} is false:
  83. remove 20000 from player's balance
  84. set {tempoparaapostar.%player%} to true
  85. send player title "&cApostador" with subtitle "&7Você apostou 20000 moedas." for 2 seconds
  86. wait 2 seconds
  87. send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
  88. wait 5 seconds
  89. chance of 80%:
  90. send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
  91. add 1 to {perdeuaposta.%player%}
  92. wait 20 seconds
  93. set {tempoparaapostar.%player%} to false
  94. chance of 20%:
  95. add 40000 to player's balance
  96. send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
  97. add 1 to {ganhouapostas.%player%}
  98. wait 20 seconds
  99. set {tempoparaapostar.%player%} to false
  100. else:
  101. send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
  102. else:
  103. send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
  104. if arg 1 is "30000":
  105. if player's balance is more or equal to 30000:
  106. if {tempoparaapostar.%player%} is false:
  107. remove 30000 from player's balance
  108. set {tempoparaapostar.%player%} to true
  109. send player title "&cApostador" with subtitle "&7Você apostou 30000 moedas." for 2 seconds
  110. wait 2 seconds
  111. send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
  112. wait 5 seconds
  113. chance of 90%:
  114. send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
  115. add 1 to {perdeuaposta.%player%}
  116. wait 20 seconds
  117. set {tempoparaapostar.%player%} to false
  118. chance of 10%:
  119. add 60000 to player's balance
  120. send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
  121. add 1 to {ganhouapostas.%player%}
  122. wait 20 seconds
  123. set {tempoparaapostar.%player%} to false
  124. else:
  125. send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
  126. else:
  127. send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
  128. if arg 1 is "40000":
  129. if player's balance is more or equal to 40000:
  130. if {tempoparaapostar.%player%} is false:
  131. remove 40000 from player's balance
  132. set {tempoparaapostar.%player%} to true
  133. send player title "&cApostador" with subtitle "&7Você apostou 40000 moedas." for 2 seconds
  134. wait 2 seconds
  135. send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
  136. wait 5 seconds
  137. chance of 92%:
  138. send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
  139. add 1 to {perdeuaposta.%player%}
  140. wait 20 seconds
  141. set {tempoparaapostar.%player%} to false
  142. chance of 8%:
  143. add 80000 to player's balance
  144. send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
  145. add 1 to {ganhouapostas.%player%}
  146. wait 20 seconds
  147. set {tempoparaapostar.%player%} to false
  148. else:
  149. send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
  150. else:
  151. send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
  152. if arg 1 is "50000":
  153. if player's balance is more or equal to 50000:
  154. if {tempoparaapostar.%player%} is false:
  155. remove 50000 from player's balance
  156. set {tempoparaapostar.%player%} to true
  157. send player title "&cApostador" with subtitle "&7Você apostou 50000 moedas." for 2 seconds
  158. wait 2 seconds
  159. send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
  160. wait 5 seconds
  161. chance of 99%:
  162. send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
  163. add 1 to {perdeuaposta.%player%}
  164. wait 20 seconds
  165. set {tempoparaapostar.%player%} to false
  166. chance of 1%:
  167. add 100000 to player's balance
  168. send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
  169. add 1 to {ganhouapostas.%player%}
  170. wait 20 seconds
  171. set {tempoparaapostar.%player%} to false
  172. else:
  173. send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
  174. else:
  175. send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
  176.  
  177. command /apostador [<text>]:
  178. trigger:
  179. if player has permission "apostador.admin.usar":
  180. if arg 1 is "spawnar":
  181. send player title "&cApostador" with subtitle "&7Foi setado com sucesso." for 2 seconds
  182. SpawnApostador(player)
  183. if arg 1 is "despawn":
  184. send player title "&cApostador" with subtitle "&7Foi removido com sucesso." for 2 seconds
  185. RemoveApostador(player)
  186. if arg 1 is not "despawn" or "spawnar":
  187. send player title "&cErro" with subtitle "&7Use /apostador spawnar/despawn" for 2 seconds
  188. if arg 1 is not set:
  189. send player title "&cErro" with subtitle "&7Use /apostador spawnar/despawn" for 2 seconds
  190. else:
  191. send player title "&cErro" with subtitle "&7Sem permissão para isso." for 2 seconds
Advertisement
Add Comment
Please, Sign In to add comment