Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("back")
- m.open(51)
- local function pulse(side)
- rs.setOutput(side, true)
- sleep(3)
- rs.setOutput(side,false)
- end
- Tr = true
- function os.pullEvent()
- local event, p1,p2,p3,p4,p5 = os.pullEventRaw()
- if event == "terminate" then write("For terminate need password:")
- p = read("*")
- if p == "p" then Tr = false end end
- return event,p1,p2,p3,p4,p5
- end
- while Tr do
- Recive = {"","",""}
- Recive[1],Recive[2],Recive[3],Recive[4],Recive[5] = os.pullEvent()
- pL = fs.list("Assets")
- if Recive[1] == "player" or "modem_message" then
- if Recive[1] == "modem_message" then
- for k,v in string.gmatch(Recive[5], "(%w+)=(%w+)") do
- if k == "rOpen" then
- pulse("right")
- end
- end
- else
- for i =1 , 10 ,1 do
- if Recive[3] == pL[i] then
- pulse("right")
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment