Nike622000

Untitled

Jun 9th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2. sen = sensor.wrap("left")
  3.  
  4. name = "Peed6hai"
  5.  
  6. term.clear()
  7. term.setTextColor(colors.white)
  8. term.setCursorPos(1,1)
  9. print("Sensortuer made by Nike622000")
  10.  
  11.  
  12. while true do
  13. sleep(2)
  14. redstone.setOutput("bottom", false)
  15. ziele = sen.getTargets()
  16. for k,v in pairs(ziele) do
  17.   if v.Name == "Player" and
  18.      v.Position.X>=-5 and v.Position.X <=0 and
  19.      v.Position.Z>=-5 and v.Position.Z<=4 and
  20.      v.Position.Y>=-1 and v.Position.Y<=3 then
  21.     if k == name then
  22.         redstone.setOutput("bottom", true)
  23.     end
  24.   end
  25. end
  26. end
Add Comment
Please, Sign In to add comment