Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- sen = sensor.wrap("left")
- name = "Peed6hai"
- term.clear()
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- print("Sensortuer made by Nike622000")
- while true do
- sleep(2)
- redstone.setOutput("bottom", false)
- ziele = sen.getTargets()
- for k,v in pairs(ziele) do
- if v.Name == "Player" and
- v.Position.X>=-5 and v.Position.X <=0 and
- v.Position.Z>=-5 and v.Position.Z<=4 and
- v.Position.Y>=-1 and v.Position.Y<=3 then
- if k == name then
- redstone.setOutput("bottom", true)
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment