Guest User

door shitcode v2

a guest
Apr 5th, 2022
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import time;
  2.  
  3. String d = "Door";
  4. d.Open = false;
  5. int lockOpening = 0; // waits for the button to release before it tries to open/close the door again to prevent it getting stuck
  6. while (true)
  7. {
  8. X = 1.chimera;
  9. Signal( “Off” ; X);
  10. User = int(input(1 OR 0)); //Press the button
  11. if (lockOpening == 0) //
  12. {
  13. if (User == 1)
  14. {
  15. lockOpening = 1;
  16. if (d.Open == false)
  17. {
  18. d.Open = true;
  19. print(“Opening”);
  20. }
  21. else
  22. {
  23. d.Open = false;
  24. print(“Closing”);
  25. }
  26. }
  27. }
  28. else if (lockOpening == 1)
  29. {
  30. if (User == 0)
  31. {
  32. lockOpening = 0;
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment