Advertisement
charlesthepenguin

Untitled

Jul 29th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. local c = require("component")
  2. local term = require("term")
  3. local component = require("component")
  4. local event = require("event")
  5. local serialization = require("serialization")
  6. local gpu = component.gpu
  7. local tun = component.tunnel
  8. local w, h = gpu.getResolution()
  9. gpu.fill(1, 1, w, h, " ")
  10. local asd = 1
  11. local os = require("os")
  12.  
  13. local address
  14. repeat
  15. term.clear(true)
  16. print("Teleportation computer Alpha")
  17. print("")
  18. print("Teleport? y/n")
  19. answer = io.read()
  20. print()
  21. if answer == "y" then
  22. print("Where are you now? Type in number")
  23. print("1. Home Base")
  24. print("2. Alpha Site")
  25. num = io.read()
  26. print()
  27. if num == "1" then
  28. print("Teleporting, waiting for gate activation")
  29. tun.send("AlphaT")
  30. elseif num == "2" then
  31. print("Teleporting, waiting for gate activation")
  32. tun.send("BaseT")
  33. elseif num ~= "1" or num ~= "2" then
  34. print("ERROR: Wrong number typed!")
  35. else
  36. print("UNKNOWN ERROR")
  37. end
  38.  
  39. print()
  40.  
  41. os.sleep(5)
  42.  
  43. elseif answer == "n" then
  44. print("Aborted")
  45. os.sleep(5)
  46.  
  47.  
  48. end
  49. until asd == 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement