How to test premium membership properly?

I want to test my script where after someone buys premium, and they join back, their perks that they bought premium for still stay. But on studio (solo test) if I join back it doesn’t work, and I don’t actually have premium. So is there a way to test?

if the Player.MembershipType is premium, then it’s guaranteed that the perks will stay effective. It’s upon you to code it correctly by checking that :slight_smile:

Yeah I’m pretty sure I’ve done it correctly then, may you take a look?

local Players = game:GetService("Players")

while true do
	for _, Player in Players:GetPlayers() do
		if Player.MembershipType == Enum.MembershipType.Premium then
			Player.leaderstats.Time.Value += 2
		else
			Player.leaderstats.Time.Value += 1
		end
	end
	task.wait(1)
end

Yep. This code will do the job

1 Like

just test if the code works without premium bat first, then add it behind premium

:steamhappy:

I’ve already done that, as soon as the player buys premium works. Andif they haven’t still only gives them time at 1 every second

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.