Actions taken during the last timed sequence determine which ending will appear. The last sequence starts after Roger the cockroachhas visited his human body for the first time and has returned to the sewer pipes through the vent on the upper right corner of the wall covered with eyes.
Run out of time by remaining idle for about ten minutes.
Slightly better ending
Roger has to save the landlord. As hinted by the oracle in the start of the timed sequence, his pill-induced stupor requires setting off a fire alarm. The only working alarm is located in the bathroom. Climb on to the top of the urinal, continue further upwards to the top of the bulletin board, then move to the right and up through the unpainted area. Test the fire alarm by placing yourself over the test button. Climb down to the urinal and push the flaming cigarette to the floor. Climb down and push the flaming end to the chain of paper towels. After that, wait for time to run out.
Even better ending
Roger must save himself. Go back to your own room and find your human body on the floor. You must hitch a ride from the butterfly to get to the table before you can get down to the floor. Climb on top of the amulet. The ending sequence will immediately start.
Roger has to save both the landlord and himself. Save the landlord first as described in the "Slightly better" ending. Then immeiately find your way back to your own room as described in the "Even better" ending. The best ending will begin once you crawl over the amulet.