Script Errors Just Keep Piling Up

This Charector Movement Code Has Errors. When I Go To FIx The Errors, More Pop Up. Please Help.
Script: https://pastebin.com/wVnp6fgP

Errors: Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,53): error CS1003: Syntax error, ‘]’ expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,53): error CS1002: ; expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,64): error CS1002: ; expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,69): error CS1002: ; expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,70): error CS1513: } expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,1157): error CS1733: Expected expression

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,1157): error CS8124: Tuple must contain at least two elements.

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,1157): error CS1026: ) expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,1157): error CS1002: ; expected

Assets\StarterAssets\FirstPersonController\Scripts\FirstPersonController.cs(263,1157): error CS1513: } expected

Your pastebin paste seems to be private or may have other issues as it may be waiting for moderation. That’s what pastebin tells us as we get a 403 back. So we can’t really help you with some random errors in code we don’t see.

So I assume that you didn’t write the script given the path and name. There could be countless of reasons why there are errors in the code. Though it may just be a script that is not compatible with the Unity version that you’re using or your project may be missing some dependencies / packages.

Here Is The Script:

using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif

namespace StarterAssets
{
    [RequireComponent(typeof(CharacterController))]
#if ENABLE_INPUT_SYSTEM
    [RequireComponent(typeof(PlayerInput))]
#endif
    public class FirstPersonController : MonoBehaviour
    {
        [Header("Player")]
        [Tooltip("Move speed of the character in m/s")]
        public float MoveSpeed = 4.0f;
        [Tooltip("Sprint speed of the character in m/s")]
        public float SprintSpeed = 6.0f;
        [Tooltip("Rotation speed of the character")]
        public float RotationSpeed = 1.0f;
        [Tooltip("Acceleration and deceleration")]
        public float SpeedChangeRate = 10.0f;

        [Space(10)]
        [Tooltip("The height the player can jump")]
        public float JumpHeight = 1.2f;
        [Tooltip("The character uses its own gravity value. The engine default is -9.81f")]
        public float Gravity = -15.0f;

        [Space(10)]
        [Tooltip("Time required to pass before being able to jump again. Set to 0f to instantly jump again")]
        public float JumpTimeout = 0.1f;
        [Tooltip("Time required to pass before entering the fall state. Useful for walking down stairs")]
        public float FallTimeout = 0.15f;

        [Header("Player Grounded")]
        [Tooltip("If the character is grounded or not. Not part of the CharacterController built in grounded check")]
        public bool Grounded = true;
        [Tooltip("Useful for rough ground")]
        public float GroundedOffset = -0.14f;
        [Tooltip("The radius of the grounded check. Should match the radius of the CharacterController")]
        public float GroundedRadius = 0.5f;
        [Tooltip("What layers the character uses as ground")]
        public LayerMask GroundLayers;

        [Header("Cinemachine")]
        [Tooltip("The follow target set in the Cinemachine Virtual Camera that the camera will follow")]
        public GameObject CinemachineCameraTarget;
        [Tooltip("How far in degrees can you move the camera up")]
        public float TopClamp = 90.0f;
        [Tooltip("How far in degrees can you move the camera down")]
        public float BottomClamp = -90.0f;

        // cinemachine
        private float _cinemachineTargetPitch;

        // player
        private float _speed;
        private float _rotationVelocity;
        private float _verticalVelocity;
        private float _terminalVelocity = 53.0f;

        // timeout deltatime
        private float _jumpTimeoutDelta;
        private float _fallTimeoutDelta;

#if ENABLE_INPUT_SYSTEM
        private PlayerInput _playerInput;
#endif
        private CharacterController _controller;
        private StarterAssetsInputs _input;
        private GameObject _mainCamera;

        private const float _threshold = 0.01f;

        private bool IsCurrentDeviceMouse
        {
            get
            {
#if ENABLE_INPUT_SYSTEM
                return _playerInput.currentControlScheme == "KeyboardMouse";
#else
                return false;
#endif
            }
        }

        private void Awake()
        {
            // get a reference to our main camera
            if (_mainCamera == null)
            {
                _mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
                if (_mainCamera == null)
                {
                    Debug.LogError("Main camera not found. Please ensure the main camera is tagged 'MainCamera'.");
                }
            }
        }

        private void Start()
        {
            _controller = GetComponent<CharacterController>();
            _input = GetComponent<StarterAssetsInputs>();
#if ENABLE_INPUT_SYSTEM
            _playerInput = GetComponent<PlayerInput>();
#else
            Debug.LogError("Starter Assets package is missing dependencies. Please use Tools/Starter Assets/Reinstall Dependencies to fix it");
#endif

            if (_controller == null) Debug.LogError("CharacterController component not found.");
            if (_input == null) Debug.LogError("StarterAssetsInputs component not found.");
#if ENABLE_INPUT_SYSTEM
            if (_playerInput == null) Debug.LogError("PlayerInput component not found.");
#endif

            // reset our timeouts on start
            _jumpTimeoutDelta = JumpTimeout;
            _fallTimeoutDelta = FallTimeout;
        }

        private void Update()
        {
            if (_controller == null || _input == null)
            {
                Debug.LogError("Required components are not assigned.");
                return;
            }

            JumpAndGravity();
            GroundedCheck();
            Move();
        }

        private void LateUpdate()
        {
            if (CinemachineCameraTarget == null)
            {
                Debug.LogError("CinemachineCameraTarget is not assigned.");
                return;
            }

            CameraRotation();
        }

        private void GroundedCheck()
        {
            if (_controller == null)
            {
                Debug.LogError("CharacterController component is not assigned.");
                return;
            }

            // set sphere position, with offset
            Vector3 spherePosition = new Vector3(transform.position.x, transform.position.y - GroundedOffset, transform.position.z);
            Grounded = Physics.CheckSphere(spherePosition, GroundedRadius, GroundLayers, QueryTriggerInteraction.Ignore);
        }

        private void CameraRotation()
        {
            if (_input == null || CinemachineCameraTarget == null)
            {
                Debug.LogError("Required components are not assigned.");
                return;
            }

            // if there is an input
            if (_input.look.sqrMagnitude >= _threshold)
            {
                //Don't multiply mouse input by Time.deltaTime
                float deltaTimeMultiplier = IsCurrentDeviceMouse ? 1.0f : Time.deltaTime;

                _cinemachineTargetPitch += _input.look.y * RotationSpeed * deltaTimeMultiplier;
                _rotationVelocity = _input.look.x * RotationSpeed * deltaTimeMultiplier;

                // clamp our pitch rotation
                _cinemachineTargetPitch = ClampAngle(_cinemachineTargetPitch, BottomClamp, TopClamp);

                // Update Cinemachine camera target pitch
                CinemachineCameraTarget.transform.localRotation = Quaternion.Euler(_cinemachineTargetPitch, 0.0f, 0.0f);

                // rotate the player left and right
                transform.Rotate(Vector3.up * _rotationVelocity);
            }
        }

        private void Move()
        {
            if (_controller == null || _input == null)
            {
                Debug.LogError("Required components are not assigned.");
                return;
            }

            // set target speed based on move speed, sprint speed and if sprint is pressed
            float targetSpeed = _input.sprint ? SprintSpeed : MoveSpeed;

            // a simplistic acceleration and deceleration designed to be easy to remove, replace, or iterate upon

            // note: Vector2's == operator uses approximation so is not floating point error prone, and is cheaper than magnitude
            // if there is no input, set the target speed to 0.0f;
            if (_input.move == Vector2.zero) targetSpeed = 0.0f;

            // a reference to the players current horizontal velocity
            float currentHorizontalSpeed = new Vector3(_controller.velocity.x, 0.0f, _controller.velocity.z).magnitude;

            float speedOffset = 0.1f;
            float inputMagnitude = _input.analogMovement ? _input.move.magnitude : 1f;

            // accelerate or decelerate to target speed
            if (currentHorizontalSpeed < targetSpeed - speedOffset || currentHorizontalSpeed > targetSpeed + speedOffset)
            {
                // creates curved result rather than a linear one giving a more organic speed change
                // note T in Lerp is clamped, so we don't need to clamp our speed
                _speed = Mathf.Lerp(currentHorizontalSpeed, targetSpeed * inputMagnitude, Time.deltaTime * SpeedChangeRate);

                // round speed to 3 decimal places
                _speed = Mathf.Round(_speed * 1000f) / 1000f;
            }
            else
            {
                _speed = targetSpeed;
            }

            // normalise input direction
            Vector3 inputDirection = new Vector3(_input.move.x, 0.0f, _input.move.y).normalized;

            // note: Vector2's != operator uses approximation so is not floating point error prone, and is cheaper than magnitude
            // if there is a move input, rotate player when the player is moving
            if (_input.move != Vector2.zero)
            {
                // move
                inputDirection = transform.right * _input.move.x + transform.forward * _input.move.y;
            }

            // move the player
            _controller.Move(inputDirection.normalized * (_speed * Time.deltaTime) + new Vector3(0.0f, _verticalVelocity, 0.0f) * Time.deltaTime);
        }

        private void JumpAndGravity()
        {
            if (_controller == null || _input == null)
            {
                Debug.LogError("Required components are not assigned.");
                return;
            }

            if (Grounded)
            {
                // reset the fall timeout timer
                _fallTimeoutDelta = FallTimeout;

                // stop our velocity dropping infinitely when grounded
                if (_verticalVelocity < 0.0f)
                {
                    _verticalVelocity = -2f;
                }

                // Jump
                if (_input.jump && _jumpTimeoutDelta <= 0.0f)
                {
                    // the square root of H * -2 * G = how much velocity needed to reach desired height
                    _verticalVelocity = Mathf.Sqrt[_{{{CITATION{{{_1{](https://github.com/Piyush181/Simple-FPS__Junior-Programmer-Final-Project/tree/7ad1ed4cee2e3981eb84a66932bf62fe9f706495/Simple%20FPS%20%20Jr%20Programmer%20Final%20Project%2FAssets%2FStarterAssets%2FFirstPersonController%2FScripts%2FFirstPersonController.cs)[_{{{CITATION{{{_2{](https://github.com/JackDunne5877/Senior-Project-395/tree/2105144b431c1769616afdb08fa259cc1ed3a7b9/Senior_Project395%2FAssets%2FStarterAssets%2FFirstPersonController%2FScripts%2FFirstPersonController.cs)[_{{{CITATION{{{_3{](https://github.com/szbrooks2017/holbertonschool-unity/tree/34178c26fe4677cea0c589a29845da79e8e4e877/0x00-unity-animation%2FAssets%2FStarterAssets%2FThirdPersonController%2FScripts%2FThirdPersonController.cs)[_{{{CITATION{{{_4{](https://github.com/DechertNicholas/Open-Train-Simulator/tree/3e4df3d9d8c4d16e6b7cc871a78d4251c8a163e4/Assets%2FScripts%2FPlayer%20Handling%2FPlayerCharacterController.cs)[_{{{CITATION{{{_5{](https://github.com/redazul/scare21/tree/82bfcf8bd920c4037dc2999ac8383d70d469f022/Assets%2FStarterAssets%2FThirdPersonController%2FScripts%2FThirdPersonController.cs)

Your script is cut off and everything behind the

_verticalVelocity = Mathf.Sqrt

is not code and does not belong there at all. The link buried in that nonsense seems like your script is based on this one.

So whatever you’ve done, you messed up the script as the bottom part is missing and you have some non code stuff inserted. That “CITATION” looks like you may have copied something from a MediaWiki, somehow.