Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Loading External API's
- os.loadAPI("disk/nt")
- --Assigning Local Variables
- local server = "computer_58"
- local channel = 3573
- local version = 2.4
- local side = "left"
- local user = ""
- local pass = ""
- --Assigning Functions
- function setup()
- modem = peripheral.wrap(side)
- modem.open(channel)
- end
- local function boot()
- nt.clearPage()
- nt.centerPrint("VirtuSoft Systems")
- nt.centerPrint("-------------------")
- nt.centerPrint(" ")
- print("User logged in as "..user)
- end
- function drawScreen()
- nt.clearPage()
- term.setTextColour(colours.lightGrey)
- nt.centerPrint(" Control Panel")
- term.setCursorPos(15,1)
- term.setTextColour(colours.red)
- print("Virtu")
- term.setCursorPos(20,1)
- term.setTextColour(colours.cyan)
- print("Soft")
- term.setTextColour(colours.white)
- nt.centerPrint("-------------------------")
- term.setCursorPos(1,18)
- nt.centerPrint("DigiTec Login Software // V"..version)
- term.setCursorPos(1,4)
- nt.centerPrint("Please enter your username & password")
- print(" ")
- print(" ")
- print(" ")
- term.setTextColour(colours.red)
- term.write(" Username: ")
- term.setTextColour(colours.white)
- ui = read()
- term.setTextColour(colours.cyan)
- term.write(" Password: ")
- term.setTextColour(colours.white)
- pi = read("*")
- user = string.lower(ui)
- pass = pi
- end
- function newveri()
- print("1")
- modem.transmit(channel,channel,user)
- modem.transmit(channel,channel,pass)
- local running = true
- while running do
- print("2")
- local event,nill,newchannel,nill,veri,nill = os.pullEvent("modem_message")
- print("Got Event!"..veri)
- running = false
- print("3")
- sleep(2)
- if veri == "AE0047Proc" then
- boot()
- clocking = false
- elseif veri == "AE0047Den" then
- nt.clearPage()
- term.settextColour(colours.red)
- nt.centerPrint("Failed Login!")
- sleep(3)
- end
- print(" 4 ")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment