Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function printQuestion()
- --Question
- print("Type in the answer below.")
- end
- local answer = "100"
- local input = 0
- while true do
- term.clear()
- term.setCursorPos(1,1)
- printQuestion()
- input = io.read()
- if input == answer then
- term.setTextColor(colors.green)
- textutils.slowPrint("Correct!")
- redstone.setOutput("left",true)
- while true do
- sleep(2)
- end
- else
- term.setTextColor(colors.red)
- textutils.slowPrint("Incorrect")
- sleep(0.5)
- term.setTextColor(colors.white)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement