Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("left")
- function open()
- rs.setOutput("top", true)
- sleep(2)
- rs.setOutput("top", false)
- end
- while true do
- players = p.getPlayerNames()
- for a,b in pairs(players) do
- if b == "amadejj5000" then
- data = p.getPlayerData(b)
- local x = math.abs(data["position"]["x"])
- local z = math.abs(data["position"]["z"])
- if z < 3 then
- open()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement