Roblox Game's Limited Time "Events"

Almost every game on the front page has seasonal events from time to time, within these events, (which only last a couple of weeks) these games add “Limited” items to collect during this time period, and after the event is over, you can no longer obtain said items, but they will still remain with the player.
I was wondering, how do game developers seamlessly add these events and remove them just as seamlessly, without removing the player’s collected items?
Games such as Adopt Me! or The Wild West seem to accomplish this quite well

The limited items still exist in the game, but they’re unobtainable. The game just gives you a chance to get the item during the time periods.

What @Xaeriou said. These games can create their events and give the items only during the event. It’s pretty easy to code.