Advertisement
Guest User

Untitled

a guest
Dec 1st, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. local m = peripheral.wrap("top")
  2.  
  3. User = "Androthia"
  4. Pass = "apple55"
  5.  
  6. local cPrint = function(text)
  7. local x2, y2 = term.getCursorPos()
  8. local x, y = term.getSize()
  9. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  10. print(text)
  11.  
  12. end
  13.  
  14. local Clear = function()
  15. term.clear()
  16. term.setCursorPos(1,6)
  17. end
  18.  
  19. while true do
  20. Clear()
  21. cPrint("Welcome to the Farmcraft Management System")
  22. cPrint("==========================================")
  23. cPrint("Please Enter Username")
  24. term.setCursorPos(38,8)
  25.  
  26. input1 = read()
  27. if input1 == User then
  28. cPrint("Please Enter Password")
  29. term.setCursorPos(38,9)
  30.  
  31.  
  32. input2 = read("*")
  33. if input2 == Pass then
  34. cPrint("Authenticating")
  35. term.setCursorPos(25,11)
  36. textutils.slowWrite("....", 1)
  37. Clear()
  38.  
  39. textutils.tabulate(shell.run("gui"))
  40.  
  41. break
  42.  
  43. end
  44. end
  45.  
  46. if input1 ~= User then
  47. cPrint("Access Denied")
  48. sleep(2)
  49.  
  50. elseif input2 ~= Pass then
  51. cPrint("Access Denied")
  52. sleep(2)
  53.  
  54. end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement