Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component=require("component")
- local rs=component.redstone
- local gpu=component.gpu
- local term=require("term")
- local text=require("text")
- local computer=require("computer")
- local os=require("os")
- local sides = require("sides")
- ----Config----
- local delay1=1 --The delay what the redstone is on for (1)
- local delay2=1 --The delay what the redstone is on for (2)
- local side1=0 --The redstone side (1)
- local side2=0 --The redstone side (2)
- local username1="polis" --Username (1)
- local username2="holm" --Username (2)
- local password1="admin" --Password (1)
- --Password (2)
- local commands1="start reactor 1"
- local commands2="stop reactor 1"
- local commands3="start reactor 2"
- local commands4="stop reactor 2"
- local commands5="start reactor 3"
- local commands6="stop reactor 3"
- local commands7="start reactor 4"
- local commands8="stop reactor 4"
- local firstmsg="BNK-SYSTEM AND PROTECTION SECURITY" --The message that appears when the program is started
- local success="Success !"
- ---- ---- ----
- while true do
- term.clear()
- gpu.set(1,1,firstmsg)
- term.setCursor(1,2)
- gpu.set(1,3,"Please enter the username:")
- term.setCursor(27,3)
- local username=io.read()
- if username==username1 then
- gpu.set(1,4,"Please enter the password:")
- term.setCursor(27,4)
- local password=io.read()
- if password==password1 then
- end
- else if password~=password1 then
- gpu.set(1,6,"Wrong Username !")
- os.sleep(delay2)
- end
- end
- while true do
- if username==username2 then
- gpu.set(1,4,"Please enter the password:")
- term.setCursor(27,4)
- local password=io.read()
- if password==password1 then
- end
- else
- gpu.set(1,6,"Wrong Username !")
- os.sleep(delay2)
- end
- while true do
- term.clear()
- gpu.set(1,1,"BNK-SYSTEMS REACTOR CONTROL")
- gpu.set(1,3,"COMMANDS:")
- gpu.set(1,5,"start reactor <number>")
- gpu.set(1,6,"stop reactor <number>")
- gpu.set(1,8,"ENTER COMMAND PLEASE:")
- term.setCursor(23,8)
- local command=io.read()
- if command==commands1 then --reactor 1 on
- rs.setOutput(sides.top,15)
- else if command==commands2 then --reactor 1 off
- rs.setOutput(sides.top,0)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement