Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --If you're looking at this,
- --I just want to say thank you to all of you for supporting my channel.
- --I've never thought my videos would gain that much traction.
- --I'll continue to make more Create Mod/Minecraft content in the future (perhaps other things...).
- --Feel free to leave a comment in the video after you read this message.
- --Cod 3/18/2022
- --This is probably really terrible code.
- --I'm still quite new to Lua (at the time of writing).
- --I was originally going to use RFTools, but it's not in the pack...
- --At least it gets the job done
- --Here to steal my password again?
- os.pullEvent = os.pullEventRaw
- os.loadAPI("touchpoint")
- local monitor = peripheral.wrap("left")
- monitor.setTextScale(0.5)
- local t = touchpoint.new("left")
- local password = "12355"
- t:add("die", nil, 2, 3, 14, 5, colors.red, colors.lime)
- t:add("Depressurize", nil, 2, 7, 14, 9, colors.red, colors.lime)
- t:draw()
- function getPass()
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Please enter the password: ")
- local input = read("*")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Access granted")
- while true do
- local event, p1 = t:handleEvents(os.pullEvent())
- if event == "button_click" and p1 == "Pressurize" then
- t:flash("Pressurize")
- rs.setOutput("back", true)
- sleep(0.5)
- rs.setOutput("back", false)
- break
- elseif event == "button_click" and p1 == "Depressurize" then
- t:flash("Depressurize")
- rs.setOutput("right", true)
- sleep(0.5)
- rs.setOutput("right", false)
- sleep(4)
- rs.setOutput("right", true)
- sleep(0.5)
- rs.setOutput("right", false)
- break
- end
- end
- else
- print("Access denied")
- sleep(2)
- end
- end
- end
- getPass()
Advertisement
Add Comment
Please, Sign In to add comment