📅 2026-07-03T10:52:01.026Z
👁️ 219 katselukertaa
🔓 Julkinen


--phần 1
-- 1. Định nghĩa đầy đủ các dịch vụ hệ thống cốt lõi
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local UserInputService = game:GetService("UserInputService")
local Teams = game:GetService("Teams")
local Camera = Workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer

-- LƯU LẠI THÔNG SỐ CAMERA BAN ĐẦU CỦA GAME (Chống lỗi zoom khi OFF)
local OriginalCameraMode = LocalPlayer.CameraMode
local OriginalMaxZoom = LocalPlayer.CameraMaxZoomDistance
local OriginalMinZoom = LocalPlayer.CameraMinZoomDistance

-- 2. Khởi tạo bảng trạng thái tính năng chống xung đột toàn cục
local State = { 
    TP_Closest = false, 
    TP_4Far = false, 
    TP_Mid = false,
    Speed_Hack = false,
    Jump_Hack = false,
    Lock_Player = false, 
    Lock_NPC = false, 
    AIM = false,               
    AIM_Player = false,        
    Aim_VatCan_S2 = false,     
    ESP_1 = false,             
    ESP_2 = false,             
    ESP_3 = false,
    Unlock_Camera = false
}

local TargetHeight, LoopDistance, LoopState = 0, 15, 0
local FOV_Aim_Radius, FOV_Player_Radius, FOV_NPC_Radius = 150, 120, 120
local Aim_Smooth = 5
local Target_Speed = 16 
local Target_Jump = 50
local Max_Zoom_Value = 10000 -- Khoảng cách zoom mặc định ban đầu khi mở khóa

local ESPDrawings, ButtonsList = {}, {}
local LockedTarget = nil
local LockedTPTarget = nil

-- 3. Khởi tạo đồ họa vòng tròn FOV bằng Drawing API
local FOVCircle = Drawing.new("Circle")
FOVCircle.Color = Color3.fromRGB(255, 255, 255); FOVCircle.Thickness = 1; FOVCircle.Filled = false; FOVCircle.Visible = false

local CirclePlayer = Drawing.new("Circle")
CirclePlayer.Color = Color3.fromRGB(0, 255, 255); CirclePlayer.Thickness = 1; CirclePlayer.Filled = false; CirclePlayer.Visible = false

local CircleNPC = Drawing.new("Circle")
CircleNPC.Color = Color3.fromRGB(255, 165, 0); CircleNPC.Thickness = 1; CircleNPC.Filled = false; CircleNPC.Visible = false
--phần 2
-- 4. Ép buộc Menu cài vào CoreGui và đặt DisplayOrder tối đa để đè lên mọi UI của game
local CoreGui = game:GetService("CoreGui")
if CoreGui:FindFirstChild("SuperMultiMenuV3") then CoreGui:FindFirstChild("SuperMultiMenuV3"):Destroy() end

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "SuperMultiMenuV3"
ScreenGui.ResetOnSpawn = false
ScreenGui.DisplayOrder = 999999 
ScreenGui.Parent = CoreGui

local MainFrame = Instance.new("Frame", ScreenGui)
MainFrame.Name = "MainFrame"; MainFrame.Size = UDim2.new(0, 180, 0, 260); MainFrame.Position = UDim2.new(0.05, 0, 0.2, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20); MainFrame.BackgroundTransparency = 0.15; MainFrame.ClipsDescendants = true
Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 8)

local ScrollFrame = Instance.new("ScrollingFrame", MainFrame)
ScrollFrame.Name = "ScrollFrame"; ScrollFrame.Size = UDim2.new(1, 0, 1, -35); ScrollFrame.Position = UDim2.new(0, 0, 0, 35)
ScrollFrame.BackgroundTransparency = 1; ScrollFrame.ScrollBarThickness = 3; ScrollFrame.ScrollBarImageColor3 = Color3.fromRGB(120, 120, 120)

local ListLayout = Instance.new("UIListLayout", ScrollFrame)
ListLayout.SortOrder = Enum.SortOrder.LayoutOrder; ListLayout.Padding = UDim.new(0, 5)

local ListPadding = Instance.new("UIPadding", ScrollFrame)
ListPadding.PaddingLeft = UDim.new(0, 8); ListPadding.PaddingRight = UDim.new(0, 8)

local MenuTitle = Instance.new("TextLabel", MainFrame)
MenuTitle.Size = UDim2.new(0, 130, 0, 30); MenuTitle.Position = UDim2.new(0, 10, 0, 2)
MenuTitle.Text = "SUPER MULTI MENU V3"; MenuTitle.TextColor3 = Color3.new(1, 1, 1); MenuTitle.Font = Enum.Font.SourceSansBold; MenuTitle.TextSize = 11; MenuTitle.BackgroundTransparency = 1

local MinimizeBtn = Instance.new("TextButton", MainFrame)
MinimizeBtn.Size = UDim2.new(0, 25, 0, 25); MinimizeBtn.Position = UDim2.new(1, -30, 0, 2); MinimizeBtn.BackgroundTransparency = 1
MinimizeBtn.Text = "[-]"; MinimizeBtn.TextColor3 = Color3.fromRGB(255, 50, 50); MinimizeBtn.Font = Enum.Font.SourceSansBold; MinimizeBtn.TextSize = 14

local MaximizeBtn = Instance.new("TextButton", ScreenGui)
MaximizeBtn.Size = UDim2.new(0, 40, 0, 40); MaximizeBtn.Position = MainFrame.Position; MaximizeBtn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
MaximizeBtn.Text = "[+]"; MaximizeBtn.TextColor3 = Color3.fromRGB(50, 255, 50); MaximizeBtn.Font = Enum.Font.SourceSansBold; MaximizeBtn.TextSize = 16; MaximizeBtn.Visible = false
Instance.new("UICorner", MaximizeBtn).CornerRadius = UDim.new(0, 20)

MinimizeBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false; MaximizeBtn.Position = MainFrame.Position; MaximizeBtn.Visible = true end)
MaximizeBtn.MouseButton1Click:Connect(function() MaximizeBtn.Visible = false; MainFrame.Visible = true end)
--phần 3
local function SetMenuDragLogic()
    local dragging, dragStart, startPos; local holdTimer = 0
    MenuTitle.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
            holdTimer = tick()
            task.delay(1.0, function()
                if holdTimer ~= 0 and (tick() - holdTimer >= 1.0) then
                    dragging = true; dragStart = input.Position; startPos = MainFrame.Position
                    MenuTitle.Text = "ĐANG DI CHUYỂN..."; MenuTitle.TextColor3 = Color3.fromRGB(255, 255, 0)
                end
            end)
        end
    end)
    UserInputService.InputChanged:Connect(function(input)
        if dragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
            local delta = input.Position - dragStart
            MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
            MaximizeBtn.Position = MainFrame.Position
        end
    end)
    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = false; holdTimer = 0; MenuTitle.Text = "SUPER MULTI MENU V3"; MenuTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
        end
    end)
end
SetMenuDragLogic()

local currentOrder = 1
local function CreateToggle(name, stateKey)
    local btn = Instance.new("TextButton", ScrollFrame)
    btn.Size = UDim2.new(1, 0, 0, 24); btn.LayoutOrder = currentOrder; currentOrder = currentOrder + 1
    btn.BackgroundColor3 = Color3.fromRGB(35, 35, 35); btn.Text = name .. ": OFF"
    btn.TextColor3 = Color3.new(1, 1, 1); btn.Font = Enum.Font.SourceSans; btn.TextSize = 10; btn.AutoButtonColor = false
    Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 4)
    
    btn.MouseButton1Click:Connect(function()
        State[stateKey] = not State[stateKey]
        if State[stateKey] then
            btn.Text = name .. ": ON"; btn.BackgroundColor3 = Color3.fromRGB(0, 80, 0)
        else
            btn.Text = name .. ": OFF"; btn.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
            -- Khi tắt camera, khôi phục ngay lập tức về cấu hình gốc của game
            if stateKey == "Unlock_Camera" then
                pcall(function()
                    LocalPlayer.CameraMode = OriginalCameraMode
                    LocalPlayer.CameraMaxZoomDistance = OriginalMaxZoom
                    LocalPlayer.CameraMinZoomDistance = OriginalMinZoom
                end)
            end
        end
    end)
end

CreateToggle("TP BÁM SÁT (3.3 STUDS)", "TP_Closest")
CreateToggle("TP ĐỨNG XA KHÓA MỤC TIÊU", "TP_4Far")
CreateToggle("TP VÀO GIỮA NGƯỜI CHƠI", "TP_Mid")
CreateToggle("TỐC ĐỘ DI CHUYỂN (SPEED)", "Speed_Hack")
CreateToggle("NHẢY CAO (JUMP HACK)", "Jump_Hack")
CreateToggle("KHÓA CHẶT TÂM NGƯỜI CHƠI", "Lock_Player")
CreateToggle("KHÓA CHẶT TÂM BOT (NPC)", "Lock_NPC")
CreateToggle("GHIM TÂM TRƠN (AIM SMOOTH)", "AIM")
CreateToggle("SILENT AIM NGƯỜI CHƠI", "AIM_Player")
CreateToggle("SILENT AIM KIỂM VẬT CẢN", "Aim_VatCan_S2")
CreateToggle("BẬT KHUNG NHÌN XUYÊN TƯỜNG S1", "ESP_1")
CreateToggle("BẬT KHUNG NHÌN XUYÊN TƯỜNG S2", "ESP_2")
CreateToggle("BẬT KHUNG NHÌN XUYÊN TƯỜNG S3", "ESP_3")
CreateToggle("MỞ KHÓA CAMERA (1ST)", "Unlock_Camera")

-- THÀNH PHẦN MỚI: Ô NHẬP SỐ GIỚI HẠN KHOẢNG CÁCH ZOOM CAMERA
local txtZoom = Instance.new("TextBox", ScrollFrame)
txtZoom.Size = UDim2.new(1, 0, 0, 20); txtZoom.LayoutOrder = currentOrder; currentOrder = currentOrder + 1
txtZoom.BackgroundColor3 = Color3.fromRGB(50, 50, 50); txtZoom.Text = "Giới hạn Zoom (Số)"; txtZoom.TextColor3 = Color3.fromRGB(255, 255, 255)
txtZoom.Font = Enum.Font.SourceSans; txtZoom.TextSize = 10
txtZoom.FocusLost:Connect(function() 
    local num = tonumber(txtZoom.Text)
    if num then 
        Max_Zoom_Value = num 
        txtZoom.Text = "GIỚI HẠN ZOOM: " .. tostring(num)
    else
        txtZoom.Text = "Vui lòng nhập số!"
    end 
end)

local btnLoop = Instance.new("TextButton", ScrollFrame)
btnLoop.Size = UDim2.new(1, 0, 0, 20); btnLoop.LayoutOrder = currentOrder; currentOrder = currentOrder + 1
btnLoop.BackgroundColor3 = Color3.fromRGB(40, 40, 40); btnLoop.Text = "HƯỚNG LOOP: SANG TRÁI"
btnLoop.TextColor3 = Color3.new(1, 1, 1); btnLoop.Font = Enum.Font.SourceSansBold; btnLoop.TextSize = 9
btnLoop.MouseButton1Click:Connect(function() LoopState = LoopState + 1; if LoopState > 4 then LoopState = 1 end; local txts = {"SANG TRÁI", "PHÍA TRƯỚC", "SANG PHẢI", "PHÍA SAU"} btnLoop.Text = "HƯỚNG LOOP: " .. txts[LoopState] end)

local txtHeight = Instance.new("TextBox", ScrollFrame)
txtHeight.Size = UDim2.new(1, 0, 0, 20); txtHeight.LayoutOrder = currentOrder; currentOrder = currentOrder + 1
txtHeight.BackgroundColor3 = Color3.fromRGB(50, 50, 50); txtHeight.Text = "Chiều cao Y"; txtHeight.TextColor3 = Color3.new(0, 1, 0); txtHeight.Font = Enum.Font.SourceSansBold; txtHeight.TextSize = 9
txtHeight.FocusLost:Connect(function() local num = tonumber(txtHeight.Text); if num then TargetHeight = num end end)

local txtDist = Instance.new("TextBox", ScrollFrame)
txtDist.Size = UDim2.new(1, 0, 0, 20); txtDist.LayoutOrder = currentOrder; currentOrder = currentOrder + 1
txtDist.BackgroundColor3 = Color3.fromRGB(50, 50, 50); txtDist.Text = "Khoảng cách xa"; txtDist.TextColor3 = Color3.new(1, 0.6, 0); txtDist.Font = Enum.Font.SourceSansBold; txtDist.TextSize = 9
txtDist.FocusLost:Connect(function() local num = tonumber(txtDist.Text); if num then LoopDistance = num end end)

ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, currentOrder * 25)
--phần 4
-- 5. Hàm lọc tọa độ mục tiêu nâng cấp thuật toán kiểm tra vật cản
local function GetClosestPlayerInFOV(checkWall)
    local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
    local closest, shortestFOVDist = nil, FOV_Aim_Radius
    for _, p in pairs(Players:GetPlayers()) do
        if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") and p.Character.Humanoid.Health > 0 then
            local root = p.Character.HumanoidRootPart
            local screenPos, onScreen = Camera:WorldToViewportPoint(root.Position)
            if onScreen then
                local fovDistance = (Vector2.new(screenPos.X, screenPos.Y) - screenCenter).Magnitude
                if fovDistance < shortestFOVDist then
                    if checkWall then
                        local raycastParams = RaycastParams.new()
                        raycastParams.FilterType = Enum.RaycastFilterType.Exclude
                        raycastParams.FilterDescendantsInstances = {LocalPlayer.Character, p.Character}
                        raycastParams.RespectCanCollide = true
                        
                        local origin = Camera.CFrame.Position
                        local direction = root.Position - origin
                        local rayResult = Workspace:Raycast(origin, direction, raycastParams)
                        
                        if not rayResult then 
                            closest = p 
                            shortestFOVDist = fovDistance 
                        end
                    else 
                        closest = p 
                        shortestFOVDist = fovDistance 
                    end
                end
            end
        end
    end
    return closest
end

local function GetActualClosestPlayer()
    local closest, shortestDist = nil, math.huge
    for _, p in pairs(Players:GetPlayers()) do
        if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") and p.Character.Humanoid.Health > 0 then
            local dist = (Camera.CFrame.Position - p.Character.HumanoidRootPart.Position).Magnitude
            if dist < shortestDist then closest = p; shortestDist = dist end
        end
    end
    return closest
end

local function GetESPColor(p)
    if p.Team then return p.TeamColor.Color end
    return Color3.fromRGB(255, 255, 255)
end

Players.PlayerRemoving:Connect(function(player)
    if ESPDrawings[player.Name] then
        local drawGroup = ESPDrawings[player.Name]
        pcall(function()
            drawGroup.Box:Remove()
            drawGroup.Line:Remove()
            drawGroup.Text:Remove()
        end)
        ESPDrawings[player.Name] = nil
    end
    if LockedTarget == player then LockedTarget = nil end
    if LockedTPTarget == player then LockedTPTarget = nil end
end)

RunService.Heartbeat:Connect(function()
    local myChar = LocalPlayer.Character
    if not myChar or not myChar:FindFirstChild("HumanoidRootPart") then return end
    local rootPart = myChar.HumanoidRootPart
    
    local isTPEnabled = (State.TP_Closest or State.TP_4Far or State.TP_Mid)
    if not isTPEnabled then 
        LockedTPTarget = nil 
        return 
    end
    
    if not LockedTPTarget or not LockedTPTarget.Character or not LockedTPTarget.Character:FindFirstChild("Humanoid") or LockedTPTarget.Character.Humanoid.Health <= 0 then 
        LockedTPTarget = GetActualClosestPlayer() 
    end
    
    if LockedTPTarget and LockedTPTarget.Character and LockedTPTarget.Character:FindFirstChild("HumanoidRootPart") then
        local targetRoot = LockedTPTarget.Character.HumanoidRootPart
        local customDist = (LoopDistance and LoopDistance > 0) and LoopDistance or 15
        
        if State.TP_Closest then
            local backPosition = targetRoot.Position - (targetRoot.CFrame.LookVector * 3.3) + Vector3.new(0, TargetHeight, 0)
            rootPart.CFrame = CFrame.new(backPosition, targetRoot.Position)
        elseif State.TP_4Far then
            rootPart.CFrame = CFrame.new(targetRoot.Position + (targetRoot.CFrame.LookVector * -customDist) + Vector3.new(0, TargetHeight, 0), targetRoot.Position)
        elseif State.TP_Mid then
            rootPart.CFrame = targetRoot.CFrame + Vector3.new(0, TargetHeight, 0)
        end
    end
end)

-- Vòng lặp chính xử lý Real-time
RunService.RenderStepped:Connect(function()
    local myChar = LocalPlayer.Character
    if not myChar or not myChar:FindFirstChild("HumanoidRootPart") or not myChar:FindFirstChild("Humanoid") then return end
    local rootPart = myChar.HumanoidRootPart
    local humanoid = myChar.Humanoid
    local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)

    -- LOGIC ÉP THÔNG SỐ CAMERA KHI BẬT ON
    if State.Unlock_Camera then
        pcall(function()
            LocalPlayer.CameraMode = Enum.CameraMode.Classic
            LocalPlayer.CameraMaxZoomDistance = Max_Zoom_Value -- Sử dụng con số cấu hình từ ô nhập liệu
            if LocalPlayer.CameraMinZoomDistance > 5 then
                LocalPlayer.CameraMinZoomDistance = 5
            end
        end)
    end

    local anyAim = (State.AIM or State.AIM_Player or State.Aim_VatCan_S2)
    if anyAim then FOVCircle.Position = screenCenter; FOVCircle.Radius = FOV_Aim_Radius; FOVCircle.Visible = true else FOVCircle.Visible = false end
    if State.Lock_Player then CirclePlayer.Position = screenCenter; CirclePlayer.Radius = FOV_Player_Radius; CirclePlayer.Visible = true else CirclePlayer.Visible = false end
    if State.Lock_NPC then CircleNPC.Position = screenCenter; CircleNPC.Radius = FOV_NPC_Radius; CircleNPC.Visible = true else CircleNPC.Visible = false end

    if State.Speed_Hack then humanoid.WalkSpeed = Target_Speed end
    if State.Jump_Hack then humanoid.UseJumpPower = true; humanoid.JumpPower = Target_Jump end

    if anyAim then
        local needCheckWall = State.Aim_VatCan_S2 
        LockedTarget = GetClosestPlayerInFOV(needCheckWall)
        if LockedTarget and LockedTarget.Character and LockedTarget.Character:FindFirstChild("HumanoidRootPart") then
            local targetPos = LockedTarget.Character.HumanoidRootPart.Position
            Camera.CFrame = Camera.CFrame:Lerp(CFrame.new(Camera.CFrame.Position, targetPos), 1 / math.clamp(Aim_Smooth, 1, 30))
        end
    else LockedTarget = nil end

    for _, p in pairs(Players:GetPlayers()) do
        if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
            local showESP = (State.ESP_1 or State.ESP_2 or State.ESP_3)
            if showESP then
                if not ESPDrawings[p.Name] then
                    ESPDrawings[p.Name] = { Box = Drawing.new("Square"), Line = Drawing.new("Line"), Text = Drawing.new("Text") }
                    ESPDrawings[p.Name].Box.Filled = false; ESPDrawings[p.Name].Text.Center = true; ESPDrawings[p.Name].Text.Outline = true
                end
                local d = ESPDrawings[p.Name]
                local pos, onScreen = Camera:WorldToViewportPoint(p.Character.HumanoidRootPart.Position)
                if onScreen then
                    local distance = math.floor((rootPart.Position - p.Character.HumanoidRootPart.Position).Magnitude)
                    local pLevel = p:FindFirstChild("Data") and p.Data:FindFirstChild("Level") and p.Data.Level.Value or "?"
                    d.Box.Color = Color3.fromRGB(255, 255, 255); d.Text.Color = GetESPColor(p); d.Line.Color = Color3.fromRGB(0, 255, 0)
                    local boxW, boxH, textSize = 30, 50, 11
                    if State.ESP_1 then boxW, boxH, textSize = 30, 40, 12
                    elseif State.ESP_2 then 
                        local scaleFactor = 1 / (pos.Z * 0.015)
                        boxW = math.clamp(30 * scaleFactor, 6, 70); boxH = math.clamp(40 * scaleFactor, 9, 95); textSize = math.clamp(12 * scaleFactor, 6, 14)
                    elseif State.ESP_3 then boxW, boxH, textSize = 30, 50, 11 end
                    d.Box.Size = Vector2.new(boxW, boxH); d.Box.Position = Vector2.new(pos.X - (boxW / 2), pos.Y - (boxH / 2)); d.Box.Visible = true
                    d.Line.From = Vector2.new(Camera.ViewportSize.X / 2, 0); d.Line.To = Vector2.new(pos.X, pos.Y - (boxH / 2)); d.Line.Visible = true
                    d.Text.Size = textSize; d.Text.Position = Vector2.new(pos.X, pos.Y + (boxH / 2) + 3)
                    d.Text.Text = string.format("%s\n[Lv.%s - %sm]", p.Name, tostring(pLevel), distance); d.Text.Visible = true
                else d.Box.Visible = false; d.Line.Visible = false; d.Text.Visible = false end
            elseif ESPDrawings[p.Name] then
                ESPDrawings[p.Name].Box.Visible = false; ESPDrawings[p.Name].Line.Visible = false; ESPDrawings[p.Name].Text.Visible = false
            end
        end
    end
end)

-- 7. Hook Metatable để kích hoạt tính năng Silent Aim
local gmt = getrawmetatable(game); local oldIndex = gmt.__index; setreadonly(gmt, false)
gmt.__index = newcclosure(function(self, targetIndex)
    if (State.AIM_Player or State.Aim_VatCan_S2) and tostring(self) == "Mouse" and (targetIndex == "Hit" or targetIndex == "Target") then
        local needCheckWall = State.Aim_VatCan_S2
        local closestEnemy = GetClosestPlayerInFOV(needCheckWall)
        if closestEnemy and closestEnemy.Character and closestEnemy.Character:FindFirstChild("HumanoidRootPart") then
            if targetIndex == "Hit" then return closestEnemy.Character.HumanoidRootPart.CFrame
            elseif targetIndex == "Target" then return closestEnemy.Character.HumanoidRootPart end
        end
    end
    return oldIndex(self, targetIndex)
end)
setreadonly(gmt, true)