Make global variables, as they register through all layouts.
Something like global var DoorOpen = true
Then when you click to close door, make DoorOpen false. Then vise versa.
Then you can pull off something like when you close the door, Freddy starts knocking a bit then leaves.