Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- os.loadAPI("ocs/apis/sensor")
- local prox = sensor.wrap("top")
- function checkPlayer()
- target = prox.getTargets()
- for k,v in pairs(target) do
- if k == "BenneyBoy444" then
- details = prox.getTargetDetails(k)
- if details.Position.X < 3 and details.Position.X > 0 and details.Position.Z > -1.5 and details.Position.Z < 2.5 then
- return true
- end
- end
- end
- end
- while true do
- if checkPlayer() then
- rs.setOutput("left", true)
- else
- rs.setOutput("left", false)
- end
- sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement