Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------- Config -----------------------------------------------------
- RS_SIDE = "right" -- redstone side to open
- RS_DELAY = 3 -- delay for redstone signal
- PASSWORD = "exit()" -- password to terminate
- -----------------------------------------------------------------------------
- local function pulse(side)
- rs.setOutput(side, true)
- sleep(RS_DELAY)
- 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 == PASSWORD then Tr = false end
- end
- return event,p1,p2,p3,p4,p5
- end
- while Tr do
- Recive = {"","",""}
- Recive[1],Recive[2],Recive[3] = os.pullEvent()
- pL = fs.list("Assets")
- if Recive[1] == "player" then
- for i =1 , 10 ,1 do
- if Recive[3] == pL[i] then
- pulse(RS_SIDE)
- break
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement