Updated bank script and functions, thanks to @ninjalulz , fixes #770