How do I create a weapon overheat function

I'm trying to create a function that causes a player's gun to overheat, requiring them to wait a few seconds before they can fire their gun again. But I don't know to do it in CORE.