FairfaxGamingYT

Fire Alarm Database for MC

Nov 15th, 2025 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local component = require("component")
  2. local rs = component.redstone
  3. local term = require("term")
  4.  
  5. -- Alarm messages
  6. local location1 = "Activated Fire Alarm, 41827 Mesawood Ave, Watson Valley"
  7. local location2 = "Activated Fire Alarm, 47129 Watson Valley Dr., Watson Valley"
  8.  
  9. -- Project Red bundled color IDs
  10. local WHITE = 0
  11. local ORANGE = 1
  12.  
  13. while true do
  14. local bundled = rs.getBundledInput("back")
  15.  
  16. term.clear()
  17.  
  18. -- Check white wire (Location 1)
  19. if (bundled & (1 << WHITE)) ~= 0 then
  20. print(location1)
  21.  
  22. -- Check orange wire (Location 2)
  23. elseif (bundled & (1 << ORANGE)) ~= 0 then
  24. print(location2)
  25.  
  26. else
  27. print("No current alarms.")
  28. end
  29.  
  30. os.sleep(0.1)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment