return function() local sneakTicks = 0 local windowEvents = {nil, nil, nil} local windowDuration = 20 local clockCounter = 0 while _G.player == nil do os.sleep(0.05) end parallel.waitForAny( function() while _G._running do if player and windowEvents[3] ~= nil and windowEvents[3] + windowDuration >= clockCounter then local mainHand = player.heldItem and player.heldItem.getMetadata().name local offHand = player.offhandItem and player.offhandItem.getMetadata().name if mainHand == "openblocks:hang_glider" or offHand == "openblocks:hang_glider" then NI.launch(player.yaw, player.pitch, 4) end end os.sleep(0.05) end end, function() while _G._running do clockCounter = clockCounter + 1 if player.isSneaking then sneakTicks = sneakTicks + 1 elseif sneakTicks ~= 0 then windowEvents = {clockCounter, windowEvents[1], windowEvents[2]} sneakTicks = 0 end os.sleep(0.05) end end) end