local VirtualInputManager = game:GetService("VirtualInputManager")
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local CoreGui = game:GetService("CoreGui")
local LocalPlayer = Players.LocalPlayer
-- Configurações Iniciais
local Config = {
Enabled = false,
Delay = 0.15 -- Valor padrão seguro
}
-- Limpeza de scripts antigos para não duplicar UI
if _G.QTE_Connection then _G.QTE_Connection:Disconnect() end
for _, gui in pairs(CoreGui:GetChildren()) do
if gui.Name == "AutoQTE_Pro_V3" then gui:Destroy() end
end
-- ==============================================================================
-- 1. CRIAÇÃO DA UI (Interface Gráfica)
-- ==============================================================================
local ScreenGui = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local Title = Instance.new("TextLabel")
local ToggleBtn = Instance.new("TextButton")
local StatusLabel = Instance.new("TextLabel")
local SliderContainer = Instance.new("Frame")
local SliderBg = Instance.new("Frame")
local SliderFill = Instance.new("Frame")
local SliderBtn = Instance.new("TextButton")
local SliderValue = Instance.new("TextLabel")
local ParentGui = gethui and gethui() or CoreGui
ScreenGui.Name = "AutoQTE_Pro_V3"
ScreenGui.Parent = ParentGui
-- Janela Principal
MainFrame.Name = "Main"
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(30, 32, 35)
MainFrame.Position = UDim2.new(0.5, -110, 0.3, 0)
MainFrame.Size = UDim2.new(0, 220, 0, 160) -- Aumentei a altura para caber o slider
MainFrame.Active = true
MainFrame.Draggable = true
Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 8)
-- Título
Title.Parent = MainFrame
Title.BackgroundTransparency = 1
Title.Position = UDim2.new(0, 0, 0, 8)
Title.Size = UDim2.new(1, 0, 0, 20)
Title.Font = Enum.Font.GothamBold
Title.Text = "AUTO QTE MANAGER"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 16
-- Botão ON/OFF
ToggleBtn.Parent = MainFrame
ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 65, 65)
ToggleBtn.Position = UDim2.new(0.1, 0, 0.25, 0)
ToggleBtn.Size = UDim2.new(0.8, 0, 0, 35)
ToggleBtn.Font = Enum.Font.GothamBold
ToggleBtn.Text = "STATUS: OFF"
ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleBtn.TextSize = 14
Instance.new("UICorner", ToggleBtn).CornerRadius = UDim.new(0, 6)
-- Slider (Container)
SliderContainer.Parent = MainFrame
SliderContainer.BackgroundTransparency = 1
SliderContainer.Position = UDim2.new(0.1, 0, 0.55, 0)
SliderContainer.Size = UDim2.new(0.8, 0, 0, 40)
-- Fundo do Slider
SliderBg.Parent = SliderContainer
SliderBg.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
SliderBg.Position = UDim2.new(0, 0, 0.5, -3)
SliderBg.Size = UDim2.new(1, 0, 0, 6)
Instance.new("UICorner", SliderBg).CornerRadius = UDim.new(1, 0)
-- Preenchimento Azul
SliderFill.Parent = SliderBg
SliderFill.BackgroundColor3 = Color3.fromRGB(60, 160, 255)
SliderFill.Size = UDim2.new(0.1, 0, 1, 0) -- Começa pequeno
Instance.new("UICorner", SliderFill).CornerRadius = UDim.new(1, 0)
-- Botão do Slider (Bolinha)
SliderBtn.Parent = SliderBg
SliderBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
SliderBtn.Size = UDim2.new(0, 14, 0, 14)
SliderBtn.Position = UDim2.new(0.1, -7, 0.5, -7)
SliderBtn.Text = ""
Instance.new("UICorner", SliderBtn).CornerRadius = UDim.new(1, 0)
-- Texto do Valor do Slider
SliderValue.Parent = SliderContainer
SliderValue.BackgroundTransparency = 1
SliderValue.Position = UDim2.new(0, 0, 0, -15)
SliderValue.Size = UDim2.new(1, 0, 0, 15)
SliderValue.Font = Enum.Font.Gotham
SliderValue.Text = "Delay: 0.05s"
SliderValue.TextColor3 = Color3.fromRGB(200, 200, 200)
SliderValue.TextSize = 12
-- Label de Status (Rodapé)
StatusLabel.Parent = MainFrame
StatusLabel.BackgroundTransparency = 1
StatusLabel.Position = UDim2.new(0, 0, 0.85, 0)
StatusLabel.Size = UDim2.new(1, 0, 0, 20)
StatusLabel.Font = Enum.Font.Gotham
StatusLabel.Text = "Aguardando input..."
StatusLabel.TextColor3 = Color3.fromRGB(100, 100, 100)
StatusLabel.TextSize = 11
-- ==============================================================================
-- 2. LÓGICA DO SLIDER
-- ==============================================================================
local dragging = false
local function UpdateSlider(input)
local pos = input.Position.X
local sliderPos = SliderBg.AbsolutePosition.X
local sliderSize = SliderBg.AbsoluteSize.X
local percent = math.clamp((pos - sliderPos) / sliderSize, 0, 1)
-- Visual
SliderFill.Size = UDim2.new(percent, 0, 1, 0)
SliderBtn.Position = UDim2.new(percent, -7, 0.5, -7)
-- Lógica
local value = math.floor(percent * 100) / 100 -- Máximo 1.00s
Config.Delay = value
SliderValue.Text = "Delay: " .. string.format("%.2f", value) .. "s"
end
SliderBtn.MouseButton1Down:Connect(function() dragging = true end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
UpdateSlider(input)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
-- ==============================================================================
-- 3. LÓGICA DO AUTO QTE (A parte funcional)
-- ==============================================================================
-- Função para traduzir texto em KeyCode
local function GetKeyCode(str)
if not str then return nil end
str = str:gsub("%s+", "") -- Remove espaços
if str == "M1" then return "Mouse1" end
if str == "Space" then return Enum.KeyCode.Space end
local success, code = pcall(function() return Enum.KeyCode[str] end)
if success then return code end
return nil
end
local function ProcessQTE()
if not Config.Enabled then return end
local pGui = LocalPlayer:FindFirstChild("PlayerGui")
if not pGui then return end
local qteFolder = pGui:FindFirstChild("QuickTimeEvents")
if not qteFolder then
StatusLabel.Text = "Nenhum QTE encontrado"
return
end
local ui = qteFolder:FindFirstChild("UI")
if not ui then return end
local inputs = ui:FindFirstChild("Inputs")
if not inputs then return end
StatusLabel.Text = "QTE DETECTADO!"
StatusLabel.TextColor3 = Color3.fromRGB(60, 255, 100)
for _, frame in pairs(inputs:GetChildren()) do
if frame:IsA("Frame") and frame.Visible == true and frame.Name ~= "InputTemplate" then
-- Tenta pegar a tecla pelo Nome ou pelo Texto interno
local keyString = frame.Name
if #keyString > 10 and frame:FindFirstChild("InputKey") then
keyString = frame.InputKey.Text
end
local code = GetKeyCode(keyString)
if code then
-- PRESSIONA A TECLA
if code == "Mouse1" then
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 1)
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 1)
else
VirtualInputManager:SendKeyEvent(true, code, false, game)
VirtualInputManager:SendKeyEvent(false, code, false, game)
end
-- Esconde o frame para não apertar 2x e espera o delay
frame.Visible = false
task.wait(Config.Delay)
end
end
end
end
-- ==============================================================================
-- 4. CONTROLE DO LOOP
-- ==============================================================================
ToggleBtn.MouseButton1Click:Connect(function()
Config.Enabled = not Config.Enabled
if Config.Enabled then
ToggleBtn.Text = "STATUS: ON"
ToggleBtn.BackgroundColor3 = Color3.fromRGB(60, 255, 100)
-- Liga o loop rápido
_G.QTE_Connection = RunService.RenderStepped:Connect(ProcessQTE)
else
ToggleBtn.Text = "STATUS: OFF"
ToggleBtn.BackgroundColor3 = Color3.fromRGB(255, 65, 65)
StatusLabel.Text = "Script Parado"
StatusLabel.TextColor3 = Color3.fromRGB(100, 100, 100)
if _G.QTE_Connection then _G.QTE_Connection:Disconnect() end
end
end)
Comments
No comments yet
Be the first to share your thoughts!