The player doesn't actually do much without their trusty Portal Gun, only moving, jumping, and restarting the level
Speaking of the trusty Portal Gun, here it is, this allows the player to create portals, which are essential for the game.
Code that teleports the player, and while that sounds somewhat simple, to make it bug-free is very complicated
These can be placed around the level, allowing the player to freely jump and teleport around any objects between the start of the level and the end.