How do I make my raycast shooting script full auto

I have a shoot script that works well but can’t figure out how to make it work with full auto weapons

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class newshoot : MonoBehaviour
{
    private void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit hit;
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit, 1000f))
            {
                if (hit.transform != null)
                {
                    if (hit.transform.CompareTag("killable"))
                    {
                        PrintName(hit.transform.gameObject);
                        Destroy(hit.collider.gameObject);
                    }
                }
            }
        }
    }
}

I have tried doing it myself but im just getting different errors

You are using Input.GetMouseButtonDown, this only resets when the user releases the mouse button and presses it again, therefore it doens’t work for automatic fire. Use Input.GetMouseButton (see Unity - Scripting API: Input.GetMouseButton) instead and maybe use a timer of some sorts to limit the firerate.