Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- term.redirect(m)
- bg={path="/bg",xpos=1,ypos=1}
- function backGround()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(bg["xpos"], bg["ypos"])
- img = paintutils.loadImage(bg["path"])
- paintutils.drawImage(img, bg["xpos"], bg["ypos"])
- end
- function numbers()
- term.setTextColor(colors.white)
- term.setCursorPos(1, 2)
- term.write("1")
- term.setCursorPos(2, 2)
- term.write("2")
- term.setCursorPos(3, 2)
- term.write("3")
- term.setCursorPos(1, 3)
- term.write("4")
- term.setCursorPos(2, 3)
- term.write("5")
- term.setCursorPos(3, 3)
- term.write("6")
- term.setCursorPos(1, 4)
- term.write("7")
- term.setCursorPos(2, 4)
- term.write("8")
- term.setCursorPos(3, 4)
- term.write("9")
- term.setCursorPos(2, 5)
- term.write("0")
- end
- backGround()
- numbers()
- local inp = 1
- local count = 0
- while true do
- local event,right,x,y = os.pullEvent()
- if event == "monitor_touch" then
- count = count+1
- if x == 1 and y == 2 then
- inp = inp*2
- end
- if x == 2 and y == 2 then
- inp = inp*3
- end
- if x == 3 and y == 2 then
- inp = inp*4
- end
- if x == 1 and y == 3 then
- inp = inp*5
- end
- if x == 2 and y == 3 then
- inp = inp*6
- end
- if x == 3 and y == 3 then
- inp = inp*7
- end
- if x == 1 and y == 4 then
- inp = inp*8
- end
- if x == 2 and y == 4 then
- inp = inp*9
- end
- if x == 3 and y == 4 then
- inp = inp*10
- end
- if x == 2 and y == 5 then
- inp = inp*1
- end
- if inp == 72 then
- term.setBackgroundColor(colors.green)
- redstone.setOutput("top",true)
- sleep(5)
- redstone.setOutput("top", true)
- inp = 1
- count = 0
- end
- if count == 4 then
- inp = 1
- count = 0
- term.setBackgroundColor(colors.red)
- sleep(0.5)
- end
- end
- end
- term.restore()
Advertisement
Add Comment
Please, Sign In to add comment