on rightclick on ender chest:
name of player's tool is "&4Anahtar":
cancel event
remove 1 tripwire hook named "&4Anahtar" from player
chance of 100%:
give 16 coal to player
give 16 lapis lazuli to player
chance of 50%:
give 16 iron ingot to player
give 16 gold ingot to player
chance of 10%:
give 16 diamond to player
give 16 emerald to player
give 1 tripwire hook named "&4Anahtar" to player
command /anahtar:
trigger:
if player's money is greater than 99:
give 1 tripwire hook named "&4Anahtar" to player
remove 100 from the player's balance
send "&a1 Anahtar Aldin Gule Gule Kullan! &c-$100"
else:
send "&cYeterli paran Yok!"