Consider doing the following for balance:
NPC Code:
SELECT money
FROM bank
WHERE account = player.account
And use the same where clause in your other select queries, instead of cycling through an array every time.
As well as adding functions for each feature (Depositing, Withdrawing, Balance), so it's at least re-usable instead of keeping it nested in the onPlayerChats function.
Other than that, good work.