code_language.skript:
aliases:
10euro = 4105
20euro = 4106
50euro = 4107
100euro = 4108
200euro = 4109
500euro = 4110
on rightclick on bedrock:
open chest with 3 rows named "&2ATM &e➤ Compte en banque" to player
format slot 11 of player with lime stained glass pane named "&2Déposer" to run [make player execute command "/§atmdeposer"]
format slot 13 of player with dipomoneymod wallet named "&aArgent" with lore " &e➤ &2%player's balance%" to be unstealable
format slot 15 of player with red stained glass pane named "&4Retirer" to run [make player execute command "/§atmretirer"]
command /§atmdeposer:
trigger:
open chest with 1 rows named "&2Déposer &e➤" to player
format slot 0 of player with 10euro named "&f10€" to run [make player execute command "/§atm10"]
format slot 1 of player with 20euro named "&f20€" to run [make player execute command "/§atm20"]
format slot 2 of player with 50euro named "&f50€" to run [make player execute command "/§atm50"]
format slot 3 of player with 100euro named "&f100€" to run [make player execute command "/§atm100"]
format slot 4 of player with 200euro named "&f200€" to run [make player execute command "/§atm200"]
format slot 5 of player with 500euro named "&f500€" to run [make player execute command "/§atm500"]
format slot 6 of player with white stained glass pane named " " to be unstealable
format slot 7 of player with hopper named "&f&lTout Déposer" to be unstealable
format slot 8 of player with white stained glass pane named " " to be unstealable
command /§atm10:
trigger:
if player's inventory contains 1 10euro named "10euro":
remove 1 10euro from player's inventory
add 10 to player's balance
send "&6&l[&e&lATM&6&l] &2&l➤ &aTransaction effectuée avec succès!" to sender
else:
send "&6&l[&e&lATM&6&l] &2&l➤ &cArgent insufisant" to sender
Posted by: vqzr from the skUnity Discord. View the thread on skUnity Discord here