local MPS = game:GetService("MarketplaceService")
local plr = script.Parent.Parent.Parent.Parent.Parent
local Id = 14781556
if MPS:PlayerOwnsAsset(plr, Id) == true then
plr.Stats.Weapon.Value = game.ReplicatedStorage.Weapons["Fiery Souls"]
else
MPS:PromptGamePassPurchase(plr, Id)
end
end)
local MPS = game:GetService("MarketplaceService")
local plr = script.Parent.Parent.Parent.Parent.Parent
local Id = 14781556
if MPS:UserOwnsGamePassAsync(plr.UserId, Id) then
plr.Stats.Weapon.Value = game.ReplicatedStorage.Weapons["Fiery Souls"]
else
MPS:PromptGamePassPurchase(plr, Id)
end
Also, the way you’re accessing the player (script.Parent.Parent.Parent.Parent.Parent) is questionable, that might be causing an issue if it’s not correctly referencing a player.