GUI not reappearing after death

I have a GUI that is supposed to be on a player’s screen if they own a gamepass.
It does work but if the player dies the gamepass does not come back. Here’s the script:

local mps = game:GetService("MarketplaceService")
local vip = 15093132

		if mps:UserOwnsGamePassAsync(plr.UserId, vip) then
			script.Particle:Clone().Parent = plr.PlayerGui

Any help is appreciated.

Are you testing this in studio?

Might be because of where you put the script, and what script it is, is it a Server or Local?

Try it in a normal game if you don’t mind.

I can’t at the moment. As what i’m creating is an update for my game i can’t publish it.

Could you check if that is in fact the problem.

You could just get a private server in your game and publish and then you wouldn’t have to shutdown.

You need to disable the ResetOnSpawn property of the ScreenGui