Guest User

startup

a guest
Oct 25th, 2015
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. prox = peripheral.wrap("top")
  2.  mon = peripheral.wrap("right")
  3.  
  4. while true do
  5. players = prox.getPlayers()
  6. mon.clear()
  7. mon.setCursorPos(2,3)
  8.  
  9. if #players ~= 0 then
  10.   local h = fs.open("visitor", fs.exists("visitor") and "a" or "w")
  11.     for a,b in pairs(players) do
  12.     h.writeLine( b.name .. " @ " .. os.time() )
  13.     mon.write(b.name)
  14.     end
  15.   h.close()
  16. end
  17.  
  18. sleep(5)
  19.  
  20. end
Advertisement
Add Comment
Please, Sign In to add comment