"Create a script for a 3d fps shooter game where you fight zombies"
xxxxxxxxxx
using UnityEngine;
public class FPSController : MonoBehaviour
{
public float moveSpeed = 5f;
public float jumpForce = 5f;
public float gravity = -9.81f;
public Transform groundCheck;
public float groundDistance = 0.4f;
public LayerMask groundMask;
public GameObject gun;
public GameObject bulletPrefab;
public Transform bulletSpawn;
public float bulletSpeed = 30f;
public float fireRate = 0.5f;
private CharacterController controller;
private Vector3 velocity;
private bool isGrounded;
private bool canShoot = true;