the player has already been defined earlier in the script, I just dont think people feel like reading through 50 lines of code.
getting this error: Unable to cast value to Object. the error is on the promptgamepasspurchase function. everything else works fine
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,v.Gamepass.Value) then
Purchase({[1] = v.Price.Value,[2] = v,[3] = PlayerStats})
else
game:GetService("MarketplaceService"):PromptGamePassPurchase(player.UserId,v.Gamepass.Value)
end
