What’s the question?
At the moment it seems like you are asking the community to write you a camera script.
Assuming that you are asking the logic behind it, it’s fairly simple (and you have mostly answered your own question as to how to move the camera and everything). Look at the documentation and lmk if you have any issues.
I suggest completely rewriting this as the logic is terribly written. It’s extremely messy as well. Why not just have the localscript in starterGui in the first place?
Overall I recommend writing it over again and making it a module.