He Needed to Get Lucky
He thought of a plan: he was going to wait for the scientist to walk out the door, and just before it closed, he would sneak into the lab. Of course, his plan required a lot of luck to even work. But there was nothing else Tommy could do. He did not know the code and he needed to get inside without that man seeing him.