View difference between Paste ID: NUL9cUkq and QXn1256w
SHOW: | | - or go back to the newest paste.
1
--Locals
2
3
local powersys
4
local shield
5
6
-- orange powers shield
7
-- white powers power
8
-- blue activates shield
9
-- yellow acivates power
10
11
12
13
14
monitor = peripheral.wrap("monitor_1")
15
16
monitor.setTextScale(0.5)
17
monitor.setBackgroundColor(colors.black)
18
19
while true do
20
21
monitor.clear()
22
 monitor.setCursorPos(1,1)
23
 monitor.setTextColor(colors.white)
24
 monitor.write('Shield System')
25
 
26
 if redstone.testBundledInput("back", colors.yellow) then
27
    monitor.setTextColor(colors.green)
28
	monitor.setCursorPos(1,3)
29
	monitor.write('Shield Power')
30
        monitor.setCursorPos(1,4)
31
        monitor.write('Active')
32
	redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.white)) 
33
        
34
 else
35
    monitor.setTextColor(colors.red)
36
	monitor.setCursorPos(1,3)
37
	monitor.write('Shield Power')
38
        monitor.setCursorPos(1,4)
39
        monitor.write('Inactive')
40
	redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))	
41
        
42
 
43
 if redstone.testBundledInput("back", colors.blue) then
44
    monitor.setTextColor(colors.green)
45
	monitor.setCursorPos(1,6)
46
	monitor.write('Projector')
47
	monitor.setCursorPos(1,7)
48
	monitor.write('Active')
49
	redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.orange)) 
50
        sleep(1)
51
 else
52
     monitor.setTextColor(colors.red)
53
	monitor.setCursorPos(1,6)
54
	monitor.write('Projector')
55
	monitor.setCursorPos(1,7)
56
	monitor.write('Inactive')
57
	redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.orange))
58
        sleep(1)	
59
 end
60
sleep(3)   
61
end