#Bank script

1 messages · Page 1 of 1 (latest)

hardy ledge
#

Ive made a bank script and dont know why it wont work
command /bank: trigger: openbank(player) function openbank(P: Player): set {_bank} to chest with 1 row named "Bank" set slot 3 of {_bank} to green wool named "Withdraw" with lore "&8Take out money" set slot 4 of {_bank} to red wool named "Deposit" with lore "&8Put in money" set slot 5 of {_bank} to blue wool named "Request" with lore "&8Take out money" set slot 7 of {_bank} to barrier named "&cClose" set slot 0,1,2,6, and 8 of {_bank} to black stained glass pane named " " open {_bank} to {_P} on inventory click: if name of player's current inventory contains "Bank": cancel event clicked slot != black stained glass pane: clicked slot != air: clicked slot is 3: close player's inventory withdraw(player) function withdraw(P:Player): set {_withdraw} to chest with 1 row named "Withdraw" set slot 0, and 8 of {_withdraw} to black stained glass pane named " " set slot 1 of {_withdraw} to paper named "Withdraw" with lore "&2$1" set slot 2 of {_withdraw} to paper named "Withdraw" with lore "&2$5" set slot 3 of {_withdraw} to paper named "Withdraw" with lore "&2$10" set slot 4 of {_withdraw} to paper named "Withdraw" with lore "&2$20" set slot 5 of {_withdraw} to paper named "Withdraw" with lore "&2$50" set slot 6 of {_withdraw} to paper named "Withdraw" with lore "&2$64" set slot 7 of {_withdraw} to barrier named "&cClose" open {_withdraw} to {_P}

placid palm
#

it's chest inventory

hardy ledge
#

oh

#

what line?

placid palm
#

line 5 from your error

hardy ledge
#

alr

#

will it be

#

set chest inventory to chest with 1 row "bank"

placid palm
#

set {_variable} to chest inventory with 1 row with name "name"

hardy ledge
#

alr ima test it

#

still one error

#

set {_withdraw} to chest with 1 row named "Withdraw"

#

thats what I have

floral mantle
#

do the same thing...

hardy ledge
#

alr

floral mantle
#

chest inventory not chest

hardy ledge
#

it wont pop any gui

#

there is no gui

#

with no errors

placid palm
#

you need to open the gui

#
open {_var} to player```
hardy ledge
#

Alr

#

thanks

#

it works

placid palm
#

oh sorry

#

you already did that

#

lol

hardy ledge
#

on inventory click: if name of player's current inventory contains "Withdraw": cancel event clicked slot != black stained glass pane: clicked slot != air: clicked slot is 22: close player's inventory withdraw(player)

#

I need that script to go back to the main pagee

#

Idk how to do that

forest niche
#

code blocks are 3 `

#

then they span multiple lines

wicked glen
#

So u want that skript to open the previous gui?