Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x = 1
- wsstat = true
- blstat = true
- zpstat = true
- term.clear()
- while true do
- term.setCursorPos(1,1)
- term.setBackgroundColor((x==1) and colors.blue or colors.black)
- term.setTextColor(wsstat and colors.red or colors.green)
- print("Wither Skeletons: "..(wsstat and "Off" or "On "))
- term.setBackgroundColor((x==2) and colors.blue or colors.black)
- term.setTextColor(zpstat and colors.red or colors.green)
- print("Zombie Pigmen: "..(zpstat and "Off" or "On "))
- term.setBackgroundColor((x==3) and colors.blue or colors.black)
- term.setTextColor(blstat and colors.red or colors.green)
- term.write("Blazes: "..(blstat and "Off" or "On "))
- event, key = os.pullEvent("key")
- if key == 208 then -- Down key pressed
- x = x + 1
- if x > 3 then x = 1 end
- end
- if key == 200 then -- Up key pressed
- x = x - 1
- if x < 1 then x = 3 end
- end
- if key == 28 or key == 57 then -- Enter or space keys pressed
- if x == 1 then
- wsstat = not wsstat
- redstone.setOutput("back", wsstat)
- elseif x == 2 then
- zpstat = not zpstat
- rs.setOutput("right", zpstat)
- elseif x == 3 then
- blstat = not blstat
- rs.setOutput("left", blstat)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment