Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chat = peripheral.wrap("bottom")
- command = peripheral.wrap("back")
- while true do
- event, player = os.pullEvent()
- if event == "chat_death" then
- if fs.exists(player) then
- file = io.open(player, "r")
- deaths = file.read()
- deaths = deaths + 1
- file:close()
- file = fs.open(player, "w")
- file.write(deaths)
- file:close()
- else
- file = fs.open(player, "w")
- file.write("1")
- file:close()
- deaths = 1
- end
- if deaths == 1 then
- command.setCommand("/say "..player.." has died. Be more careful, peasant")
- chat.say(player.." has died. Be more careful, peasant")
- elseif deaths > 30 then
- command.setCommand("/say "..player.." has died "..deaths.." times... I'm not even surprised any more...")
- elseif deaths > 25 then
- command.setCommand("/say "..player.." has died "..deaths.." times. Stop dying you cowards!")
- elseif deaths > 20 then
- command.setCommand("/say "..player.." has died "..deaths.." times!?!? What are you doing down there, peasants?")
- elseif deaths > 15 then
- command.setCommand("/say "..player.." has died "..deaths.." times. Why do you keep dying!?")
- elseif deaths > 10 then
- command.setCommand("/say "..player.." has died "..deaths.." times. It better be worth my while resurrecting you.")
- elseif deaths > 3 then
- command.setCommand("/say "..player.." has died "..deaths.." times now. I'll revive them, I guess.")
- elseif deaths > 2 then
- command.setCommand("/say "..player.." has died again! Klutz.")
- end
- command.runCommand()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement