View difference between Paste ID: qJXq2BmJ and VLTCEZkH
SHOW: | | - or go back to the newest paste.
1
--Colors
2
local white = 1
3
local black = 32768
4
local green = 8192
5
local red = 16384
6
local blue = 2048
7
local lightBlue = 8
8
local pink = 64
9
10
--Locations
11
local Loc0 = nil
12
local Loc1 = 'Reactors'
13
local Loc2 = 'Silos'
14
local Loc3 = 'Computer WIP'
15
local Loc4 = 'Bees WIP'
16
local Loc5 = 'Portals WIP'
17
18
--Functions
19
function cls(color)
20
term.setBackgroundColor(color)
21
term.clear()
22
term.setCursorPos(1,1)
23
end
24
25
function frqMsg(number)
26
print('Frequency ' .. number ..' in use, please wait..')
27
end
28
29
function travelMsg(location)
30
write(location .. ' selected.'..
31
'\nKeep hands and arms away from slimes.')
32
end
33
34
--Vars
35
local timer = 30
36
local power = true
37
38
--Main
39
while power == true do
40
redstone.setBundledOutput('back', 0)
41
42
cls(pink)
43
term.setCursorPos(1,1)
44
write('Please select number for destination.\n'..
45
'\n1: ' .. Loc1 ..
46
'\n2: ' .. Loc2 ..
47
'\n3: ' .. Loc3 ..
48
'\n4: ' .. Loc4 ..
49
'\n5: ' .. Loc5)
50
51
term.setCursorPos(35,17)
52
term.setTextColor(red)
53
print('0: Power Reboot')
54
55
term.setCursorPos(1,9)
56
term.setTextColor(white)
57
userInput = io.read()
58
59
if userInput == ('0' or nil) then
60
cls(red)
61
redstone.setBundledOutput('back', 0)
62
os.sleep(0.5)
63
textutils.slowPrint('POWER REBOOTED\nRETURNING TO MENU..')
64
os.sleep(1.5)
65
end
66
67
if userInput == ('1') then
68
cls(pink)
69
travelMsg(Loc1)
70
os.sleep(1)
71
redstone.setBundledOutput('back', colors.combine(black, white))
72
os.sleep(3)
73
cls(pink)
74
redstone.setBundledOutput('back', colors.subtract(redstone.getBundledOutput('back'), white))
75
frqMsg(10)
76
os.sleep(timer)
77
redstone.setBundledOutput('back', 0)
78
end
79
80
if userInput == ('2') then
81
cls(pink)
82
travelMsg(Loc2)
83
os.sleep(1)
84
redstone.setBundledOutput('back', colors.combine(black, white))
85
os.sleep(3)
86
cls(pink)
87
frqMsg(10)
88
redstone.setBundledOutput('back', colors.subtract(redstone.getBundledOutput('back'), white, black))
89
os.sleep(timer)
90
redstone.setBundledOutput('back', 0)
91
end
92
93
end