I never found it stolen, but I found another one that should work similarly
Code:
using UnityEngine; public class FPSController : MonoBehaviour { public float moveSpeed = 5f; public float jumpForce = 5f; private Rigidbody rb; private bool isGrounded; void Start() { rb = GetComponent<Rigidbody>(); } void FixedUpdate() { float horizontal = Input.GetAxis("Horizontal"); float vertical = Input.GetAxis("Vertical"); Vector3 movement = new Vector3(horizontal, 0f, vertical) * moveSpeed * Time.deltaTime; transform.Translate(movement, Space.Self); if (Input.GetButtonDown("Jump") && isGrounded) { rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse); isGrounded = false; } } void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Ground")) { isGrounded = true; } } }