Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- print("Connecting to Bank server 1...")
- rednet.send(32,"Connect","bank1")
- local id, message = rednet.receive("bank1",10)
- if id then
- if id == 32 then
- if message == "Connection step 1" then
- rednet.send(32,"Connection confirmed","bank1")
- print("Established connection!")
- print("Please login")
- write("Username:")
- local input = read()
- rednet.send(32,input,"bank1")
- write("Password:")
- local input = read("*")
- rednet.send(32,input,"bank1")
- local id, message = rednet.receive("bank1",5)
- if id then
- if id == 32 then
- print(message)
- if message == "Access granted." then
- while true do
- local event, button, x, y = os.pullEvent( "mouse_click" )
- if x > 0 and x <= 7 then
- rednet.send(32,"Balance","bank1")
- local id, message = rednet.receive("bank1")
- elseif x > 8 and x <= 12 then
- rednet.send(32,"Exit","bank1")
- break
- end
- end
- else
- print("Access denied.")
- return
- end
- else
- print("Hijacking detected! Connection blocked.")
- return
- else
- print("Connection timed out.")
- return
- end
- end
- else
- print("Hijacking detected! Connection blocked.")
- return
- end
- else
- print("Connection failed.")
- return
- end
Add Comment
Please, Sign In to add comment