==========================================My Goal
My goal is to create a login that requires multiple inputs to access the main terminal.
all my work i do my self but my knowledge is limited in Lua.
So far i have a the basics for what i want to do but it keeps on messing up for reasons i do not understand.
I am hoping someone can help me figure out what the issue is
NOTE: I do not want a "more efficient" code just some help to make it work
-- IronCore OS
-- Created By: GsL_Inc.
-- =====================
-- Anti-Bypass
-- os.pullEvent = os.pullEventRaw
-- Data
User = Majere
Pass = GsL2c14Adm
Aces = 9632
TerminalCode = ICMA1A10
-- Center Text
local cPrint = function(text)
local x2,y2 = term.getCursorPos()
local x,y = term.getSize()
term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
print(text)
end
local Clear = function()
term.clear()
term.setCursorPos(1, 1)
end
-- Setup
Clear()
cPrint("Welcome to IronCore OS [Server [ICM-Main] ]")
cPrint("===========================================")
cPrint("Please Enter Username: ")
term.setCursorPos(38, 3)
input = read()
if input == User then
cPrint("Please Enter Password: ")
term.setCursorPos(38, 4)
end
if input ~= User then
cPrint("Access Denied!")
sleep(2)
shell.run("IronCore")
end
input1 = read("*")
if input1 == Pass then
cPrint("Please Enter AcesCode: ")
term.setCursorPos(38, 5)
end
if input1 ~= Pass then
cPrint("Access Denied!")
sleep(2)
shell.run("IronCore")
end
input2 = read("*")
if input2 == Aces then
cPrint("Checking Databanks")
term.setCursosPos(x, y)
textutils.slowWrite("................", 1)
Clear()
cPrint("Please Confirm Terminal Code")
term.setCursorPos(x, y)
end
if input2 ~= Aces then
cPrint("Access Denied!")
sleep(2)
shell.run("IronCore")
end
input3 = read()
if input3 == TerminalCode then
Clear()
cPrint("Server [ICM-Main[AdminA]]")
cPrint("=========================")
cPrint(shell.run("programs"))
end
if input3 ~= TerminalCode then
cPrint("Access Denied!")
sleep(2)
shell.run("IronCore")
end
Thank you @Lupus590 you were actually helpful