String.sub issues (help me remove a backdoor)

yeah but it alsow removes the code i want to keep