Advertisement
rithrin

USpawn

Aug 12th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. args = {...}
  2. Name = (args[1])
  3. local pos = 10
  4. mon = peripheral.wrap("left") -- Replace side with the side that the monitor is on
  5. mon.clear()
  6. color = 1
  7. mon.setBackgroundColor(color)
  8. mon.setTextColor(32768) -- This makes the text black the full list is on the CC wiki
  9. mon.setTextScale(5) -- This is the largest text scale you can make
  10. while true do
  11. if pos==-10 then
  12. pos = 10
  13. end
  14. mon.clear()
  15. mon.setCursorPos(pos,1)
  16. mon.write(Name)
  17. pos = pos-1
  18. os.sleep(0.15) -- Replace 0.15 with any number you want (In seconds)
  19. if (color < 16000) then
  20. color = color + color
  21. else
  22. color = 1
  23. end
  24. mon.setBackgroundColor(color)
  25. end
  26.  
  27. local function centerText(text)
  28. x,y = m.getSize()
  29. x1,y1 = m.getCursorPos()
  30. m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
  31. m.write(text)
  32. end
  33.  
  34. --Call function "centerText("")" to set text
  35. --Use m.setCursorPos(1,y) to choose placement on screen
  36. m.setTextColor(colors.yellow)
  37. centerText("APPLY")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement