Advertisement
DOGGYWOOF

Untitled

Jul 22nd, 2024
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. -- Check if the redstone signal is present on the left side of the computer
  2. local side = "left"
  3.  
  4. -- Function to check door status
  5. local function checkDoor()
  6. if redstone.getInput(side) then
  7. print("The door is open.")
  8. else
  9. print("The door is closed.")
  10. end
  11. end
  12.  
  13. -- Main loop to continuously check the door status
  14. while true do
  15. checkDoor()
  16. sleep(1) -- Wait for 1 second before checking again
  17. end
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement