onoff123

Untitled

Oct 8th, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. --If you're looking at this,
  2. --I just want to say thank you to all of you for supporting my channel.
  3. --I've never thought my videos would gain that much traction.
  4. --I'll continue to make more Create Mod/Minecraft content in the future (perhaps other things...).
  5. --Feel free to leave a comment in the video after you read this message.
  6. --Cod 3/18/2022
  7.  
  8. --This is probably really terrible code.
  9. --I'm still quite new to Lua (at the time of writing).
  10. --I was originally going to use RFTools, but it's not in the pack...
  11. --At least it gets the job done
  12.  
  13. --Here to steal my password again?
  14.  
  15. os.pullEvent = os.pullEventRaw
  16. os.loadAPI("touchpoint")
  17.  
  18. local monitor = peripheral.wrap("left")
  19. monitor.setTextScale(0.5)
  20. local t = touchpoint.new("left")
  21. local password = "12355"
  22.  
  23. t:add("PRINT", nil, 2, 3, 14, 5, colors.red, colors.lime)
  24.  
  25. t:draw()
  26.  
  27. function getPass()
  28. while true do
  29. term.clear()
  30. term.setCursorPos(1,1)
  31. write("Please enter the password: ")
  32. local input = read("*")
  33. if input == password then
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. print("Access granted")
  37. while true do
  38. local event, p1 = t:handleEvents(os.pullEvent())
  39. if event == "button_click" and p1 == "Pressurize" then
  40. t:flash("PRINT")
  41. rs.setOutput("back", true)
  42. sleep(0.5)
  43. rs.setOutput("back", false)
  44. print hi
  45.  
  46. break
  47.  
  48.  
  49. end
  50. end
  51. else
  52. print("Access denied")
  53. sleep(2)
  54. end
  55. end
  56. end
  57.  
  58. getPass()
Advertisement
Add Comment
Please, Sign In to add comment