How to wrap texts with a script

okay, thank you!

this is a thread I opened before,

maybe it can help you understand what I mean

there’s also a sample script there, but it’s bugged and not really smooth. I’d be really glad if you can help me fix it.