xXm0dzXx

Untitled

Nov 11th, 2012
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. local oldw = term.write
  2. local x,y = term.getSize()
  3.  
  4. function term.write(txt)
  5. term.setTextColor(2^math.random(1, 16)/2)
  6. return oldw(txt)
  7. end
  8.  
  9. local function cPrint(text)
  10. x2,y2 = term.getCursorPos()
  11. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  12. write(text.. "\n")
  13. end
  14.  
  15. function drawBox()
  16. term.setBackgroundColour( colors.red )
  17. term.setCursorPos(1,3)
  18. cPrint("+----Welcome-----+")
  19. cPrint("| Rainbow Virus |")
  20. cPrint("| Loaded :D |")
  21. cPrint("| |")
  22. cPrint("|The gayest virus|")
  23. cPrint("| ever |")
  24. cPrint("| :D:D |")
  25. cPrint("+----------------+")
  26. term.setBackgroundColour( colors.black )
  27. end
  28.  
  29. term.setBackgroundColour( colors.blue )
  30. term.clear()
  31. drawBox()
  32. sleep(1)
  33. term.setBackgroundColour( colors.black )
  34. while true do
  35. for i=1,100 do
  36. term.setCursorPos( math.random( x ), math.random( y ) )
  37. write( math.random( 9 ) )
  38.  
  39. drawBox()
  40. end
  41. sleep(0)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment