Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --coded by eliteanax17
- local gpu = require("component").gpu
- local term = require("term")
- local refresh_rate = 1
- gpu.setForeground(0xFFFFFF) -- default OS color
- term.clear()
- function round(t)
- return math.floor(t*10)*0.1
- end
- number = 16
- gpu.setResolution(round(number * 2), number)
- term.write("Initiate sleep mode? (y/n): ")
- choice = term.read()
- statuscolor = 0xEEEEEE
- activecolor = 0x00FF00
- inactivecolor = 0xFF0000
- if choice == "y\n" then -- the \n is needed to mask the input correctly. very dumb.
- term.clear()
- gpu.setForeground(statuscolor)
- gpu.set(1, 1, "-------STATUS-------")
- gpu.set(1, 3, "Stasis Pod #1: ")
- gpu.set(1, 4, "Stasis Pod #2: ")
- gpu.set(1, 5, "Stasis Pod #3: ")
- gpu.set(1, 6, "Stasis Pod #4: ")
- gpu.set(1, 7, "Stasis Pod #5: ")
- gpu.set(1, 8, "Stasis Pod #6: ")
- gpu.set(1, 9, "Stasis Pod #7: ")
- gpu.set(1, 10, "Stasis Pod #8: ")
- gpu.setForeground(activecolor)
- gpu.set(16, 3, "ACTIVE")
- gpu.set(16, 4, "ACTIVE")
- gpu.set(16, 5, "ACTIVE")
- gpu.set(16, 6, "ACTIVE")
- gpu.set(16, 7, "ACTIVE")
- gpu.set(16, 8, "ACTIVE")
- gpu.set(16, 9, "ACTIVE")
- gpu.set(16, 10, "ACTIVE")
- gpu.setForeground(statuscolor)
- gpu.set(1, 12, "Program is currently in")
- gpu.setForeground(0xAAAAFF)
- gpu.set(1, 13, "Protection Mode")
- gpu.setForeground(statuscolor)
- gpu.set(17, 13, "and will")
- gpu.set(1, 14, "continue to run until an")
- gpu.set(1, 15, "overworld status of")
- gpu.setForeground(activecolor)
- gpu.set(21, 15, "ALL-CLEAR")
- gpu.setForeground(statuscolor)
- gpu.set(1, 16, "is determined.")
- repeat
- os.sleep(refresh_rate) -- do nothing
- until false
- else
- term.write("Terminating program...")
- end
Add Comment
Please, Sign In to add comment