Getting a train to behave correctly in approaching a tonnage signal is not best achieved by altering the signal script. Rather, the schedule of a train that must observe tonnage restrictions can be altered. When such a train has approached within stopping distance of the tonnage signal ( a track mark may indicate this location ), a command such as "Wait until green signal" <kuid2:151055:100101:1> can be inserted into the schedule. If the signal is not green ("Proceed" state), but at some form of caution or stop, then the train will be brought to a stop until the signal becomes green. If it is green on approach, then the train will pass the signal without stopping.
I have not used "Wait until green signal" myself, and so am unsure about how many signal states it can discriminate, and therefore what qualifies as "green". Perhaps this command would require modification to achieve the correct behaviour for the signals you use.