Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- set redstone back and left and right
- -- back floor 1
- -- right floor 2
- function Menu()
- term.clear()
- local n=1
- while true do
- local x, y=term.getCursorPos()
- term.clearLine()
- if n==1 then write(">APPELER ASCENSEUR< DESCENDRE") else write (" APPELER ASCENSEUR >DESCENDRE<") end
- term.setCursorPos(x, y)
- a, b=os.pullEvent()
- while a~="key" do a, b=os.pullEvent() end
- if b==203 and n==2 then n=1 end
- if b==205 and n==1 then n=2 end
- if b==28 then print("") break end
- end
- if n==1 then
- redstone.setOutput("right", false)
- redstone.setOutput("back", true)
- end
- if n==2 then
- redstone.setOutput("back", false)
- redstone.setOutput("right", true)
- end
- return false
- end
- Menu()
- os.sleep(6)
- os.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement