Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setCursorPos(1,1)
- term.clear()
- print("CraftOS 1.8")
- term.write("> ")
- term.setCursorBlink(true)
- local continue = true
- local x, y = term.getCursorPos()
- local w,h = term.getSize()
- local e,p
- while continue do
- e = os.pullEventRaw()
- if e == "char" then
- term.write(string.char(math.random(1,255)))
- x = x+1
- if x > w then
- if y >= h then
- term.scroll(1)
- else
- y = y+1
- end
- x = 1
- end
- term.setCursorPos(x,y)
- elseif e == "terminate" then
- print(" ")
- printError("Tu m'as cru patate crue ?")
- print("Y/N")
- term.write("> ")
- while true do
- e,p = os.pullEventRaw()
- if e == "key" and p == keys.y then
- print("Y")
- continue = false
- sleep(.1)
- fs.move(shell.getRunningProgram(), ".startup.lua")
- shell.run("clear")
- elseif e == "key" then
- x,y = term.getCursorPos()
- break
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment