Make TPS to walk for my game

OK, first, I want to make a script that depends on the camera that orbit the player(mouseOrbit) and I want that when you press "W" the player rotates in front of the camera and when you press "S" the player rotates backwards of the camera and "a" left and "d" right, so for doing this I have try many things like using Rotate, rotation, Slerp, LookAt, eulerAngles, localRotation ,etc. and no one of this works like I want, this is an idea of what I want:

if(Input.GetKey("w")){
/*go front of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("s")){
/*go back of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("a")){
/*go left of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("d")){
/*go right of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}

Note: I want a way that if you press like "w" and "d" it doesnt go front or right it does between the 2 directions

you could make empty objects that have a rotation and position pointing at your character for each of the directions. Parent them to your character in the scene so that they move around with him. if you then want to move the camera to the right...Slerp the camera to the angle of that object and Lerp the camera to the position of that object.

to make the objects....align your view in the scene view at the point and direction you want the camera to be at....create an empty object...select that object..then press align with view in the menu system...i forget where it is.

that will line up the object exactly how your view in the scene is. then when you move and rotate the camera to that position it will be looking exactly how you want it to look.