How would I change a players default running animation + speed if they own a gamepass?

I am currently trying to figure out how a players running animation + speed can be changed if a player owns a gamepass, and a GUI to toggle it. Any help would be appreciated!

Use MarketplaceService:UserOwnsGamePassAsync to achieve your goal.

Yes, I am aware of UserOwnsGamePassAsync, but I am also trying to figure out how to use it to change the default running animation.

You could try just edit like the gamepassID walkID walkspeed parts

local MPS = game:GetService(“MarketPlaceService”)

game.Players.PlayerAdded:Connect(function(plr)
    if MPS:UserOwnsGamePassAsync(plr.UserId, gamepassID) then --I think I may have gotten it mixed up so if so switch userid and gamepassid
        plr.CharacterAdded:Wait()
        local char = plr.Character
        char.Animate.walk.WalkAnimation.AnimationId = walkID
        char.Animate.run.RunAnimation.AnimationId = walkID
         char.Humanoid.WalkSpeed = walkspeed
    end
end)