Player Controller Rotation Script Help

Hello, I’m in the early stages of a game design. It’s between a third person and top down shooter. I’m not the programming type, more of a designer, so I need help making a script.
At the moment, all I have is a cube and the ground. I have a script that moves the character, but not quite how I would like it. There is also no gravity. I need a script that, when pressing “w” or “s” the cube moves back and forth and when I press “a” or “d” , I want the cube to rotate rather than moving like “w” and “s” movements. I also have the camera under the player cube in the hierarchy so the camera moves with the cube

What I always say is that you need to break apart the problem, what you basically need is input which controls movement and rotation. First of all, these are, not to anyones surprise, the most asked questions - so searching for them would serve you a fair amount of results. Unity also have a lot of sweet examples in their scripting reference, for instance - the GetAxis in the Input class shows you exactly what you want to achieve.

I would like to further refer you to the community part where you could find programmers to team up with. If you want to get deeper into scripting the scripting reference and scripting section in the manual is a great place to start.

Here is my revised code I have working now. However, how can I make it so that my mouse cursor does the same, or replaces the left and right arrow keys that controls rotation? This will be implemented into Android once I have a working beta up so the movements will be controlled via touch, but I’ll cross that bridge when I come to it. Also, how do you add gravity without using the RigidBody, or use the RigidBody but smooth it out so it isn’t so jerky.

function Update()

				var walkSpeed: float = 10;
				var rotateSpeed: float = 175;
				var jumpHeight: float = 50;
				var runSpeedMultiplyer: float = 1.5;
			//Moves Player Foward
				transform.Translate(Vector3.forward * Time.deltaTime * walkSpeed);
			//Moves Player Back
				transform.Translate(Vector3.back * Time.deltaTime * walkSpeed);
			//Moves Player Right
				transform.Translate(Vector3.right * Time.deltaTime * walkSpeed);
			//Moves Player Left
				transform.Translate(Vector3.left * Time.deltaTime * walkSpeed);
			//Rotates Player Right
				transform.Rotate(Vector3.up * Time.deltaTime * rotateSpeed);
			//Rotates Plater Left
				transform.Rotate(Vector3.down * Time.deltaTime * rotateSpeed);
			//Player Jumps
				transform.Translate(Vector3.up * Time.deltaTime * jumpHeight);
			//Player Runs
				transform.Translate(Vector3.forward * Time.deltaTime * walkSpeed * runSpeedMultiplyer);