Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- local s = sensor.wrap("back")
- redstone.setBundledOutput("bottom", 0)
- while true do
- for key,value in pairs(s.getTargets()) do
- if value.Riding ~= nil then
- if value.Riding.Name == "Skeleton" then
- redstone.setBundledOutput("bottom", colors.gray)
- while redstone.testBundledInput("left", colors.yellow) == false do
- os.sleep(0.2)
- end
- print(value.Riding.Name)
- redstone.setBundledOutput("bottom", 0)
- elseif value.Riding.Name == "Zombie" then
- redstone.setBundledOutput("bottom", colors.green)
- while redstone.testBundledInput("left", colors.yellow) == false do
- os.sleep(0.2)
- end
- print(value.Riding.Name)
- redstone.setBundledOutput("bottom", 0)
- elseif value.Riding.Name == "Spider" then
- redstone.setBundledOutput("bottom", colors.black)
- while redstone.testBundledInput("left", colors.yellow) == false do
- os.sleep(0.2)
- end
- print(value.Riding.Name)
- redstone.setBundledOutput("bottom", 0)
- elseif value.Riding.Name == "Creeper" then
- redstone.setBundledOutput("bottom", colors.white)
- while redstone.testBundledInput("left", colors.yellow) == false do
- os.sleep(0.2)
- end
- print(value.Riding.Name)
- redstone.setBundledOutput("bottom", 0)
- else
- redstone.setBundledOutput("bottom", 0)
- print(value.Riding.Name)
- end
- end
- end
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement