Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function yN()
- local n=1
- while true do
- local x, y=term.getCursorPos()
- term.clearLine()
- if n==1 then
- write ("[1 Player]")
- write ("2 Player")
- else
- write ("1 Player")
- write ("[2 Player]")
- end
- term.setCursorPos(x, y)
- a, b=os.pullEvent()
- while a~="key" do a, b=os.pullEvent()
- 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 return true end
- if n==2 then return false end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement