local UserInputService = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") -- Define a flag to control the loop state _G.IsLoopRunning = true -- The function that contains the main execution loop local function startPacketLoop() while _G.IsLoopRunning do local children = ReplicatedStorage:GetChildren() if children[7] then local sendPacket = children[7]:FindFirstChild("SendPacket") if sendPacket then local args = { [1] = "Set Music Accuracy", [2] = 100000, [3] = true } sendPacket:FireServer(unpack(args)) end end task.wait(0.01) end end -- 1. Listen for the "Pop" event to stop the loop local remoteEvents = ReplicatedStorage:FindFirstChild("Remote Events") if remoteEvents then local updateGUIEvent = remoteEvents:FindFirstChild("UpdateGUIEvent") if updateGUIEvent then updateGUIEvent.OnClientEvent:Connect(function(arg1, arg2) if arg1 == "BottomText" and type(arg2) == "table" and type(arg2[1]) == "string" then -- Stop looping if "Pop" is detected if string.find(arg2[1], "Pop") then if _G.IsLoopRunning then _G.IsLoopRunning = false print("Detected 'Pop'! Loop stopped. Press 'Q' to resume.") end -- Optional: It also still auto-resumes on Dubstep if that occurs elseif string.find(arg2[1], "Dubstep%(Knockback%)") then if not _G.IsLoopRunning then _G.IsLoopRunning = true print("Detected 'Dubstep(Knockback)'! Auto-resuming loop.") task.spawn(startPacketLoop) end end end end) end end -- 2. Listen for the 'Q' key to manually resume the loop after a stop UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) -- gameProcessedEvent makes sure you aren't currently typing in the in-game chat box if not gameProcessedEvent and input.KeyCode == Enum.KeyCode.Q then if not _G.IsLoopRunning then _G.IsLoopRunning = true print("Manual override: 'Q' pressed. Resuming loop.") task.spawn(startPacketLoop) else print("'Q' pressed, but the loop is already running.") end end end) -- Start the initial loop immediately upon running the script task.spawn(startPacketLoop)