Alright so first, you'll probably want your marquee text.
local text = 'My Marquee Text'
Then, you're going to start a while loop, so that the marquee keeps going.
while true do
For this, we're going to use a for loop, that starts off with drawing the text off-screen, and ends with drawing it off-screen again, but to the right.
This for loop is going to start at the width of the screen, which we'll need to get with term.getSize(). And it's going to end at the right, but completely offscreen, so 0 - the length of your text.
local width, height = term.getSize()
for x=width, -#text, -1 do
We clear the screen so that anything drawn previously won't still be shown. Then we simply set our position, and print the text. Sleep, so that the loop doesn't go too fast. After that we're done, so we just end off our loops.
term.clear()
term.setCursorPos(x, 1)
print(text)
sleep(0.1)
end
end
Run this on a monitor and you're good.