Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ATMApi.lua")
- os.pullEvent = os.pullEventRaw
- message = ATMApi.getCardData()
- local w,h = term.getSize()
- local t_name = "Name: "
- local t_bal = "Balance: "
- local t_num = "Number: "
- local back_button = "[ Back ]"
- function update()
- term.clear()
- ATMApi.printCent(math.floor(h/2) - 2, t_name .. message.name)
- ATMApi.printCent(math.floor(h/2) - 1, t_num .. message.num)
- ATMApi.printCent(math.floor(h/2) - 0, t_bal .. message.bal)
- ATMApi.printCent(math.floor(h/2) + 2, back_button)
- end
- update()
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.enter then
- if ATMApi.cardIn() == true then shell.run("main_menu")
- else shell.run("main")
- end
- end
- update()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement