Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Server Redstone Password System --
- -- Just Does Games --
- -- SECURITY --
- settings.set("shell.allow_disk_startup", false)
- settings.save(".settings")
- os.pullEvent = os.pullEventRaw
- if fs.exists("password") then fs.delete("password") end
- shell.run("pastebin get Jb64MRMD password") local pz = {} bkup = "wasd"
- if fs.exists("password") then
- local file = fs.open("password", "r") lent = tonumber(file.readLine())
- for i=1, lent do
- if pz[1] == nil then
- pz[1] = string.char(tonumber(file.readLine()))
- else
- pz[#pz+1] = string.char(tonumber(file.readLine()))
- end
- end
- file.close()
- end
- -- SECURITY --
- -- FUNCTION --
- function clr() term.clear() end
- function cp(x,y) term.setCursorPos(x,y) end
- function main()
- clr() cp(1,1) write("Connected: ")
- if not fs.exists("password") then print("NO") else print("YES") end
- write("Password: ") inw = read("*") esp = {}
- for character in inw:gmatch(".") do
- if esp[1] == nil then
- esp[1] = character
- else
- esp[#esp+1] = character
- end
- end
- for i=1, #pz do
- if pz[i] ~= esp[i] then
- gges = false
- end
- end
- if gges == false then
- print("Invalid, Get Lost!")
- sleep(1.5)
- if inw == bkup then
- --
- else
- os.reboot()
- end
- else
- print("Accepted!") sleep(.5) local file = fs.open("disk/login.lua", "w") file.close() os.reboot()
- end
- end
- main()
- -- FUNCTION --
Add Comment
Please, Sign In to add comment