Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- os.pullEvent = os.pullEventRaw
- local lado = "bottom"
- local monitor = peripheral.wrap("top")
- peripheral.wrap("back")
- peripheral.wrap("right")
- term.clear()
- monitor.clear()
- term.setCursorPos(1,1)
- print("Haga click derecho en la cara de Steve")
- function puerta()
- while true do
- event, playerName = os.pullEvent("player")
- -- print(playerName)
- if playerName == "GalactusX" or "Dimiton" or "arysan" then
- monitor.setTextColor(colors.lime)
- monitor.setCursorPos(3,1)
- monitor.setTextScale(2)
- monitor.clear()
- monitor.write("Welcome " .. playerName)
- redstone.setOutput(lado , true)
- sleep(3)
- redstone.setOutput(lado , false)
- monitor.clear()
- os.reboot()
- else
- monitor.setTextColor(colors.red)
- monitor.setCursorPos(1,1)
- monitor.clear()
- monitor.write("User acces denied")
- sleep(3)
- os.reboot()
- end
- end
- end
- function os.pullEvent(_sFilter)
- local event = { os.pullEventRaw(_sFilter) }
- if event[1] == "terminate" then
- -- puerta()
- os.reboot()
- end
- return unpack(event)
- end
- puerta()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement