View difference between Paste ID: R4wwr3dY and bpf4TVGb
SHOW: | | - or go back to the newest paste.
1
--[ BlueBank Client by TrumpetMiner v3.5
2
--[ pastebin get bpf4TVGb client
3
--[ Setup
4
log = 0  -- Don't Change This!
5
logU = "Guest" -- Don't Worry About This
6
ser = 32 -- Change To Server's ID#
7
side = "top" -- Modem Side
8
rednet.open(side)  -- Don't Change This (End of Setup)
9
-- Functions
10
function start()
11
 backC(8)
12
 textC(16)
13
 term.clear()
14
 cur(1,1)
15
 print("Welcome, "..logU)
16
 if log == 1 then
17
   cur(3,4)
18
   print "[Logout]"
19
   cur(3,6)
20
   print "[Balance]"
21
   cur(3,8)
22
   print "[Transfer]"
23
 else
24
   cur(3,4)
25
   print "[Login]"
26
   cur(3,6)
27
   print "[Create Account]"
28
 end
29
 event, button, X, Y = os.pullEvent("mouse_click")
30
 if X >= 3 and X <= 10 and Y == 4 and log == 0 then
31
   rednet.send(ser,"Login")
32
   term.clear()
33
   cur(3,4)
34
   write "User: "
35
   user = read()
36
   cur(3,5)
37
   write "Pass: "
38
   pass = read("*")
39
   rednet.send(ser,user)
40
   rednet.send(ser,pass)
41
   ser, message = rednet.receive()
42
   if message == "Login Successful" then
43
    log = 1
44
    logU = user
45
   end
46
   cur(3,2)
47
   print(message)
48
   sleep(1)
49
   start()
50
 elseif X >= 3 and X <= 10 and Y == 4 and log == 1 then
51
   log = 0
52
   logU = "Guest"
53
   start()
54
 elseif X >= 3 and X <= 11 and Y == 6 and log == 1 then
55
   rednet.send(ser,"Balance")
56
   sleep(.5)
57
   rednet.send(ser,logU)
58
   ser, bal = rednet.receive()
59
   term.clear()
60
   cur(1,1)
61
   print("Balance is $"..bal)
62
   os.pullEvent("mouse_click")
63
   start()
64
 elseif X >= 3 and X <= 12 and Y == 8 and log == 1 then
65
   rednet.send(ser,"Transfer")
66
   term.clear()
67
   cur(3,4)
68
   write "Amount: $"
69
   am = read()
70
   cur(3,6)
71
   write "To User: "
72
   user2 = read()
73
   rednet.send(ser,logU)
74
   rednet.send(ser,user2)
75
   rednet.send(ser,am)
76
   id, message = rednet.receive()
77
   cur(3,2)
78
   print(message)
79
   os.pullEvent("mouse_click")
80
   start()
81
 elseif X >= 3 and X <= 18 and Y == 6 and log == 0 then
82
   term.clear()
83
   cur(3,4)
84
   write "Username: "
85
   user = read()
86
   term.clear()
87
   cur(3,4)
88
   write "Passcode: "
89
   pass = read()
90
   term.clear()
91
   rednet.send(ser,"Create")
92
   rednet.send(ser,user)
93
   rednet.send(ser,pass)
94
   id, msg = rednet.receive()
95
   cur(3,4)
96
   print(msg)
97
   os.pullEvent("mouse_click")
98
   start()
99
 else
100
   start()
101
 end
102
end
103
function cur(cX,cY)
104
 term.setCursorPos(cX,cY)
105
end
106
function backC(color)
107
 term.setBackgroundColor(color)
108
end
109
function textC(color)
110
 term.setTextColor(color)
111
end
112
-- Programs
113
start()