Eternal Loop -Misc - only bruteforce

So I know how this challenge works, but my scripting knowledge is very limited! Time to learn I suppose.