Advertisement
Guest User

door

a guest
Oct 31st, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. p = peripheral.wrap("left")
  2.  
  3. function open()
  4.    rs.setOutput("top", true)
  5.    sleep(2)
  6.    rs.setOutput("top", false)
  7. end
  8.  
  9. while true do
  10.    players = p.getPlayerNames()
  11.    for a,b in pairs(players) do
  12.       if b == "amadejj5000" then
  13.       data = p.getPlayerData(b)
  14.       local x = math.abs(data["position"]["x"])
  15.       local z = math.abs(data["position"]["z"])
  16.       if z < 3 then
  17.      
  18.         open()
  19.         end
  20.       end
  21.    end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement