Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local u = ""
- local p = ""
- while true do
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- center("Get Chattr Gold - Login")
- term.setCursorPos(2, 5)
- write("Username: ")
- term.setCursorPos(2, 7)
- write("Password: ")
- term.setCursorPos(12, 5)
- local username = read()
- term.setCursorPos(12, 7)
- local password = read("*")
- local m = firewolf.query("login", {user=username, pass=password})
- term.setTextColor(colors.red)
- term.setCursorPos(1, 15)
- if m == "valid" then
- term.setTextColor(colors.green)
- center("Success.")
- u = username
- p = password
- sleep(1)
- break
- --firewolf.redirect("chattr.net/chat")
- elseif m == "invalid" then
- center("Wrong username and/or password.")
- sleep(1)
- elseif m == false then
- center("Query failed! Refreshing...")
- sleep(1)
- firewolf.redirect("chattr.net/gold")
- else
- center("Unknown error...")
- sleep(1)
- end
- end
- while true do
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- center("Get Chattr Gold - Pay (50 LBC)")
- term.setCursorPos(2, 5)
- write("Address: ")
- term.setCursorPos(2, 7)
- write("PIN: ")
- term.setCursorPos(12, 5)
- local ad = read()
- term.setCursorPos(12, 7)
- local pin = read("*")
- local m = firewolf.query("getgold", {user=u, pass=p, addr=ad, pin=pin})
- term.setTextColor(colors.red)
- term.setCursorPos(1, 15)
- center(tostring(m))
- end
Advertisement
Add Comment
Please, Sign In to add comment