this is my code and it will work in testing in the studio but not in real servers
local id = 5136477
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and ido == id then
plr.Character.Humanoid.WalkSpeed = 50
end
end)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:connect(function(char)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
char.Humanoid.WalkSpeed = 50
end
end)
end)

7 comments
Can anyone help me?
Do you own the gamepass? Or did you make yourself an exception to owning the gamepass?
I made and own it
It didn't work
is char.id even a thing?
Yep I just got it working :) I needed to move the script from ServerScript Service to Workspace
That couldn't be the reason; even then, that just allows an exploiter to see the script.