· 6 months ago · Mar 26, 2025, 06:20 PM
1if fs.exists("config.txt") == true then
2
3local file = fs.open("config.txt", "r")
4local config = file.readAll()
5file.close()
6
7local lines = {}
8for line in string.gmatch(config, "[^\r\n]+") do
9 table.insert(lines, line)
10end
11
12local name = lines[1]
13
14print("Hello ".. name .." please enter your password.")
15
16right = lines[2]
17
18function password()
19 entered = read("*")
20 if entered == right then
21 print("Correct welcome ")
22 sleep(1)
23 shell.run("clear")
24 shell.run("windows")
25 else
26 print("Wrong password")
27 sleep(0.5)
28 shell.run("clear")
29 print("Try again")
30 password()
31 end
32end
33
34password()
35
36else
37shell.run("register")
38end