Advertisement
Guest User

Crysta

a guest
May 26th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. local oSensor = peripheral.wrap("top")
  2.  
  3. while 1 do
  4.   local iNb = #oSensor.getPlayers()
  5.   print(iNb)
  6.  
  7.   if iNb==0 then
  8.     redstone.setOutput("back",false)
  9.   else
  10.     redstone.setOutput("back",true)
  11.   end
  12.   sleep(1)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement