on place of chest:
name of player's tool is "&a[&8LuckyBlock&a]":
set {lucky.%block%} to true
on break of chest:
{lucky.%block%} is true:
set {lucky.%block%} to false
command /luckyblock:
trigger:
player's money is greater than 500:
execute console command "eco take %player% 500"
give a chest named "&a[&8LuckyBlock&a]" to player
on rightclick on a chest:
if {lucky.%clicked block%} is true:
cancel event
send "&a[&8LuckyBlock&a] &3&lBir LuckyBlock Açıyorsun."
wait 1 seconds
send "&a[&8LuckyBlock&a] &3&lLuckyBlock Açılıyor. #3 saniye"
wait 3 seconds
set clicked block to air
chance of 2%:
execute console command "eco give %player% 150000"
send "&a[&8LuckyBlock&a] &c150.000 kazandın."
broadcast "&a[&8LuckyBlock&a] &9&l%player% &c&l150.500 Kazandı!"
chance of 70%:
give 1 stone to player
send "&a[&8LuckyBlock&a] &cŞansına küs taş çıktı."
chance of 15%:
give 1 diamond to player
send "&a[&8LuckyBlock&a] &cHadi yine şanslısın elmas kazandın"