Basic FPS camera movement

here are some fellow codes that could be of help but i didnt know how to translate to my needs: