Theshadow989

[xOS] Intro

Jan 9th, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. local verNumber = "Alpha 1.24"
  2. local nOption = 1
  3.  
  4. os.pullEvent = os.pullEventRaw
  5.  
  6. local x = term.getSize()
  7.  
  8. local function cPrint(string)
  9.         x, _ = term.getSize()
  10.         _, y = term.getCursorPos()
  11.         term.setCursorPos((x-#string)/2,y)
  12.         textutils.slowPrint(string)
  13. end
  14.  
  15. local function kPrint(string)
  16.         x, _ = term.getSize()
  17.         _, y = term.getCursorPos()
  18.         term.setCursorPos((x-#string)/2,y)
  19.         write(string)
  20. end
  21.  
  22. term.clear()
  23.  
  24. term.setCursorPos(1,2)
  25.  
  26. cPrint("xOS "..verNumber)
  27. sleep(2)
  28.  
  29. term.setCursorPos(1,6)
  30.  
  31. cPrint("Detecting first time setup...")
  32. sleep(1)
  33.  
  34. term.setCursorPos(1,8)
  35. kPrint("Welcome to xOS! You have selected")
  36. term.setCursorPos(1,9)
  37. kPrint("to download the locked version")
  38. term.setCursorPos(1,10)
  39. kPrint("of this operating system.")
  40. term.setCursorPos(1,11)
  41. kPrint("To continue you will need to create")
  42. term.setCursorPos(1,12)
  43. kPrint("an account to access this system.")
  44. term.setCursorPos(1,15)
  45. kPrint("Press ENTER to continue.")
  46.  
  47. while true do
  48. event, p1 = os.pullEvent()
  49. if event == "key" then
  50.   if p1 == 28 then
  51.    shell.run("xos/.addaccounts")
  52.   end
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment