Advertisement
cochise57

Untitled

Aug 20th, 2015
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2. local s = sensor.wrap("back")
  3. redstone.setBundledOutput("bottom", 0)
  4. while true do
  5.  
  6. for key,value in pairs(s.getTargets()) do
  7. if value.Riding ~= nil then
  8. if value.Riding.Name == "Skeleton" then
  9. redstone.setBundledOutput("bottom", colors.gray)
  10. while redstone.testBundledInput("left", colors.yellow) == false do
  11. os.sleep(0.2)
  12. end
  13. print(value.Riding.Name)
  14. redstone.setBundledOutput("bottom", 0)
  15. elseif value.Riding.Name == "Zombie" then
  16. redstone.setBundledOutput("bottom", colors.green)
  17. while redstone.testBundledInput("left", colors.yellow) == false do
  18. os.sleep(0.2)
  19. end
  20. print(value.Riding.Name)
  21. redstone.setBundledOutput("bottom", 0)
  22. elseif value.Riding.Name == "Spider" then
  23. redstone.setBundledOutput("bottom", colors.black)
  24. while redstone.testBundledInput("left", colors.yellow) == false do
  25. os.sleep(0.2)
  26. end
  27. print(value.Riding.Name)
  28. redstone.setBundledOutput("bottom", 0)
  29. elseif value.Riding.Name == "Creeper" then
  30. redstone.setBundledOutput("bottom", colors.white)
  31. while redstone.testBundledInput("left", colors.yellow) == false do
  32. os.sleep(0.2)
  33. end
  34. print(value.Riding.Name)
  35. redstone.setBundledOutput("bottom", 0)
  36. else
  37. redstone.setBundledOutput("bottom", 0)
  38. print(value.Riding.Name)
  39. end
  40. end
  41. end
  42. os.sleep(0.5)
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement