Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ▒██████ ▒██████████ #
- # ▒██ ▒██ ▒████ ▒███████ ▒████ ▒███████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██████ ▒██ ▒██████ ▒████████ ▒████████ #
- # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▀▀ #
- # ▒██ ▒██ ▒██ ▒██ ▒███████ ▒██ ▒██ ▒███████ ▒██ ▒██████████ ▒████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒████████ #
- # ▒██████ ▒████████ ▒██ ▒████████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██████ ▒██ ▒██████ ▒██ ▒██ #
- # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ #
- # ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒███████ ▒███████ ▒██████████ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒████████ #
- variables:
- {tempoparaapostar.%player%} = false
- {ganhouapostas.%player%} = 0
- {perdeuaposta.%player%} = 0
- function SpawnApostador(p: player):
- spawn a villager at location of {_p}
- set name of last spawned villager to "&c&lAPOSTADOR"
- add "{NoAI:1}" to nbt of last spawned villager
- add "{Gravity:1}" to nbt of last spawned villager
- function RemoveApostador(p: player):
- loop all entities:
- if name of loop-entity is "&c&lAPOSTADOR":
- clear loop-entity
- on damage:
- if name of victim is "&c&lAPOSTADOR":
- if victim is villager:
- cancel event
- on join:
- set {tempoparaapostar.%player%} to false
- on rightclick on villager:
- if name of clicked entity is "&c&lAPOSTADOR":
- cancel event
- make player execute command "apostadorapostar"
- on inventory click:
- if inventory name of player's current inventory is "&8Central de apostas":
- cancel event
- command /apostadorapostar [<text>]:
- trigger:
- if arg 1 is not set:
- open chest with 4 rows named "&8Central de apostas" to player
- wait 2 tick
- 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
- 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"]
- 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"]
- 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"]
- 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"]
- 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"]
- if arg 1 is "10000":
- if player's balance is more or equal to 10000:
- if {tempoparaapostar.%player%} is false:
- remove 10000 from player's balance
- set {tempoparaapostar.%player%} to true
- send player title "&cApostador" with subtitle "&7Você apostou 10000 moedas." for 2 seconds
- wait 2 seconds
- send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
- wait 5 seconds
- chance of 70%:
- send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
- add 1 to {perdeuaposta.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- chance of 30%:
- add 20000 to player's balance
- send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
- add 1 to {ganhouapostas.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- else:
- send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
- else:
- send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
- if arg 1 is "20000":
- if player's balance is more or equal to 20000:
- if {tempoparaapostar.%player%} is false:
- remove 20000 from player's balance
- set {tempoparaapostar.%player%} to true
- send player title "&cApostador" with subtitle "&7Você apostou 20000 moedas." for 2 seconds
- wait 2 seconds
- send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
- wait 5 seconds
- chance of 80%:
- send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
- add 1 to {perdeuaposta.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- chance of 20%:
- add 40000 to player's balance
- send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
- add 1 to {ganhouapostas.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- else:
- send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
- else:
- send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
- if arg 1 is "30000":
- if player's balance is more or equal to 30000:
- if {tempoparaapostar.%player%} is false:
- remove 30000 from player's balance
- set {tempoparaapostar.%player%} to true
- send player title "&cApostador" with subtitle "&7Você apostou 30000 moedas." for 2 seconds
- wait 2 seconds
- send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
- wait 5 seconds
- chance of 90%:
- send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
- add 1 to {perdeuaposta.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- chance of 10%:
- add 60000 to player's balance
- send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
- add 1 to {ganhouapostas.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- else:
- send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
- else:
- send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
- if arg 1 is "40000":
- if player's balance is more or equal to 40000:
- if {tempoparaapostar.%player%} is false:
- remove 40000 from player's balance
- set {tempoparaapostar.%player%} to true
- send player title "&cApostador" with subtitle "&7Você apostou 40000 moedas." for 2 seconds
- wait 2 seconds
- send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
- wait 5 seconds
- chance of 92%:
- send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
- add 1 to {perdeuaposta.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- chance of 8%:
- add 80000 to player's balance
- send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
- add 1 to {ganhouapostas.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- else:
- send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
- else:
- send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
- if arg 1 is "50000":
- if player's balance is more or equal to 50000:
- if {tempoparaapostar.%player%} is false:
- remove 50000 from player's balance
- set {tempoparaapostar.%player%} to true
- send player title "&cApostador" with subtitle "&7Você apostou 50000 moedas." for 2 seconds
- wait 2 seconds
- send player title "&cApostador" with subtitle "&7Sorteando..." for 5 seconds
- wait 5 seconds
- chance of 99%:
- send player title "&cApostador" with subtitle "&7Você perdeu a aposta." for 2 seconds
- add 1 to {perdeuaposta.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- chance of 1%:
- add 100000 to player's balance
- send player title "&cApostador" with subtitle "&7Você ganhou a aposta." for 2 seconds
- add 1 to {ganhouapostas.%player%}
- wait 20 seconds
- set {tempoparaapostar.%player%} to false
- else:
- send player title "&cApostador" with subtitle "&7Aguarde para postar novamente" for 2 seconds
- else:
- send player title "&cApostador" with subtitle "&7Seu saldo é insuficiente." for 2 seconds
- command /apostador [<text>]:
- trigger:
- if player has permission "apostador.admin.usar":
- if arg 1 is "spawnar":
- send player title "&cApostador" with subtitle "&7Foi setado com sucesso." for 2 seconds
- SpawnApostador(player)
- if arg 1 is "despawn":
- send player title "&cApostador" with subtitle "&7Foi removido com sucesso." for 2 seconds
- RemoveApostador(player)
- if arg 1 is not "despawn" or "spawnar":
- send player title "&cErro" with subtitle "&7Use /apostador spawnar/despawn" for 2 seconds
- if arg 1 is not set:
- send player title "&cErro" with subtitle "&7Use /apostador spawnar/despawn" for 2 seconds
- else:
- send player title "&cErro" with subtitle "&7Sem permissão para isso." for 2 seconds
Advertisement
Add Comment
Please, Sign In to add comment