Use the os library when you’re working with time-based purchases. Create a future timestamp to determine how long the product should last for. Assuming the subscription time is still valid even when the player isn’t in the game, your work is really easy.
If you’re using os.time, convert a future time stamp into seconds. You can do this by either doing a literal convert via an online resource (e.g. Google’s time calculator) or have your script evaluate it. Your calculation should be about 60*60*24*7*4*3 (60s, 60m, 24h, 7d, 4w, 3mo) (?). Afterward, add this value to os.time (os.time() + future time) and then save that. From here, just check if os.time is less than the saved value. If it is, keep the effects active. If not, deactivate them.
With os.date, it returns a table of information about the current date, including month. You will need to account for year spill-overs (12 + 3 = 15, not a valid month). The concept is still the same as with os.time, set a date in the future and then check the relation between the current date and that future date.
That’s why you call it on the server. The client is irrelevant in this scenario and it should not be authoritative of any part of this system except informing the server that it wants to make a purchase (handled by the backend).
I just told you how to tell the time between now and 3 months in the future. If you want to inform the player of the time left (and in order to vreate a timer), send the time difference between the future time stamp and the current time to the client, then have it format and animate the countdown.
You can’t remove Developer Products. As for removing subscriptions, don’t - not unless it’s for a good reason. Player purchases need to be honoured, so if they buy it, they should retain that subscription for its full duration.
If you track time in an active subscription or or the like, you can call RemoveAsync on it to clear it out of the DataStore, though that’s not particularly necessary.
If you have a time-less-than check, only activate effects when the current time is less than the future time. By nature of this, no effects will occur when the current time is greater than the future time.