Can someone please help with my keys?

Every-time I grab the key and then open the door, it doesn’t remove the key, so i can then open every single door without needing the next key.
Here’s my game-
https://flowlab.io/game/play/1068924

Because when you message OPEN to all doors, it turns all the doors on.
Whenever the player has 0 keys, also send LOCK to all doors to turn them off.
2020.01.14-19.41

Thx a lot