they beat him with lengths of plastic pipe and improvised rope whips , and then left him there dangling and screaming , and he was only fortunate that he screamed loudly enough that a teacher came to investigate , and finally cut him down .