Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lock = false
- local useColor = term.isColor()
- local colorTable = {}
- if useColor then
- for k,v in pairs(colors) do
- if type(v) == "number" then table.insert(colorTable,v) end
- end
- end
- if lock then
- os.pullEvent = os.pullEventRaw
- end
- function mergeTables(t1,t2)
- for k,v in pairs(t2) do t1[k]=v end
- end
- local afsl = fs.list
- local files = afsl("/rom/programs/")
- local files1 = afsl("/rom/apis/")
- for k,v in ipairs(files) do
- files[k] = fs.combine("/rom/programs/",v)
- end
- for k,v in ipairs(files1) do
- files1[k] = fs.combine("/rom/apis/",v)
- end
- mergeTables(files,files1)
- local ofso=fs.open
- if lock then
- local fff = ofso("/startup","w")
- fff.write("shell.run(\""..shell.getRunningProgram().."\")")
- fff.close()
- end
- local sides = {"top","bottom","left","right","front","back"}
- local s = ""
- for k,v in ipairs(sides) do
- if peripheral.getType(v) == "monitor" then s = v break end
- end
- if s ~= "" then term.redirect(peripheral.wrap(s)) end
- local tW,tH = term.getSize()
- while true do
- for i=1,40,1 do
- local rF = nil
- repeat
- rF = math.random(1,#files)
- until not fs.isDir(files[rF])
- local ffff = ofso(files[rF],"r")
- local lines = {}
- local line = ffff.readLine()
- while line do
- if line ~= "" and string.len(line) >= 2 then table.insert(lines,line) end
- line = ffff.readLine()
- end
- ffff.close()
- local rL = math.random(1,#lines)
- local ll = lines[rL]
- local x = math.random(1,tW)
- local s = math.random(1,math.min(string.len(ll),tW-x+1))
- local y = math.random(1,tH)
- local ssT = math.random(1,math.min(string.len(ll),s))
- local ssZ = math.random(0,math.min(string.len(ll)-ssT,s))
- term.setCursorPos(x,y)
- if useColor then
- term.setTextColor(colorTable[math.random(1,#colorTable)])
- term.setBackgroundColor(colorTable[math.random(1,#colorTable)])
- end
- term.write(string.sub(ll,ssT,ssT+ssZ))
- sleep(.05)
- end
- sleep(.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment