Key code now works correctly.

Picking up the key destroys the cube object and sets the boolean.