Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxX, maxY = term.getSize()
- local tArgs = { ... }
- function startRand(sX, y, letter, add)
- term.clear()
- term.setCursorPos(1,1)
- A = 0
- x = sX
- repeat
- A = A + 1
- if x == maxX then y = y + 1 x = 1 end
- for i=1,10 do
- sleep(0)
- term.setCursorPos(x,y)
- print(string.char(math.random(65, 65+25+26+5)))
- end
- term.setCursorPos(x,y)
- print(string.sub(letter, A, A))
- if add == "true" then x = x + 1 else x = sX end
- until A == #letter
- end
- function doRand(x, y, final)
- if string.len(final) > 1 then
- startRand(x, y, final, "true")
- else
- startRand(x, y, final, "false")
- end
- end
- if tArgs[1] ~= nil then
- str = ""
- for i,v in pairs(tArgs) do
- str = str .. tArgs[i].." "
- end
- elseif tArgs[1] == nil then
- write("Message: ")
- str = read()
- end
- if tArgs[1] ~= nil then
- str = string.sub(str, 1, #str-1)
- end
- doRand(1,1, str) -- this runs it
Add Comment
Please, Sign In to add comment