Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local event = require("event")
- local fs = require("filesystem")
- local component = require("component")
- local term = require("term")
- local colors = require("colors")
- local computer = require("computer")
- local rs = component.redstone
- local sides = require("sides")
- local gpu = component.gpu
- local os = require("os")
- function triggerOutput(other_color)
- rs.setBundledOutput(sides.east, colors.black, 255)
- os.sleep (6)
- rs.setBundledOutput(sides.east, colors.black, 0)
- os.sleep (1)
- rs.setBundledOutput(sides.east, other_color, 255)
- os.sleep (3)
- rs.setBundledOutput(sides.east, other_color, 0)
- end
- function main()
- while true do
- term.clear()
- term.setCursor(1,1)
- gpu.setResolution(30, 7)
- gpu.setBackground(0x0033FF)
- gpu.setForeground(0xFFFF00)
- print("")
- print(" Utility Explorer")
- print("")
- print(" Combat Ceremony")
- print("")
- print(" Ultimate Botanical")
- local _,_,x,y = event.pull("touch")
- if x>=4 and y==2 and x<=10 then
- triggerOutput(colors.blue)
- elseif x>=21 and y==2 and x<=30 then
- triggerOutput(colors.gray)
- elseif x>=4 and y==4 and x<=10 then
- triggerOutput(colors.green)
- elseif x>=21 and y==4 and x<=30 then
- triggerOutput(colors.purple)
- elseif x>=4 and y==6 and x<=10 then
- triggerOutput(colors.orange)
- elseif x>=21 and y==6 and x<=30 then
- triggerOutput(colors.red)
- end
- -- always a good idea to sleep in a tight loop
- os.sleep(1)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement