I have already the gamepass in place, that I ask is that once they have the gamepass, they join in the game with a item, but I want that item be used only once and makes you unkillable for 1 min.
Here's the gamepass script FYI:
gps = game:GetService("GamePassService");
id = script:WaitForChild("GamePassID");
EH = script:WaitForChild("ExtraHealthAmount");
game.Workspace.ChildAdded:connect(function(char)
h=char:FindFirstChild("Humanoid")
if h~=nil then
plr=game.Players:FindFirstChild(char.Name)
if gps:PlayerHasPass(plr, id.Value) then
h.MaxHealth=EH.Value
h.Health=EH.Value
end
end
end)
or is it this one? (still new to scripting)
local productId = 340496291 --My gamepass ID (example, random I choose)
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player, productId)
end)

5 comments
The second script would be in a GUI to prompt them to purchase something.
I know that, but how do one simply make them receive an item once they have the gamepass?
I'm not sure I quite understand what you want? ?? ?? Do you want them to be able to use it once in game or once everytime after you die?
A developer product, not a game pass, would be better in the case of your question, because game passes can only be bought once.
Just one time use and they can't die for like 1 min, no matter how much damage Input at the lavas