Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Colors
- local white = 1
- local black = 32768
- local green = 8192
- local red = 16384
- local blue = 2048
- local lightBlue = 8
- local pink = 64
- --Locations
- local Loc0 = nil
- local Loc1 = 'Reactors'
- local Loc2 = 'Silos'
- local Loc3 = 'Computer WIP'
- local Loc4 = 'Bees WIP'
- local Loc5 = 'Portals WIP'
- --Functions
- function cls(color)
- term.setBackgroundColor(color)
- term.clear()
- term.setCursorPos(1,1)
- end
- function frqMsg(number)
- print('Frequency ' .. number ..' in use, please wait..')
- end
- function travelMsg(location)
- write(location .. ' selected.'..
- '\nKeep hands and arms away from slimes.')
- end
- --Vars
- local timer = 30
- local power = true
- --Main
- while power == true do
- redstone.setBundledOutput('back', 0)
- cls(pink)
- term.setCursorPos(1,1)
- write('Please select number for destination.\n'..
- '\n1: ' .. Loc1 ..
- '\n2: ' .. Loc2 ..
- '\n3: ' .. Loc3 ..
- '\n4: ' .. Loc4 ..
- '\n5: ' .. Loc5)
- term.setCursorPos(35,17)
- term.setTextColor(red)
- print('0: Power Reboot')
- term.setCursorPos(1,9)
- term.setTextColor(white)
- userInput = io.read()
- if userInput == ('0' or nil) then
- cls(red)
- redstone.setBundledOutput('back', 0)
- os.sleep(0.5)
- textutils.slowPrint('POWER REBOOTED\nRETURNING TO MENU..')
- os.sleep(1.5)
- end
- if userInput == ('1') then
- cls(pink)
- travelMsg(Loc1)
- os.sleep(1)
- redstone.setBundledOutput('back', colors.combine(black, white))
- os.sleep(3)
- cls(pink)
- redstone.setBundledOutput('back', colors.subtract(redstone.getBundledOutput('back'), white))
- frqMsg(10)
- os.sleep(timer)
- redstone.setBundledOutput('back', 0)
- end
- if userInput == ('2') then
- cls(pink)
- travelMsg(Loc2)
- os.sleep(1)
- redstone.setBundledOutput('back', colors.combine(black, white))
- os.sleep(3)
- cls(pink)
- frqMsg(10)
- redstone.setBundledOutput('back', colors.subtract(redstone.getBundledOutput('back'), white, black))
- os.sleep(timer)
- redstone.setBundledOutput('back', 0)
- end
- end
Add Comment
Please, Sign In to add comment