Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.write("> ")
- term.setCursorBlink(true)
- sleep(2)
- local start, e,p =false
- local timeout = os.startTimer(20)
- repeat
- local tick = os.startTimer(.75)
- e,p = os.pullEventRaw()
- if e == "char" then
- write(string.char(math.random(0,255)))
- start = true
- tick = os.startTimer(.5)
- end
- if start and (((e == "char" or e == "key") and math.random(2)==1) or (e == "timer" and p == tick)) then
- peripheral.call("back", "playSound", math.random(2) == 1 and "entity.ghast.hurt" or "entity.ghast.death")
- end
- os.cancelTimer(tick)
- until e == "timer" and p == timeout
- term.setCursorBlink(false)
- print("\nc'est bon, c'est fini ;)")
- sleep(2)
- shell.run("clear")
Add Comment
Please, Sign In to add comment