Rahph

ActivateCraftOS

Oct 10th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _G.term.reset = function()
  2.     term.clear()
  3.     term.setCursorPos(1,1)
  4.     term.setBackgroundColor(colors.black)
  5.     term.setTextColor(colors.white)
  6. end
  7. term.reset()
  8. parallel.waitForAny(
  9.     function()
  10.         shell.run("shell")
  11.     end,
  12.     function()
  13.         local text  = "Activate CraftOS                   "
  14.         local text2 = "Go to Settings to activate CraftOS."
  15.         local offsetX = 2
  16.         local offsetY = 1
  17.         while true do
  18.             local oldx, oldy = term.getCursorPos()
  19.             local oldtc = term.getTextColor()
  20.             --local oldbc = term.getBackgroundColor()
  21.             term.setTextColor(colors.gray)
  22.             local tx, ty = term.getSize()
  23.             local x = tx - offsetX - #text2
  24.             local y = ty - offsetY - 2
  25.             term.setCursorPos(x,y)
  26.             term.write(text)
  27.             term.setCursorPos(x,y+1)
  28.             term.write(text2)
  29.             term.setCursorPos(oldx,oldy)
  30.             term.setTextColor(oldtc)
  31.             sleep(0.05)
  32.         end
  33.     end
  34. )
Add Comment
Please, Sign In to add comment