Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Death Logger 0.1
- -- By: NuAoA
- if not fs.exists("wrap") then
- print("wrap API not found, downloading from http://pastebin.com/g5tBarus")
- shell.run("pastebin get g5tBarus wrap")
- end
- os.loadAPI("wrap")
- chat = wrap.attach("chat")
- function recordDeaths
- while true do
- local event,player = os.pullEvent("chat_death")
- local prev = ""
- if fs.exists("death.data") then
- local file = fs.open("death.data","r")
- prev = file.readAll()
- file:close()
- end
- local file = fs.open("death.data","w")
- file.write(player)
- file.write("\n")
- file.write(prev)
- file.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement