e2 ApplyForce Stabilization Help

Im not sure if this is the right section to post help for e2 problems, so if not, then move this if you want.

Ok, so heres the e2…

@name fighter test

Temp=entity(),Entity=(Temp:getConstraints():count() >0 ? Temp:isWeldedTo() : Temp)


Entity:applyOffsetForce( Up Angle:pitch(),Center-ForwardLeverage)
Entity:applyOffsetForce(-Up Angle:pitch(),Center+ForwardLeverage)
Entity:applyOffsetForce( Up *Angle:roll() ,Center-Right *Leverage)
Entity:applyOffsetForce(-Up *Angle:roll() ,Center+Right Leverage)
Leverage) #This can replace the above 6 lines

The problem is: the sentence (Entity=(Temp:getConstraints():count() >0 ? Temp:isWeldedTo() : Temp) I dont need this part of the code because it causes the game to lag when I spawn the e2 on tremendously welded/parented contraptions. Is there anyway to get rid of that one code but still allow the e2 to work? Thanks.

P.S I did not make this code, as some of you may find out. I, assuming this was on the Gmod Wiki for all to find, downloaded it assuming that anyone was allowed to download the code if credit was given to the original creator (chinoto)