Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- if fs.exists("math")==true then
- print("OK")
- sleep(1)
- else
- shell.run("pastebin","get","cNe8cRkn","math")
- end
- if fs.exists("list")==true then
- print("OK")
- sleep(1)
- else
- shell.run("pastebin","get","sZzAdPLu","list")
- end
- if fs.exists("menu")==true then
- print("OK")
- sleep(1)
- else
- term.setCursorPos(-99,-99)
- shell.run("pastebin","get","iDyUBqVM","menu")
- os.reboot()
- end
- if fs.exists("dirs")==true then
- print("OK")
- sleep(1)
- else
- term.setCursorPos(-99,-99)
- shell.run("pastebin","get","VJY6UgdG","dirs")
- end
- monitor=peripheral.wrap("right")
- function m()
- monitor.clear()
- monitor.setCursorPos(1,1)
- end
- rednet.open("top")
- term.clear()
- term.setCursorPos(1,1)
- print("Microtech Terminas Server v0.9")
- print("\(c\)Microtech")
- print("***LOG***")
- while true do
- x,y=rednet.receive()
- if y=="CONNECT" then
- RAM=x
- m()
- print("USER ",x," connected.")
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" connected.")
- rednet.send(x,"write")
- rednet.send(x,"LOCK:")
- rednet.send(x,"PASS")
- x,y=rednet.receive()
- if y=="0000" then
- m()
- print("USER ",x," logged on.")
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" logged on.")
- while true do
- shell.run("/menu")
- rednet.send(x,"INPUT")
- G,y=rednet.receive()
- if y=="1" then
- m()
- print("User ",x," ran Option 1")
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" ran Option 1")
- rednet.send(RAM,"CLEAR")
- rednet.send(RAM,"RANDOM TEXT")
- rednet.send(RAM,"MICROTECH \(c\)")
- rednet.send(RAM,"Made by Microstar301")
- rednet.send(RAM,"WAIT")
- rednet.send(RAM,"2")
- sleep(2)
- shell.run("monitor","right","menu")
- end
- if y=="2" then
- m()
- print("User ",x," ran Option 2")
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" ran Option 2")
- rednet.send(RAM,"CLEAR")
- rednet.send(RAM,"write")
- rednet.send(RAM,"RUN:")
- rednet.send(RAM,"INPUT")
- G,y=rednet.receive()
- m()
- print("User ",x," ran: ",y,".")
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" ran: ")
- monitor.write(y)
- monitor.write(".")
- if G==RAM then
- if y=="reset" or y=="reset" then
- rednet.send(RAM,"EXIT")
- os.reboot()
- end
- if y=="update" or y=="UPDATE" then
- print("User ",x," updated System.")
- rednet.send(RAM,"WAIT")
- rednet.send(RAM,"1")
- shell.run("rm","/startup")
- shell.run("rm","/menu")
- shell.run("pastebin","get","LBuMEMAD","/startup")
- shell.run("pastebin","get","iDyUBqVM","/menu")
- rednet.send(RAM,"CLEAR")
- rednet.send(RAM,"To Complete the Updating Process, restart the System.")
- rednet.send(RAM,"PULL")
- local wt=0
- rednet.send(RAM,"PULL")
- while wt==0 do
- local wi,it=rednet.receive()
- if wi==RAM then
- if it=="PULLED" then
- wt=1
- end
- end
- end
- end
- shell.run(y)
- end
- m()
- monitor.write("DONE")
- sleep(1)
- end
- if y=="3" then
- m()
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" logged out.")
- sleep(1)
- rednet.send(RAM,"EXIT")
- os.reboot()
- end
- end
- else
- m()
- monitor.write("User ")
- monitor.write(x)
- monitor.write(" refused.")
- rednet.send(x,"EXIT")
- end
- end
- end
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment