Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- API = require("buttonAPI")
- local event = require("event")
- local computer = require("computer")
- local term = require("term")
- local component = require("component")
- local gpu = component.gpu
- local rs = component.redstone
- local colors = require("colors")
- local side = require("sides")
- function API.fillTable()
- API.setTable("Enderman", Enderman, 10,20,3,5)
- API.setTable("Skeleton", Skeleton, 22,32,3,5)
- API.setTable("Wither Skeleton", WitherSkeleton, 10,20,8,10)
- API.setTable("Slime", Slime, 22,32,8,10)
- API.screen()
- end
- function getClick()
- local _, _, x, y = event.pull(1,touch)
- if x == nil or y == nil then
- local h, w = gpu.getResolution()
- gpu.set(h, w, ".")
- gpu.set(h, w, " ")
- else
- API.checkxy(x,y)
- end
- end
- function enderman()
- API.toggleButton("Toggle")
- if buttonStatus == true then
- -- # If the button is on (green) do something.
- else
- -- # If the button is off (red) do this instead.
- end
- end
- function Skeleton()
- API.toggleButton("Toggle")
- if buttonStatus == true then
- -- # If the button is on (green) do something.
- else
- -- # If the button is off (red) do this instead.
- end
- end
- function WitherSkeleton()
- API.toggleButton("Toggle")
- if buttonStatus == true then
- -- # If the button is on (green) do something.
- else
- -- # If the button is off (red) do this instead.
- end
- end
- function Slime()
- API.toggleButton("Toggle")
- if buttonStatus == true then
- -- # If the button is on (green) do something.
- else
- -- # If the button is off (red) do this instead.
- end
- end
- term.setCursorBlink(false)
- gpu.setResolution(80, 25)
- API.clear()
- API.fillTable()
- while true do
- getClick()
- end
- --eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement