Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("c")
- mon = peripheral.find("monitor")
- sec = 2
- bc = colors.black
- tc = colors.red
- line = 6
- click = 6
- clickTwo = 6
- all = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 8192 + 16384 + 32768
- function NewLine()
- line = line +1
- mon.setCursorPos(1,line)
- end
- function te(write)
- c.mWrite(write)
- NewLine()
- NewLine()
- end
- function buttonTwo()
- local event, side, x , y = os.pullEvent("monitor_touch")
- -- FIRST PAGE --
- if x > 1 and x < 7 and y == 26 then
- pageOne()
- end
- end
- function pageOne()
- mon.setBackgroundColor(bc)
- mon.setTextColor(tc)
- mon.clear()
- rs.setBundledOutput("back", all)
- mon.setCursorPos(1,2)
- c.mWrite("-----------------")
- mon.setCursorPos(1,3)
- c.mWrite("| Select Fluid: |")
- mon.setCursorPos(1,4)
- c.mWrite("-----------------")
- mon.setCursorPos(23,26)
- mon.write("Page 2")
- mon.setCursorPos(1,26)
- mon.write(" ")
- mon.setCursorPos(1,6)
- te("UUM")
- te("Blood(BM)")
- te("Bedrockium")
- te("Coolant")
- te("Draconium")
- te("Primal Mana")
- te("Liquid Ender")
- te("Emerald")
- te("Shiny")
- te("XP")
- te("Gold")
- end
- function pageTwo()
- mon.setBackgroundColor(bc)
- mon.setTextColor(tc)
- rs.setBundledOutput("back", all)
- mon.setCursorPos(1,2)
- c.mWrite("-----------------")
- mon.setCursorPos(1,3)
- c.mWrite("| Select Fluid: |")
- mon.setCursorPos(1,4)
- c.mWrite("-----------------")
- mon.setCursorPos(1,26)
- mon.write("Page 1")
- mon.setCursorPos(23,26)
- mon.write(" ")
- buttonTwo()
- end
- function setBk()
- mon.setBackgroundColor(bc)
- mon.clear()
- pageOne()
- end
- function setBkk()
- mon.setBackgroundColor(bc)
- mon.clear()
- pageTwo()
- end
- function bClick()
- click = click + 2
- end
- function buttonOne()
- local event, side, x , y = os.pullEvent("monitor_touch")
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- print("UUM")
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("UUM")
- rs.setBundledOutput("back", all - colors.purple)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Blood(BM)")
- print("Blood")
- rs.setBundledOutput("back", all - colors.red)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Bedrockium")
- print("Bedrockium")
- rs.setBundledOutput("back", all - colors.black)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Coolant")
- print("Coolant")
- rs.setBundledOutput("back", all - colors.cyan)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Draconium")
- print("Draconium")
- rs.setBundledOutput("back", all - colors.white)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- print("Primal Mana")
- rs.setBundledOutput("back", all - colors.magenta)
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Primal Mana")
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1, click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Liquid Ender")
- rs.setBundledOutput("back", all - colors.green)
- end
- bClick()
- if x > 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1, click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Emerald")
- rs.setBundledOutput("back", all - colors.orange)
- end
- bClick()
- if x> 1 and x < 40 and y == click then
- for i = 1, 26 do
- mon.setCursorPos(1,i)
- mon.setBackgroundColor(bc)
- end
- mon.setCursorPos(1,click)
- mon.setBackgroundColor(colors.lime)
- c.mWrite("Shiny")
- rs.setBundledOutput("back", all - 8)
- end
- -- NEXT PAGE BUTTON --
- if x > 23 and x < 26 and y == 26 then
- pageTwo()
- end
- end
- setBk()
- while true do
- pageOne()
- buttonOne()
- sleep(sec)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement