You were making endless runner, so surely You were following tutorial from documentation. There is a method that counts the score, isn't there ? I thought there was setget function described ? I mean a place in your code when new points are added to old points ? In this same place You can check current score and apply calculations to it, for example :
score += 10
This calculation will result in ceiled integer of division score by 10, in other words, it will be 1 higher every 10 score. You can also make some maxscore variable, check if score is higher than maxscore, and if it is - raise the difficulty level by one and raise maxscore by chosen amount.
And in your movement code, calculate speed with difficulty however You like:
speed += difficulty
speed *= (1 + difficulty)/100
speed = speed.pow(difficulty)