I try to make a colored security lock but I do something wrong and I dont know what that is.
What I try to make:
The first 2 lines need to be orange background with white text.
from the 3th line needs to be a white background with black text.
and then the last 2 lines on the bottom need to be orange again.
Many thanks if you can help me
os.pullEvent = os.pullEventRaw
local standby = 5
local side = "left"
local password = "xixili"
term.clear()
term.setCursorPos(1,1)
term.setBackgroundColor(colors.orange)
term.clear()
term.setCursorPos(12,1)
term.setTextColor(colors.white)
print("Security Panel")
term.clear()
term.setCursorPos(1,3)
term.setBackgroundColor(colors.white)
term.clear()
term.setCursorPos(1,4)
write("Password: ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,4)
print("Correct")
rs.setOutput(side,true)
sleep(5)
rs.setOutput(side,false)
os.reboot()
else
term.clear()
term.setCursorPos(1,4)
print("Wrong Password")
sleep(2)
os.reboot()
end












