Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rs.setBundledOutput("back", 0)
- m = peripheral.wrap("right")
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.setTextScale(1)
- m.setCursorPos(1,1)
- m.setTextColor(colors.black)
- m.setBackgroundColor(colors.lightGray)
- m.write(" MFR Auto-Spawner Control Panel ")
- m.setCursorPos(1,3)
- m.setTextColor(colors.black)
- m.setBackgroundColor(colors.lightGray)
- m.write("Current Mob:")
- e = " None "
- line1 = 2
- line2 = 15
- line3 = 28
- y = 0
- --Functions--
- function enderman()
- rs.setBundledOutput("back", colors.white)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function witherSkeleton()
- rs.setBundledOutput("back", colors.orange)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function ghast()
- rs.setBundledOutput("back", colors.magenta)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function slime()
- rs.setBundledOutput("back", colors.purple)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function witch()
- rs.setBundledOutput("back", colors.yellow)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function blaze()
- rs.setBundledOutput("back", colors.lime)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function sheep()
- rs.setBundledOutput("back", colors.pink)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function cow()
- rs.setBundledOutput("back", colors.gray)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function creeper()
- rs.setBundledOutput("back", colors.lightGray)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function ironGolem()
- rs.setBundledOutput("back", colors.cyan)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- function reset()
- rs.setOutput("top", true)
- sleep(1)
- rs.setOutput("top", false)
- end
- function format()
- m.setTextColor(colors.black)
- m.setBackgroundColor(colors.lightGray)
- end
- function CurrMob()
- m.setCursorPos(15, 3)
- format()
- m.write(e)
- end
- --Main--
- reset()
- m.setCursorPos(line3 + 3, 3)
- format()
- m.write(" Reset ")
- m.setCursorPos(1,5)
- format()
- m.write("--------------Select One---------------")
- m.setCursorPos(line1, 7)
- format()
- m.write(" Enderman ")
- m.setCursorPos(line2, 7)
- format()
- m.write(" Ghast ")
- m.setCursorPos(line3, 7)
- format()
- m.write(" Sheep ")
- m.setCursorPos(line1, 9)
- format()
- m.write(" Blaze ")
- m.setCursorPos(line2, 9)
- format()
- m.write(" Slime ")
- m.setCursorPos(line3, 9)
- format()
- m.write(" Witch ")
- m.setCursorPos(line3, 11)
- format()
- m.write(" Creeper ")
- m.setCursorPos(line1, 11)
- format()
- m.write(" Cow ")
- m.setCursorPos(line2, 11)
- format()
- m.write("Iron Golem")
- m.setCursorPos(line1, 13)
- format()
- m.write(" Wither Skeleton ")
- --where the magic happens--
- while true do
- event, p1, p2, p3 = os.pullEvent("monitor_touch")
- x = p2
- y = p3
- m.setCursorPos(15,3)
- format()
- m.write(e)
- if x>line1 and x<12 and y == 7 then
- e = " Enderman "
- CurrMob()
- reset()
- y = 7
- enderman()
- elseif x>line2 and x<25 and y == 7 then
- e = " Ghast "
- CurrMob()
- reset()
- y = 7
- ghast()
- elseif x>line3 and x<38 and y == 7 then
- e = " Sheep "
- CurrMob()
- reset()
- y = 7
- sheep()
- elseif x>line1 and x<12 and y == 9 then
- e = " Blaze "
- CurrMob()
- reset()
- y = 9
- blaze()
- elseif x>line2 and x<25 and y == 9 then
- e = " Slime "
- CurrMob()
- reset()
- y = 9
- slime()
- elseif x>line3 and x<38 and y == 9 then
- e = " Witch "
- CurrMob()
- reset()
- y = 9
- witch()
- elseif x>line1 and x<12 and y == 11 then
- e = " Cow "
- CurrMob()
- reset()
- y = 11
- cow()
- elseif x>line2 and x<25 and y == 11 then
- e = "Iron Golem"
- CurrMob()
- reset()
- y = 11
- ironGolem()
- elseif x>line1 and x<19 and y == 13 then
- e = "Wither Skelly"
- CurrMob()
- reset()
- y = 13
- witherSkeleton()
- elseif x>line3 and x<38 and y == 11 then
- e = " Creeper "
- CurrMob()
- reset()
- y = 13
- creeper()
- elseif x>line3+2 and x<38 and y == 3 then
- e = " None "
- CurrMob()
- m.setCursorPos(line3 + 3, 3)
- m.setBackgroundColor(colors.red)
- m.setTextColor(colors.black)
- m.write(" Reset ")
- reset()
- sleep(.5)
- m.setCursorPos(line3 + 3, 3)
- format()
- m.write(" Reset ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment