Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function yN()
  2. local n=1
  3. while true do
  4. local x, y=term.getCursorPos()
  5. term.clearLine()
  6. if n==1 then
  7. write ("[1 Player]")
  8. write ("2 Player")
  9. else
  10. write ("1 Player")
  11. write ("[2 Player]")
  12. end
  13. term.setCursorPos(x, y)
  14. a, b=os.pullEvent()
  15. while a~="key" do a, b=os.pullEvent()
  16. if b==203 and n==2 then
  17. n=1
  18. end
  19. if b==205 and n==1 then
  20. n=2
  21. end
  22. if b==28 then
  23. print("")
  24. break
  25. end
  26. end
  27. if n==1 then return true end
  28. if n==2 then return false end
  29. return false
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement