shiryavsky

lua door log

Sep 10th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. os.pullEvent =os.pullEventRaw
  2. h = fs.open("log", "a")
  3. local time = os.time()
  4. while true do
  5.     while redstone.getInput("back") == true do
  6.         sleep(0.5)
  7.     end
  8.     time = os.time()
  9.     time = textutils.formatTime(time, false)
  10.     print(time.." someone was coming")
  11.     h.writeLine(time.." someone was coming")
  12.     sleep(5)   
  13. end
Advertisement
Add Comment
Please, Sign In to add comment