Emission blinking script

Hello,

I’m making a funfair game
And I have almost everything working except the lights.

I found a script which turns on the emission after 3 seconds.
But I want it to turn on and off after every 3 seconds.

Is there somebody that can help me with this?

The script I found is

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

public class EmissionControl : MonoBehaviour
{

    public Material material;

    void Awake()
    {
        material.DisableKeyword("_EMISSION");
    }

    void Update()
    {
        if (Time.time >= 3.0f)
        {
            material.EnableKeyword("_EMISSION");
        }
    }
}

Thanks in advance!

Try this;

private float time = 0f;
private bool emit = false;

void Update()
{
    if (time >= 3.0f)
    {
        emit = !emit;
        if (emit)
            material.EnableKeyword("_EMISSION");
        else
            material.DisableKeyword("_EMISSION");
        time = 0f;
    }

    time += Time.deltaTime;
}