Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variablen & Startcommand
- local monitor = peripheral.wrap("right")
- local x,y = monitor.getSize()
- monitor.clear()
- monitor.setCursorPos(1,y/2)
- --Functions
- function mn()
- monitor.setBackgroundColor(1)
- monitor.setTextColor(32768)
- end
- function reload()
- sleep(0.2)
- monitor.clear()
- monitor.setCursorPos(1,y/2)
- mn()
- end
- function load()
- monitor.write("Fireworksystem from PWE_AQG")
- sleep(5)
- monitor.clear()
- monitor.setCursorPos(1,y/2)
- mn()
- monitor.write("Loading ....")
- sleep(7)
- monitor.clear()
- monitor.setCursorPos(1,y/2)
- mn()
- loading()
- loading()
- end
- function loading()
- monitor.write("Loading |")
- reload()
- monitor.write("Loading /")
- reload()
- monitor.write("Loading -")
- reload()
- monitor.write("Loading %")
- reload()
- monitor.write("Loading |")
- reload()
- monitor.write("Loading /")
- reload()
- monitor.write("Loading -")
- reload()
- monitor.write("Loading %")
- reload()
- end
- function shut()
- redstone.setOutput("left", true)
- sleep(0.2)
- redstone.setOutput("left", false)
- sleep(0.2)
- end
- start = "start"
- green = "green"
- blue = "blue"
- white = "white"
- show = "show"
- --Mainpart
- while (true) do
- mn()
- load()
- monitor.write("Please go to the Maincomputer!")
- print("Welcome! Please insert 'start' to Start and wait 10sek")
- local input = read()
- sleep(10)
- monitor.clear()
- monitor.setCursorPos(1,y/2)
- mn()
- if start == input then
- print("Chose a color! (green/blue/white/show) and wait 10sek")
- local input2 = read()
- sleep(10)
- if green == input2 then
- monitor.setBackgroundColor(32)
- monitor.setTextColor(256)
- redstone.setOutput("top", true)
- sleep(0.2)
- redstone.setOutput("top", false)
- print("Start in 15sek")
- monitor.write("Start in 15sek with green")
- sleep(15)
- shut()
- os.reboot()
- end
- if blue == input2 then
- monitor.setBackgroundColor(2048)
- monitor.setTextColor(128)
- redstone.setOutput("back", true)
- sleep(0.2)
- redstone.setOutput("back", false)
- print("Start in 15sek")
- monitor.write("Start in 15sek with blue")
- sleep(15)
- shut()
- os.reboot()
- end
- if white == input2 then
- monitor.setBackground(1)
- monitor.setTextColor(256)
- redstone.setOutput("bottom", true)
- sleep(0.2)
- redstone.setOutput("bottom", false)
- print("Start in 15sek")
- monitor.write("Start in 15sek with white")
- sleep(15)
- shut()
- os.reboot()
- end
- if show == input2 then
- monitor.setBackgroundColor(16)
- monitor.setTextColor(16384)
- redstone.setOutput("top", true)
- sleep(0.4)
- redstone.setOutput("top", false)
- redstone.setOutput("back", true)
- sleep(0.6)
- redstone.setOutput("back", false)
- redstone.setOutput("bottom", true)
- sleep(0.2)
- redstone.setOutput("bottom", false)
- print("Start in 15sek")
- monitor.write("Start in 15 sek with Show")
- sleep(15)
- shut()
- shut()
- shut()
- shut()
- shut()
- shut()
- shut()
- shut()
- os.reboot()
- end
- else
- mn()
- print("Please write start to Begin!")
- sleep(5)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement