Runnetty

BankSystem-startup

May 16th, 2021 (edited)
273
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local showList=false
  2. --Funcs
  3. os.loadAPI("button")
  4. os.loadAPI("accounts.lua")
  5. accounts.init()
  6. m = peripheral.wrap("top")
  7. m.clear()
  8. local oldterm = term.redirect(m)
  9.  
  10. function fillTable()
  11.   --button.setTable("List",toggleList,1,10,2,2)
  12.   --button.setTable("M0rt0sh",workshop,1,1,1,1)
  13.   --button.screen()
  14. end
  15.  
  16. function getClick()
  17.   --event,side,x,y = os.pullEvent("monitor_touch")
  18.   --button.checkxy(x, y)
  19. end
  20.  
  21. function list()
  22.   --button.flash()
  23. --all underneath this you can edit the fuction to you own needs.
  24. --paintutils.drawLine(3, 3, 3, 5 ,colours.green)
  25. a = accounts.getAccounts()
  26. m.setCursorPos(1, 3)
  27. for i = 1, #a do
  28.     m.setTextColor(colors.green)
  29.     write(a[i].name,1,3+i)
  30.    m.setTextColor(colors.white)
  31.     write(" has ",1,3+i)
  32.     m.setTextColor(colors.green)
  33.     write(a[i].cash,1,3+i)
  34.     m.setTextColor(colors.white)
  35.     write("$. Using: ",1,3+i)
  36.     m.setTextColor(colors.green)
  37.     write(a[i].FPT,1,3+i)
  38.     m.setTextColor(colors.white)
  39.     write(" FE/t\n",1,3+i)
  40. end
  41. end
  42.  
  43. while true do
  44.     m.clear()
  45.     list()
  46. end
  47.  
RAW Paste Data