Belzebub

Close door if player in room + msg

Apr 9th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local component = require("component")
  2. local sensor = component.openperipheral_sensor
  3.  
  4. --component.gpu.setResolution(35,10)
  5. component.gpu.setResolution(140,40)
  6. component.modem.open(1816)
  7.  
  8. while true do
  9.   player = sensor.getPlayers()
  10.     component.gpu.setForeground(0x00FF00)
  11.     print("Здесь сейчас находятся:")
  12.   for i = 1, #player do
  13.     component.gpu.setForeground(0xFF0000)
  14.     print(player[i].name)
  15.     be1 = player[i].name
  16.     component.modem.broadcast(1592,be1)
  17.   end
  18.   if player[1] ~= nil then
  19.     component.redstone.setOutput(require("sides").up, 15)
  20.   else
  21.     component.redstone.setOutput(require("sides").up, 0)
  22.       end
  23.       os.sleep(1)
  24.       require("term").clear()
  25. end
Advertisement
Add Comment
Please, Sign In to add comment