-- If anything goes wrong please leave a comment on the modle and I will fix it.


local speed = game.ReplicatedStorage.Values.Speed.Value


game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
	if purchased and ido == id then
		plr.Character.Humanoid.WalkSpeed = speed --set this and the other one to the same number
	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 = speed
		end
	end)
end)
