Advertisement
Marlingaming

Bold Fighter 1 - Menu

Feb 16th, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local function Clear()
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. end
  5.  
  6. function Touch(m,y)
  7. n = 0
  8. term.setCursorPos(1,y)
  9. for i = 1, #m do
  10. print(m[i])
  11. end
  12. while true do
  13. local a, b, c, d = os.pullEvent("mouse_click")
  14. for i = 1, #m do
  15. if d == i + (y - 1) then n = i end
  16. end
  17. if n > 0 then break end
  18. end
  19. return n
  20. end
  21.  
  22. function Menu1()
  23. term.setBackgroundColor(colors.darkRed)
  24. Clear()
  25. print("Bold Fighter - Beta")
  26. local options = {"start","exit"}
  27. local n = Touch(options,3)
  28. if options[n] == "start" then
  29. shell.run("os/System/Programs/BoldFighter/Game.lua","Base","Free",3)
  30. elseif options[n] == "exit" then
  31.  
  32. end
  33. end
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement