Here is the script u need to paste:
local GPassId = 0 -- Replace 0 with your gamepass ID
script.Parent.ClickDetector.MouseClick:connect(function(plr)
if game.MarketplaceService:UserOwnsGamePassAsync(plr.UserId, GPassId) then
script.Parent.Sound:Play()
plr.Backpack.Needlegun.Needle.bio.Virus.Value = game.Lighting:FindFirstChild(script.Parent.Name)
else
game.MarketplaceService:PromptGamePassPurchase(plr, GPassId)
end
end)
ur welcom ;)