Advertisement
Guest User

startup.lua

a guest
Nov 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.40 KB | None | 0 0
  1. function cls()
  2.     term.clear()    
  3.     term.setCursorPos()
  4. end
  5.  
  6. function name()
  7.     local name = user
  8.     cls()
  9.     write("What would you like your name to be?")
  10.     name = read()
  11.     password()
  12. end    
  13.  
  14. function password()
  15.     local password = admin
  16.     write("Welcome "..first..", Type a password you'd want to use.")
  17.     password = read()
  18. end
  19.    
  20. function first_name()
  21.     if name == nil then
  22.     name()
  23.     end
  24. end          
  25.  
  26. function first_password()
  27.     if password == nil then
  28.     password()
  29.     end
  30. end
  31.  
  32.                                                                                                                                          
  33.                                                                                                                                                                                                                                                                                  
  34. first_name()
  35. first_password()                                                                                                                                                                                                                                                                                                                                                                                                                                    
  36. print(name, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement