Advertisement
CaptainSpaceCat

Break Loop POC

Jul 16th, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local code = [[
  2. local checkCorrect = os.startTimer(.05)
  3. while true do
  4.     while true do
  5.         while true do
  6.             while true do
  7.                 local events = {os.pullEventRaw()}
  8.                 if events[1] == "timer" and events[2] == checkCorrect then
  9.                     error("Failed to break")
  10.                 end
  11.             end
  12.         end
  13.     end
  14. end
  15. ]]
  16.  
  17. local codeString = loadstring(code)
  18. local function exec() codeString() end
  19.  
  20. while true do
  21.     local ok, err = pcall(exec)
  22.     if err then printError(err) else print("Loop broken, you're free!"); break end
  23.     sleep(.05)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement