Advertisement
LJack2k

Welcome Computer

Nov 7th, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. function DeviceDetect(DeviceName)
  4. DeviceSide="none"
  5. for k,v in pairs(redstone.getSides()) do
  6. if peripheral.getType(v)==DeviceName then
  7.    DeviceSide = v
  8.    break
  9. end
  10. end
  11.   return(DeviceSide)
  12. end
  13.  
  14. function newLine(text)
  15.   local _,cY= m.getCursorPos()
  16.   m.setCursorPos(1,cY+1)
  17.   m.write(text)
  18. end
  19.  
  20. MonitorSide=DeviceDetect("monitor")
  21. print ("Monitor on side:"..MonitorSide)
  22. m = peripheral.wrap(MonitorSide)
  23. m.setTextScale(0.5)
  24. m.clear()
  25. m.setCursorPos(1, 0)
  26. newLine("             WELCOME AT")
  27. newLine("            LJSpace Inc.")
  28. newLine("=====================================")
  29. newLine("   Safety rule: ")
  30. newLine("     Don't run over the edges!")
  31. newLine("   If you lose your head,")
  32. newLine("     it will be my property.")
  33. newLine("   Do you have food, if not, ask!")
  34. newLine("   Most of all: Enjoy your stay.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement