local player = game.Players.LocalPlayer local gui = player:WaitForChild("PlayerGui") local mechanicsFrame for _, child in ipairs(gui:GetChildren()) do local found = child:FindFirstChild("MechanicsFrame") if found then mechanicsFrame = found break end end if not mechanicsFrame then return end local qte = mechanicsFrame:WaitForChild("QTE") local label = qte:FindFirstChild("PC", true) if not label then return end local VIM = game:GetService("VirtualInputManager") local function pressKeyOnce(key) VIM:SendKeyEvent(true, key, false, game) task.wait(0.05) VIM:SendKeyEvent(false, key, false, game) end local function getKeyCode(text) if type(text) ~= "string" then return nil end text = text:gsub("%s+", "") if text == "" then return nil end return Enum.KeyCode[text:upper()] end local INITIAL_DELAY = 0.09 local SPAM_INTERVAL = 0.03 local currentSpamThread = nil local function stopSpam() if currentSpamThread then task.cancel(currentSpamThread) currentSpamThread = nil end end local function startSpam(key) stopSpam() currentSpamThread = task.spawn(function() if not qte.Visible then return end task.wait(INITIAL_DELAY) if not qte.Visible then return end if getKeyCode(label.Text) ~= key then return end while true do if not qte.Visible then break end pressKeyOnce(key) task.wait(SPAM_INTERVAL) if getKeyCode(label.Text) ~= key then break end end currentSpamThread = nil end) end local function onTextChanged() if not qte.Visible then return end local txt = label.Text if txt == "" then return end local key = getKeyCode(txt) if key then startSpam(key) end end label:GetPropertyChangedSignal("Text"):Connect(onTextChanged) qte:GetPropertyChangedSignal("Visible"):Connect(function() if qte.Visible and label.Text ~= "" then onTextChanged() else stopSpam() end end) task.wait(0.5) if qte.Visible and label.Text ~= "" then onTextChanged() end