I suggest that you try to make a script first, then ask for help. This forum is very generous and helpful, but people are not here to make scripts for you.
If you are looking to place elements in the model, use the ByPointandLevel Node. If you are looking to adjust the height of existing elements, use the SetParameter nodes to adjust the “offset”. You could use the offset of the nearest floor and find the distance between them, but this a little more tricky, and I don’t know your dynamo competence.
Hope that this helps. Good luck