Advertisement
Hexbugman213

Untitled

Jan 3rd, 2021 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2. function lineBreak()
  3. x, y = mon.getCursorPos()
  4. if y ~= 1 then
  5. y = y + 1
  6. end
  7. mon.setCursorPos(1, y)
  8. width, height = mon.getSize()
  9. mon.write("+" .. string.rep("-", width - 2) .. "+")
  10. end
  11. function printString(sString)
  12. x, y = mon.getCursorPos()
  13. y = y + 1
  14. mon.setCursorPos(1, y)
  15. mon.write(sString)
  16. end
  17. function printStringCentre(sString)
  18. x, y = mon.getCursorPos()
  19. y = y + 1
  20. mon.setCursorPos(1, y)
  21. width, height = mon.getSize()
  22. nStringCentre = math.floor(string.len(sString) / 2)
  23. nMonitorCentre = math.floor(width / 2)
  24. x = math.floor(nMonitorCentre - nStringCentre)
  25. mon.setCursorPos(x, y)
  26. mon.write(sString)
  27. end
  28. function printStringRight(sString)
  29. width, height = mon.getSize()
  30. x, y = mon.getCursorPos()
  31. y = y + 1
  32. x = math.ceil(width - string.len(sString))
  33. mon.setCursorPos(x, y)
  34. mon.write(sString)
  35. end
  36. function scrollText(tStrings, nRate)
  37. nRate = nRate or 5
  38. if nRate < 0 then
  39. error("rate must be positive")
  40. end
  41. local nSleep = 1 / nRate
  42.  
  43. width, height = mon.getSize()
  44. x, y = mon.getCursorPos()
  45. sText = ""
  46. for n = 1, #tStrings do
  47. sText = sText .. tostring(tStrings[n])
  48. sText = sText .. ""
  49. end
  50. sString = ""
  51. if width / string.len(sText) < 1 then
  52. nStringRepeat = 3
  53. else
  54. nStringRepeat = math.ceil(width / string.len(sText) * 3)
  55. end
  56. for n = 1, nStringRepeat do
  57. sString = sString .. sText
  58. end
  59. while true do
  60. for n = 1, string.len(sText) do
  61. sDisplay = string.sub(sString, n, n + width - 1)
  62. mon.clearLine()
  63. mon.setCursorPos(1, y)
  64. mon.write(sDisplay)
  65. sleep(nSleep)
  66. end
  67. end
  68. end
  69. mon.clear()
  70. mon.setCursorPos(1, 1)
  71. mon.setTextScale(5)
  72. mon.setTextColor(colors.white)
  73.  
  74. printString("")
  75.  
  76. tScrollText = {}
  77. tScrollText[1] = "I just did sex so hard to this girl. She was moaning and stuff and i did sex so hard and so good with her. She was all \"Please have good sex with me\" and I said back \"Yeah, I'm going to really sex you so great lady\" and she's like \"Thanks\". It was so good and so hot and we both loved making a sex on all the positions. At the end I was all \"Hey, I'm going to finish sex now\" and she said \"Yes, that would be nice if you finished so hard on that towel\". I said \"Yes\" and I finished so hard on the towel. And It was so hot. "
  78. x, y = mon.getCursorPos()
  79. y = y - 1
  80. mon.setCursorPos(1, y)
  81. scrollText(tScrollText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement