Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent=os.pullEventRaw
- version="MultiUser Alpha 1.2.02 The Infinite Update"
- term.clear()
- print("Loading GUI")
- os.loadAPI("GUI")
- print("Loading paintutils for 1.79")
- os.loadAPI("paintutils")
- print("Loaded "..version)
- sleep(2)
- term.clear()
- GUI.fbox(colours.grey)
- ccY=3
- term.setCursorPos(3,ccY)
- ccY=ccY+1
- term.setTextColor(colours.lightGrey)
- term.setBackgroundColor(colours.grey)
- term.write("Starting...")
- user=_G.user
- pass=""
- lion=false
- term.setCursorPos(3,ccY)
- ccY=ccY+1
- sleep(0.5)
- getfenv(("").gsub).user={
- user="";
- pass="";
- valid=false;
- invalidReason="";
- }
- term.write("Loaded Blacknet")
- sleep(1)
- GUI.bar()
- user=""
- sleep(2)
- term.setBackgroundColor(colours.lightGrey)
- term.clear()
- errorTimerValue=0
- os.startTimer(1)
- while true do
- e,p1,p2,p3,p4,p5=os.pullEvent()
- if user=="breaker" then
- term.setCursorPos(1,tY-1)
- if pass=="Halo5" then
- term.write("Program Closing")
- sleep(2)
- break
- end --if pass=="<CENSOR>"
- end --if user=="breaker"
- if user=="" then
- _G.user="Not Logged In!"
- else --if user==""
- _G.user="Login as: "..user
- if lion==true then
- _G.user=user
- end --if lion==true 3
- end --if user=="" --else
- if e=="timer" then
- term.setBackgroundColor(colours.lightGrey)
- term.setCursorPos(1,1)
- term.clear()
- GUI.bar()
- if lion==true then
- term.setCursorPos(1,2)
- term.setBackgroundColor(colours.red)
- paintutils.drawLine(1,2,10,2)
- term.setCursorPos(1,2)
- term.write("Log out")
- else --if lion==true
- term.setBackgroundColor(colours.green)
- paintutils.drawLine(1,2,10,2)
- term.setCursorPos(1,2)
- term.write("Log in")
- if errorTimerValue>0 then
- errorTimerValue=errorTimerValue-1
- if getfenv(("").gsub).user.invalidReason=="" then
- else --if getfenv(("").gsub).user.invalidReason
- term.setCursorPos(1,4)
- term.setBackgroundColor(colours.red)
- paintutils.drawLine(1,4,25,4)
- term.setCursorPos(1,4)
- term.setTextColor(colours.white)
- term.write(getfenv(("").gsub).user.invalidReason)
- end --if getfenv(("").gsub).user.invalidReason --else
- end --if errorTimerValue>0
- tX,tY=term.getSize()
- term.setCursorPos(1,tY)
- term.setBackgroundColor(colours.lightGrey)
- term.setTextColor(colours.white)
- term.write(version)
- term.setCursorPos(1,5)
- term.write("Username:")
- term.setBackgroundColor(colours.white)
- term.setTextColor(colours.black)
- paintutils.drawLine(1,6,25,6)
- paintutils.drawLine(1,8,25,8)
- term.setCursorPos(1,6)
- term.write(user)
- term.setCursorPos(1,8)
- if pass=="" then
- else
- for it2=1,#pass do
- term.write("*")
- end --for it2=1,#pass
- end --if pass=="" --else
- --This ^ will be removed soon due to screen peek
- --It was only here for debug purposes
- --This was removed in version prealpha
- term.setTextColor(colours.white)
- term.setCursorPos(1,7)
- term.setBackgroundColor(colours.lightGrey)
- term.write("Password:")
- end --if lion==true --else
- os.startTimer(1)
- end --if e=="timer"
- if e=="mouse_click" then
- if p2<6 then
- if p3>1 then
- if p3<3 then
- if lion==true then
- lion=false
- user=""
- pass=""
- getfenv(("").gsub).user.user=""
- getfenv(("").gsub).user.pass=""
- else --if lion==true 2
- getfenv(("").gsub).user.user=user
- getfenv(("").gsub).user.pass=pass
- term.setBackgroundColor(colours.grey)
- paintutils.drawLine(1,2,10,2)
- term.setCursorPos(1,2)
- term.write("Working...")
- os.startTimer(3)
- ccd=2
- while true do
- e=os.pullEvent()
- if e=="timer" then
- ccd=ccd-1
- if getfenv(("").gsub).user.valid==true then
- lion=true
- else --if getfenv(("").gsub).user.valid
- lion=false
- errorTimerValue=5
- end --if getfenv(("").gsub).user.valid --else
- if ccd==0 then
- break
- end --if ccd==0
- end --if e=="timer"
- os.startTimer(1)
- end --while true
- end --if lion==true 2 --else
- end --if p3<3
- end --if p3>1
- end --if p2>6
- if lion==false then
- if p2<26 then
- if p3>5 then
- if p3<7 then
- --Begin Enter User
- term.setCursorPos(1,tY-1)
- term.clearLine()
- term.write("Enter Your Username into the field")
- term.setBackgroundColor(colours.white)
- term.setTextColor(colours.black)
- paintutils.drawLine(1,6,25,6)
- term.setCursorPos(1,6)
- user=read()
- term.setBackgroundColor(colours.lightGrey)
- term.setTextColor(colours.white)
- term.setCursorPos(1,tY-2)
- term.write("Working...")
- sleep(1)
- os.startTimer(1)
- term.setTextColor(colours.white)
- end --if p3<7
- end --if p3>5
- if p3>7 then
- if p3<9 then
- term.setCursorPos(1,tY-1)
- term.clearLine()
- term.write("Please Enter your Password into the field")
- term.setBackgroundColor(colours.white)
- term.setTextColor(colours.black)
- paintutils.drawLine(1,8,25,8)
- term.setCursorPos(1,8)
- pass=read("*")
- term.setBackgroundColor(colours.lightGrey)
- term.setTextColor(colours.white)
- term.setCursorPos(1,tY-2)
- term.clearLine()
- term.write("Working...")
- sleep(1)
- os.startTimer(1)
- term.setTextColor(colours.white)
- end --if p3>7
- end --if p3<9
- end --if p2>26
- end --if lion==false
- end --if e=="mouse_click"
- end --while
- term.setBackgroundColor(colours.black)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colours.white)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement