local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local Workspace = game:GetService("Workspace") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local Camera = workspace.CurrentCamera -- ========================================== -- 绘制API检测 -- ========================================== local DrawingEnabled = false local Drawing = nil pcall(function() Drawing = getgenv().Drawing or Drawing if Drawing and Drawing.new then local test = Drawing.new("Square") test:Remove() DrawingEnabled = true end end) -- ========================================== -- ESP设置 -- ========================================== local Settings = { BoxESP = false, LineESP = false, SkeletonESP = false, DistanceESP = false, NameESP = false, HealthESP = false, WeaponESP = false, BoxType = "默认", LineType = "默认", SkeletonType = "默认", HealthType = "默认", LinePosition = "最下方", -- 【新增】绘制颜色自定义 BoxColor = Color3.fromRGB(0, 255, 100), LineColor = Color3.fromRGB(0, 255, 100), SkeletonColor = Color3.fromRGB(0, 255, 100), NameColor = Color3.fromRGB(255, 255, 255), DistanceColor = Color3.fromRGB(200, 200, 200), WeaponColor = Color3.fromRGB(255, 200, 100), } -- ========================================== -- 自瞄设置 -- ========================================== local AimSettings = { Enabled = false, AimMethod = "总是自瞄", AimMode = "强锁", AimPart = "Head", AimRange = 250, AimMaxDistance = 2000, AimSmoothness = 0.08, AimLockSpeed = 0.15, AimPrediction = 0.165, AimWallCheck = true, AimPriority = "准心优先", ShowRangeCircle = false, RangeColor = "Red", TouchPosition = false, ContinuousLock = false, } -- 自瞄系统变量 local AimSystem = { CurrentTarget = nil, TargetLockTime = 0, LastUpdate = 0, IsAiming = false, Connection = nil, CurrentDir = nil, RangeCircle = nil, AimTick = 0 } local SkeletonConnections = { {"Head", "UpperTorso"}, {"UpperTorso", "LowerTorso"}, {"UpperTorso", "LeftUpperArm"}, {"LeftUpperArm", "LeftLowerArm"}, {"LeftLowerArm", "LeftHand"}, {"UpperTorso", "RightUpperArm"}, {"RightUpperArm", "RightLowerArm"}, {"RightLowerArm", "RightHand"}, {"LowerTorso", "LeftUpperLeg"}, {"LeftUpperLeg", "LeftLowerLeg"}, {"LeftLowerLeg", "LeftFoot"}, {"LowerTorso", "RightUpperLeg"}, {"RightUpperLeg", "RightLowerLeg"}, {"RightLowerLeg", "RightFoot"} } local ESPObjects = {} local LastESPUpdate = 0 local UpdateInterval = 0.066 local PlayerCountFrame = nil -- ========================================== -- 获取玩家当前武器 -- ========================================== local function GetPlayerWeapon(character) if not character then return "" end for _, child in pairs(character:GetChildren()) do if child:IsA("Tool") then return child.Name end end for _, child in pairs(player.Backpack:GetChildren()) do if child:IsA("Tool") then return child.Name end end return "" end -- ========================================== -- 世界坐标转屏幕坐标 -- ========================================== local function WorldToScreen(worldPos) local screenPos, onScreen = Camera:WorldToViewportPoint(worldPos) if not onScreen or screenPos.Z <= 0 then return Vector2.new(0, 0), false end return Vector2.new(screenPos.X, screenPos.Y), true end -- ========================================== -- 获取角色边框 -- ========================================== local function GetCharacterCorners(character) local head = character:FindFirstChild("Head") local root = character:FindFirstChild("HumanoidRootPart") if not head or not root then return nil end local distance = (root.Position - Camera.CFrame.Position).Magnitude if distance > 3000 then return nil end local cameraPos = Camera.CFrame.Position local cameraLook = Camera.CFrame.LookVector local toPlayer = (root.Position - cameraPos).Unit local dotProduct = cameraLook:Dot(toPlayer) if dotProduct < -0.2 then return nil end local headPos, headOnScreen = WorldToScreen(head.Position) local rootPos, rootOnScreen = WorldToScreen(root.Position) if not headOnScreen and not rootOnScreen then return nil end local height = math.abs(rootPos.Y - headPos.Y) * 2.2 local width = height * 0.55 local centerX = (headPos.X + rootPos.X) / 2 local centerY = (headPos.Y + rootPos.Y) / 2 return { TopLeft = Vector2.new(centerX - width / 2, centerY - height / 2), TopRight = Vector2.new(centerX + width / 2, centerY - height / 2), BottomLeft = Vector2.new(centerX - width / 2, centerY + height / 2), BottomRight = Vector2.new(centerX + width / 2, centerY + height / 2), Center = Vector2.new(centerX, centerY), Height = height, Width = width } end -- ========================================== -- 创建ESP对象 -- ========================================== local function CreateESP(targetPlayer) if not DrawingEnabled or targetPlayer == player or ESPObjects[targetPlayer] then return end local success, objects = pcall(function() local objs = { -- 方框 BoxTop = Drawing.new("Line"), BoxBottom = Drawing.new("Line"), BoxLeft = Drawing.new("Line"), BoxRight = Drawing.new("Line"), BoxTop2 = Drawing.new("Line"), BoxBottom2 = Drawing.new("Line"), BoxLeft2 = Drawing.new("Line"), BoxRight2 = Drawing.new("Line"), BoxFill = Drawing.new("Square"), CornerTL1 = Drawing.new("Line"), CornerTL2 = Drawing.new("Line"), CornerTR1 = Drawing.new("Line"), CornerTR2 = Drawing.new("Line"), CornerBL1 = Drawing.new("Line"), CornerBL2 = Drawing.new("Line"), CornerBR1 = Drawing.new("Line"), CornerBR2 = Drawing.new("Line"), -- 【修复】血量 - 使用4条弧线绘制圆圈(比Circle更可靠) HealthCircle = Drawing.new("Circle"), HealthArc1 = Drawing.new("Line"), HealthArc2 = Drawing.new("Line"), HealthArc3 = Drawing.new("Line"), HealthArc4 = Drawing.new("Line"), HealthText = Drawing.new("Text"), HealthBar = Drawing.new("Square"), HealthBarBg = Drawing.new("Square"), -- 射线 Line = Drawing.new("Line"), LineSeg1 = Drawing.new("Line"), LineSeg2 = Drawing.new("Line"), LineSeg3 = Drawing.new("Line"), LineSeg4 = Drawing.new("Line"), Line2 = Drawing.new("Line"), Line3 = Drawing.new("Line"), -- 【修复】箭头 - 创建三角形 ArrowTri = Drawing.new("Triangle"), Name = Drawing.new("Text"), Distance = Drawing.new("Text"), WeaponText = Drawing.new("Text"), Skeleton = {} } -- 初始化所有线条 for _, lineName in pairs({"BoxTop", "BoxBottom", "BoxLeft", "BoxRight", "BoxTop2", "BoxBottom2", "BoxLeft2", "BoxRight2", "CornerTL1", "CornerTL2", "CornerTR1", "CornerTR2", "CornerBL1", "CornerBL2", "CornerBR1", "CornerBR2", "Line", "Line2", "Line3", "LineSeg1", "LineSeg2", "LineSeg3", "LineSeg4"}) do if objs[lineName] then objs[lineName].Thickness = 2 objs[lineName].Color = Color3.fromRGB(0, 255, 100) objs[lineName].Visible = false objs[lineName].Transparency = 1 end end objs.BoxFill.Filled = true objs.BoxFill.Transparency = 0.3 objs.BoxFill.Color = Color3.fromRGB(0, 255, 100) objs.BoxFill.Visible = false objs.BoxFill.ZIndex = -1 objs.HealthBar.Filled = true objs.HealthBar.Transparency = 1 objs.HealthBar.Color = Color3.fromRGB(0, 255, 100) objs.HealthBar.Visible = false objs.HealthBar.ZIndex = 10 objs.HealthBarBg.Filled = true objs.HealthBarBg.Transparency = 0.5 objs.HealthBarBg.Color = Color3.fromRGB(50, 50, 50) objs.HealthBarBg.Visible = false objs.HealthBarBg.ZIndex = 9 -- 【修复】血量圆圈设置 - 使用Circle+4条弧线双重保障 objs.HealthCircle.Thickness = 3 objs.HealthCircle.Color = Color3.fromRGB(255, 255, 255) objs.HealthCircle.Filled = false objs.HealthCircle.NumSides = 64 objs.HealthCircle.Radius = 15 objs.HealthCircle.Visible = false objs.HealthCircle.Transparency = 1 objs.HealthCircle.ZIndex = 100 -- 4条弧线作为备用(右上、右下、左下、左上) for _, arcName in pairs({"HealthArc1", "HealthArc2", "HealthArc3", "HealthArc4"}) do if objs[arcName] then objs[arcName].Thickness = 3 objs[arcName].Color = Color3.fromRGB(255, 255, 255) objs[arcName].Visible = false objs[arcName].Transparency = 1 objs[arcName].ZIndex = 99 end end objs.HealthText.Size = 10 objs.HealthText.Color = Color3.fromRGB(255, 255, 255) objs.HealthText.Outline = true objs.HealthText.Center = true objs.HealthText.Visible = false objs.HealthText.Font = Drawing.Fonts.UI objs.HealthText.Transparency = 1 objs.HealthText.ZIndex = 11 -- 【修复】箭头三角形设置 objs.ArrowTri.Color = Color3.fromRGB(0, 255, 100) objs.ArrowTri.Filled = true objs.ArrowTri.Visible = false objs.ArrowTri.Transparency = 1 objs.ArrowTri.ZIndex = 5 objs.Name.Size = 11 objs.Name.Color = Color3.fromRGB(255, 255, 255) objs.Name.Outline = true objs.Name.Center = true objs.Name.Visible = false objs.Name.Font = Drawing.Fonts.UI objs.Name.Transparency = 1 objs.Distance.Size = 5.8 objs.Distance.Color = Color3.fromRGB(200, 200, 200) objs.Distance.Outline = true objs.Distance.Center = true objs.Distance.Visible = false objs.Distance.Font = Drawing.Fonts.UI objs.Distance.Transparency = 1 objs.WeaponText.Size = 10 objs.WeaponText.Color = Color3.fromRGB(255, 200, 100) objs.WeaponText.Outline = true objs.WeaponText.Center = true objs.WeaponText.Visible = false objs.WeaponText.Font = Drawing.Fonts.UI objs.WeaponText.Transparency = 1 for i = 1, #SkeletonConnections do local boneLine = Drawing.new("Line") boneLine.Thickness = 2 boneLine.Color = Color3.fromRGB(0, 255, 100) boneLine.Visible = false boneLine.Transparency = 1 table.insert(objs.Skeleton, boneLine) end return objs end) if success then ESPObjects[targetPlayer] = objects end end -- ========================================== -- 移除ESP对象 -- ========================================== local function RemoveESP(targetPlayer) if ESPObjects[targetPlayer] then pcall(function() for key, obj in pairs(ESPObjects[targetPlayer]) do if key == "Skeleton" then for _, bone in pairs(obj) do if bone and bone.Remove then bone:Remove() end end elseif obj and obj.Remove then obj:Remove() end end end) ESPObjects[targetPlayer] = nil end end -- ========================================== -- 核心ESP更新 -- ========================================== local function UpdateESP() if not DrawingEnabled then return end local currentTime = tick() if currentTime - LastESPUpdate < UpdateInterval then return end LastESPUpdate = currentTime local cameraPos = Camera.CFrame.Position local cameraLook = Camera.CFrame.LookVector local viewportSize = Camera.ViewportSize for _, targetPlayer in pairs(Players:GetPlayers()) do if targetPlayer == player then continue end local character = targetPlayer.Character if not character then RemoveESP(targetPlayer) continue end local humanoid = character:FindFirstChildOfClass("Humanoid") local head = character:FindFirstChild("Head") local root = character:FindFirstChild("HumanoidRootPart") if not humanoid or not head or not root or humanoid.Health <= 0 then RemoveESP(targetPlayer) continue end local toPlayer = (root.Position - cameraPos).Unit local dotProduct = cameraLook:Dot(toPlayer) if dotProduct < -0.3 then if ESPObjects[targetPlayer] then local objs = ESPObjects[targetPlayer] for key, obj in pairs(objs) do if key == "Skeleton" then for _, bone in pairs(obj) do bone.Visible = false end elseif obj and obj.Visible ~= nil then obj.Visible = false end end end continue end if not ESPObjects[targetPlayer] then CreateESP(targetPlayer) end local objects = ESPObjects[targetPlayer] if not objects then continue end pcall(function() local corners = GetCharacterCorners(character) if not corners then for key, obj in pairs(objects) do if key == "Skeleton" then for _, bone in pairs(obj) do bone.Visible = false end elseif obj and obj.Visible ~= nil then obj.Visible = false end end return end local distance = (root.Position - cameraPos).Magnitude local healthPercent = humanoid.Health / humanoid.MaxHealth local healthColor = Color3.fromRGB(255 * (1 - healthPercent), 255 * healthPercent, 50) -- 方框处理 if Settings.BoxESP then local tl, tr, bl, br = corners.TopLeft, corners.TopRight, corners.BottomLeft, corners.BottomRight local boxColor = Settings.BoxColor -- 【新增】使用自定义颜色 for _, name in pairs({"BoxTop", "BoxBottom", "BoxLeft", "BoxRight", "BoxTop2", "BoxBottom2", "BoxLeft2", "BoxRight2", "CornerTL1", "CornerTL2", "CornerTR1", "CornerTR2", "CornerBL1", "CornerBL2", "CornerBR1", "CornerBR2"}) do if objects[name] then objects[name].Visible = false end end if objects.BoxFill then objects.BoxFill.Visible = false end if Settings.BoxType == "填充" then if objects.BoxFill then objects.BoxFill.Position = tl objects.BoxFill.Size = Vector2.new(corners.Width, corners.Height) objects.BoxFill.Color = boxColor objects.BoxFill.Visible = true end elseif Settings.BoxType == "双线" then local offset = 3 objects.BoxTop.Thickness = 3 objects.BoxTop.From = tl; objects.BoxTop.To = tr; objects.BoxTop.Color = boxColor; objects.BoxTop.Visible = true objects.BoxBottom.Thickness = 3 objects.BoxBottom.From = bl; objects.BoxBottom.To = br; objects.BoxBottom.Color = boxColor; objects.BoxBottom.Visible = true objects.BoxLeft.Thickness = 3 objects.BoxLeft.From = tl; objects.BoxLeft.To = bl; objects.BoxLeft.Color = boxColor; objects.BoxLeft.Visible = true objects.BoxRight.Thickness = 3 objects.BoxRight.From = tr; objects.BoxRight.To = br; objects.BoxRight.Color = boxColor; objects.BoxRight.Visible = true local innerOffset = 6 local innerTL = tl + Vector2.new(innerOffset, innerOffset) local innerTR = tr + Vector2.new(-innerOffset, innerOffset) local innerBL = bl + Vector2.new(innerOffset, -innerOffset) local innerBR = br + Vector2.new(-innerOffset, -innerOffset) objects.BoxTop2.Thickness = 1 objects.BoxTop2.From = innerTL; objects.BoxTop2.To = innerTR; objects.BoxTop2.Color = Color3.fromRGB(255,255,255); objects.BoxTop2.Visible = true objects.BoxBottom2.Thickness = 1 objects.BoxBottom2.From = innerBL; objects.BoxBottom2.To = innerBR; objects.BoxBottom2.Color = Color3.fromRGB(255,255,255); objects.BoxBottom2.Visible = true objects.BoxLeft2.Thickness = 1 objects.BoxLeft2.From = innerTL; objects.BoxLeft2.To = innerBL; objects.BoxLeft2.Color = Color3.fromRGB(255,255,255); objects.BoxLeft2.Visible = true objects.BoxRight2.Thickness = 1 objects.BoxRight2.From = innerTR; objects.BoxRight2.To = innerBR; objects.BoxRight2.Color = Color3.fromRGB(255,255,255); objects.BoxRight2.Visible = true elseif Settings.BoxType == "圆角" then local cornerLen = math.min(corners.Width, corners.Height) * 0.25 local thickness = 2 objects.CornerTL1.Thickness = thickness objects.CornerTL1.From = tl objects.CornerTL1.To = tl + Vector2.new(cornerLen, 0) objects.CornerTL1.Color = boxColor objects.CornerTL1.Visible = true objects.CornerTL2.Thickness = thickness objects.CornerTL2.From = tl objects.CornerTL2.To = tl + Vector2.new(0, cornerLen) objects.CornerTL2.Color = boxColor objects.CornerTL2.Visible = true objects.CornerTR1.Thickness = thickness objects.CornerTR1.From = tr objects.CornerTR1.To = tr + Vector2.new(-cornerLen, 0) objects.CornerTR1.Color = boxColor objects.CornerTR1.Visible = true objects.CornerTR2.Thickness = thickness objects.CornerTR2.From = tr objects.CornerTR2.To = tr + Vector2.new(0, cornerLen) objects.CornerTR2.Color = boxColor objects.CornerTR2.Visible = true objects.CornerBL1.Thickness = thickness objects.CornerBL1.From = bl objects.CornerBL1.To = bl + Vector2.new(cornerLen, 0) objects.CornerBL1.Color = boxColor objects.CornerBL1.Visible = true objects.CornerBL2.Thickness = thickness objects.CornerBL2.From = bl objects.CornerBL2.To = bl + Vector2.new(0, -cornerLen) objects.CornerBL2.Color = boxColor objects.CornerBL2.Visible = true objects.CornerBR1.Thickness = thickness objects.CornerBR1.From = br objects.CornerBR1.To = br + Vector2.new(-cornerLen, 0) objects.CornerBR1.Color = boxColor objects.CornerBR1.Visible = true objects.CornerBR2.Thickness = thickness objects.CornerBR2.From = br objects.CornerBR2.To = br + Vector2.new(0, -cornerLen) objects.CornerBR2.Color = boxColor objects.CornerBR2.Visible = true else objects.BoxTop.Thickness = 2 objects.BoxTop.From = tl; objects.BoxTop.To = tr; objects.BoxTop.Color = boxColor; objects.BoxTop.Visible = true objects.BoxBottom.Thickness = 2 objects.BoxBottom.From = bl; objects.BoxBottom.To = br; objects.BoxBottom.Color = boxColor; objects.BoxBottom.Visible = true objects.BoxLeft.Thickness = 2 objects.BoxLeft.From = tl; objects.BoxLeft.To = bl; objects.BoxLeft.Color = boxColor; objects.BoxLeft.Visible = true objects.BoxRight.Thickness = 2 objects.BoxRight.From = tr; objects.BoxRight.To = br; objects.BoxRight.Color = boxColor; objects.BoxRight.Visible = true end else for _, name in pairs({"BoxTop", "BoxBottom", "BoxLeft", "BoxRight", "BoxTop2", "BoxBottom2", "BoxLeft2", "BoxRight2", "CornerTL1", "CornerTL2", "CornerTR1", "CornerTR2", "CornerBL1", "CornerBL2", "CornerBR1", "CornerBR2"}) do if objects[name] then objects[name].Visible = false end end if objects.BoxFill then objects.BoxFill.Visible = false end end -- 【修复】血量处理 - 确保默认显示圆圈+数字 if Settings.HealthESP then -- 先全部隐藏 if objects.HealthCircle then objects.HealthCircle.Visible = false end if objects.HealthArc1 then objects.HealthArc1.Visible = false end if objects.HealthArc2 then objects.HealthArc2.Visible = false end if objects.HealthArc3 then objects.HealthArc3.Visible = false end if objects.HealthArc4 then objects.HealthArc4.Visible = false end if objects.HealthText then objects.HealthText.Visible = false end if objects.HealthBar then objects.HealthBar.Visible = false end if objects.HealthBarBg then objects.HealthBarBg.Visible = false end if Settings.HealthType == "血条" then local barWidth = 4 local barHeight = corners.Height local barX = corners.TopLeft.X - 8 local barY = corners.TopLeft.Y objects.HealthBarBg.Position = Vector2.new(barX, barY) objects.HealthBarBg.Size = Vector2.new(barWidth, barHeight) objects.HealthBarBg.Visible = true local healthHeight = barHeight * healthPercent objects.HealthBar.Position = Vector2.new(barX, barY + (barHeight - healthHeight)) objects.HealthBar.Size = Vector2.new(barWidth, healthHeight) objects.HealthBar.Color = healthColor objects.HealthBar.Visible = true elseif Settings.HealthType == "数字" then objects.HealthText.Text = tostring(math.floor(healthPercent * 100)) .. "%" objects.HealthText.Position = Vector2.new(corners.Center.X, corners.TopLeft.Y - 25) objects.HealthText.Size = 12 objects.HealthText.Color = healthColor objects.HealthText.Visible = true else -- 【修复】默认:白色圆圈边框 + 血量颜色数字 local circlePos = Vector2.new(corners.Center.X, corners.TopLeft.Y - 22) local radius = 15 -- 使用4条弧线绘制圆圈(比Drawing.Circle更可靠) local function drawCircleArc(center, r, arcObj, startAngle, endAngle) if not arcObj then return end local startRad = math.rad(startAngle) local endRad = math.rad(endAngle) local x1 = center.X + r * math.cos(startRad) local y1 = center.Y + r * math.sin(startRad) local x2 = center.X + r * math.cos(endRad) local y2 = center.Y + r * math.sin(endRad) arcObj.From = Vector2.new(x1, y1) arcObj.To = Vector2.new(x2, y2) arcObj.Color = Color3.fromRGB(255, 255, 255) arcObj.Thickness = 3 arcObj.Visible = true end -- 绘制4段弧线组成完整圆圈 if objects.HealthArc1 then drawCircleArc(circlePos, radius, objects.HealthArc1, 0, 90) end if objects.HealthArc2 then drawCircleArc(circlePos, radius, objects.HealthArc2, 90, 180) end if objects.HealthArc3 then drawCircleArc(circlePos, radius, objects.HealthArc3, 180, 270) end if objects.HealthArc4 then drawCircleArc(circlePos, radius, objects.HealthArc4, 270, 360) end -- 同时尝试使用Circle(如果支持的话) if objects.HealthCircle then objects.HealthCircle.Position = circlePos objects.HealthCircle.Radius = radius objects.HealthCircle.Color = Color3.fromRGB(255, 255, 255) objects.HealthCircle.Thickness = 3 objects.HealthCircle.Filled = false objects.HealthCircle.NumSides = 64 objects.HealthCircle.Visible = true end -- 数字显示血量,使用血量颜色 if objects.HealthText then objects.HealthText.Text = tostring(math.floor(healthPercent * 100)) objects.HealthText.Position = circlePos objects.HealthText.Size = 12 objects.HealthText.Color = healthColor objects.HealthText.Center = true objects.HealthText.Visible = true end end else if objects.HealthCircle then objects.HealthCircle.Visible = false end if objects.HealthArc1 then objects.HealthArc1.Visible = false end if objects.HealthArc2 then objects.HealthArc2.Visible = false end if objects.HealthArc3 then objects.HealthArc3.Visible = false end if objects.HealthArc4 then objects.HealthArc4.Visible = false end if objects.HealthText then objects.HealthText.Visible = false end if objects.HealthBar then objects.HealthBar.Visible = false end if objects.HealthBarBg then objects.HealthBarBg.Visible = false end end -- 【修复】射线处理 - 添加位置选择 if Settings.LineESP then local lineColor = Settings.LineColor -- 【新增】使用自定义颜色 -- 【新增】根据设置选择射线起点 local lineStart if Settings.LinePosition == "最上方" then lineStart = Vector2.new(viewportSize.X / 2, 0) -- 屏幕顶部中央 else lineStart = Vector2.new(viewportSize.X / 2, viewportSize.Y) -- 屏幕底部中央 end local lineEnd = corners.Center -- 隐藏所有射线元素 if objects.Line then objects.Line.Visible = false end if objects.Line2 then objects.Line2.Visible = false end if objects.Line3 then objects.Line3.Visible = false end if objects.ArrowTri then objects.ArrowTri.Visible = false end for _, seg in pairs({"LineSeg1", "LineSeg2", "LineSeg3", "LineSeg4"}) do if objects[seg] then objects[seg].Visible = false end end if Settings.LineType == "三线" then local offset = 2 local dir = (lineEnd - lineStart) local perp = Vector2.new(-dir.Y, dir.X).Unit * offset objects.Line.Thickness = 3 objects.Line.From = lineStart objects.Line.To = lineEnd objects.Line.Color = lineColor objects.Line.Visible = true objects.Line2.Thickness = 1 objects.Line2.From = lineStart + perp objects.Line2.To = lineEnd + perp objects.Line2.Color = Color3.fromRGB(255, 255, 255) objects.Line2.Visible = true objects.Line3.Thickness = 1 objects.Line3.From = lineStart - perp objects.Line3.To = lineEnd - perp objects.Line3.Color = Color3.fromRGB(255, 255, 255) objects.Line3.Visible = true elseif Settings.LineType == "箭头" then -- 【重构】使用多条线段绘制实心箭头效果 local dir = (lineEnd - lineStart).Unit local perp = Vector2.new(-dir.Y, dir.X) local arrowLen = 20 local arrowWidth = 12 -- 箭头尖端(指向玩家) local tip = lineEnd + dir * 5 -- 箭头底部中心 local base = lineEnd - dir * arrowLen -- 左右底部点 local left = base + perp * arrowWidth local right = base - perp * arrowWidth -- 绘制箭头轮廓(使用4条线) objects.Line.Thickness = 3 objects.Line.From = tip objects.Line.To = left objects.Line.Color = lineColor objects.Line.Visible = true objects.Line2.Thickness = 3 objects.Line2.From = tip objects.Line2.To = right objects.Line2.Color = lineColor objects.Line2.Visible = true objects.Line3.Thickness = 3 objects.Line3.From = left objects.Line3.To = base objects.Line3.Color = lineColor objects.Line3.Visible = true if objects.ArrowTri then objects.ArrowTri.PointA = tip objects.ArrowTri.PointB = left objects.ArrowTri.PointC = right objects.ArrowTri.Color = lineColor objects.ArrowTri.Filled = true objects.ArrowTri.Transparency = 0.8 objects.ArrowTri.Visible = true end elseif Settings.LineType == "点线" then -- 点线:用4段短线模拟虚线 local segments = 4 local totalDir = lineEnd - lineStart local segLength = totalDir.Magnitude / (segments * 2 - 1) local dir = totalDir.Unit for i = 1, segments do local segName = "LineSeg" .. i if objects[segName] then local startPos = lineStart + dir * (segLength * (i-1) * 2) local endPos = startPos + dir * segLength objects[segName].Thickness = 2 objects[segName].From = startPos objects[segName].To = endPos objects[segName].Color = healthColor objects[segName].Visible = true end end else -- 默认:单线 objects.Line.Thickness = 2 objects.Line.From = lineStart objects.Line.To = lineEnd objects.Line.Color = lineColor objects.Line.Visible = true end else if objects.Line then objects.Line.Visible = false end if objects.Line2 then objects.Line2.Visible = false end if objects.Line3 then objects.Line3.Visible = false end if objects.ArrowTri then objects.ArrowTri.Visible = false end for _, seg in pairs({"LineSeg1", "LineSeg2", "LineSeg3", "LineSeg4"}) do if objects[seg] then objects[seg].Visible = false end end end -- 名字 if Settings.NameESP then objects.Name.Text = targetPlayer.Name objects.Name.Position = Vector2.new(corners.Center.X, corners.TopLeft.Y - 35) objects.Name.Color = Settings.NameColor -- 【新增】使用自定义颜色 objects.Name.Visible = true else objects.Name.Visible = false end -- 距离 if Settings.DistanceESP then objects.Distance.Text = math.floor(distance) .. "m" objects.Distance.Position = Vector2.new(corners.Center.X, corners.BottomLeft.Y + 5) objects.Distance.Color = Settings.DistanceColor -- 【新增】使用自定义颜色 objects.Distance.Visible = true else objects.Distance.Visible = false end -- 武器 if Settings.WeaponESP then local weapon = GetPlayerWeapon(character) if weapon ~= "" then objects.WeaponText.Text = weapon objects.WeaponText.Position = Vector2.new(corners.Center.X, corners.BottomLeft.Y + 30) objects.WeaponText.Color = Settings.WeaponColor -- 【新增】使用自定义颜色 objects.WeaponText.Visible = true else objects.WeaponText.Visible = false end else objects.WeaponText.Visible = false end -- 骨骼处理 if Settings.SkeletonESP then local skeletonColor = Settings.SkeletonColor -- 【新增】使用自定义颜色 for i, connection in ipairs(SkeletonConnections) do local boneLine = objects.Skeleton[i] if not boneLine then continue end local part1 = character:FindFirstChild(connection[1]) local part2 = character:FindFirstChild(connection[2]) if part1 and part2 then local pos1, on1 = WorldToScreen(part1.Position) local pos2, on2 = WorldToScreen(part2.Position) if on1 and on2 then boneLine.Visible = true boneLine.From = pos1 boneLine.To = pos2 boneLine.Thickness = 2 boneLine.Transparency = 1 if Settings.SkeletonType == "彩色" then -- 彩色模式:不同部位不同颜色 if connection[1] == "Head" then boneLine.Color = Color3.fromRGB(255, 255, 0) elseif string.find(connection[1], "Arm") then boneLine.Color = Color3.fromRGB(0, 150, 255) elseif string.find(connection[1], "Leg") then boneLine.Color = Color3.fromRGB(0, 255, 150) else boneLine.Color = Color3.fromRGB(255, 100, 100) end else -- 默认模式:使用自定义颜色 boneLine.Color = skeletonColor end else boneLine.Visible = false end else boneLine.Visible = false end end -- 隐藏多余的骨骼线 for i = #SkeletonConnections + 1, #objects.Skeleton do if objects.Skeleton[i] then objects.Skeleton[i].Visible = false end end else for _, boneLine in pairs(objects.Skeleton) do if boneLine then boneLine.Visible = false end end end end) end end Players.PlayerRemoving:Connect(function(targetPlayer) RemoveESP(targetPlayer) end) -- ========================================== -- UI代码 -- ========================================== local FontBold = Enum.Font.SourceSansBold local FontMedium = Enum.Font.SourceSansSemibold local Colors = { Background = Color3.fromRGB(245, 245, 250), Card = Color3.fromRGB(255, 255, 255), Primary = Color3.fromRGB(0, 122, 255), TextPrimary = Color3.fromRGB(30, 30, 30), TextSecondary = Color3.fromRGB(130, 130, 130), Border = Color3.fromRGB(225, 225, 230), ToggleOn = Color3.fromRGB(0, 122, 255), ToggleOff = Color3.fromRGB(200, 200, 200), } local screenGui = Instance.new("ScreenGui") screenGui.Name = "AimoxUI" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = playerGui -- 灵动岛悬浮球 local dynamicIsland = Instance.new("Frame") dynamicIsland.Name = "DynamicIsland" dynamicIsland.Size = UDim2.new(0, 120, 0, 36) dynamicIsland.Position = UDim2.new(0.5, -60, 0, -50) dynamicIsland.BackgroundColor3 = Colors.Card dynamicIsland.BorderSizePixel = 0 dynamicIsland.ZIndex = 100 dynamicIsland.Parent = screenGui local islandCorner = Instance.new("UICorner") islandCorner.CornerRadius = UDim.new(1, 0) islandCorner.Parent = dynamicIsland local islandStroke = Instance.new("UIStroke") islandStroke.Color = Colors.Primary islandStroke.Thickness = 2 islandStroke.Parent = dynamicIsland local islandIcon = Instance.new("Frame") islandIcon.Size = UDim2.new(0, 20, 0, 20) islandIcon.Position = UDim2.new(0, 10, 0.5, -10) islandIcon.BackgroundColor3 = Colors.Primary islandIcon.ZIndex = 101 islandIcon.Parent = dynamicIsland local iconCorner = Instance.new("UICorner") iconCorner.CornerRadius = UDim.new(1, 0) iconCorner.Parent = islandIcon local statusDot = Instance.new("Frame") statusDot.Size = UDim2.new(0, 6, 0, 6) statusDot.Position = UDim2.new(0.5, -3, 0.5, -3) statusDot.BackgroundColor3 = Color3.fromRGB(255, 255, 255) statusDot.ZIndex = 102 statusDot.Parent = islandIcon local statusDotCorner = Instance.new("UICorner") statusDotCorner.CornerRadius = UDim.new(1, 0) statusDotCorner.Parent = statusDot local islandText = Instance.new("TextLabel") islandText.Size = UDim2.new(0, 70, 0, 20) islandText.Position = UDim2.new(0, 36, 0.5, -10) islandText.BackgroundTransparency = 1 islandText.Text = "Aimox" islandText.TextColor3 = Colors.TextPrimary islandText.TextSize = 13 islandText.Font = FontBold islandText.TextXAlignment = Enum.TextXAlignment.Left islandText.ZIndex = 101 islandText.Parent = dynamicIsland -- 主窗口 local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 480, 0, 320) mainFrame.Position = UDim2.new(0.5, -240, 1, 100) mainFrame.BackgroundColor3 = Colors.Background mainFrame.BorderSizePixel = 0 mainFrame.Visible = false mainFrame.ZIndex = 50 mainFrame.Parent = screenGui local mainFrameScale = Instance.new("UIScale") mainFrameScale.Scale = 0.8 mainFrameScale.Parent = mainFrame local mainCorner = Instance.new("UICorner") mainCorner.CornerRadius = UDim.new(0, 12) mainCorner.Parent = mainFrame local isOpen = false local isAnimating = false local function ShowMainFrame() if isAnimating then return end isAnimating = true mainFrame.Visible = true TweenService:Create(mainFrame, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, -240, 0.5, -160) }):Play() TweenService:Create(mainFrameScale, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() task.delay(0.4, function() isAnimating = false isOpen = true end) end local function HideMainFrame() if isAnimating then return end isAnimating = true TweenService:Create(mainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, -240, 1, 100) }):Play() TweenService:Create(mainFrameScale, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Scale = 0.8 }):Play() task.delay(0.3, function() mainFrame.Visible = false isAnimating = false isOpen = false end) end dynamicIsland.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if isOpen then HideMainFrame() else ShowMainFrame() end end end) -- 左侧边栏 local sidebar = Instance.new("Frame") sidebar.Name = "Sidebar" sidebar.Size = UDim2.new(0, 120, 1, -12) sidebar.Position = UDim2.new(0, 6, 0, 6) sidebar.BackgroundColor3 = Colors.Card sidebar.ZIndex = 51 sidebar.Parent = mainFrame local sidebarCorner = Instance.new("UICorner") sidebarCorner.CornerRadius = UDim.new(0, 10) sidebarCorner.Parent = sidebar local logoIcon = Instance.new("Frame") logoIcon.Size = UDim2.new(0, 32, 0, 32) logoIcon.Position = UDim2.new(0, 12, 0, 12) logoIcon.BackgroundColor3 = Colors.Primary logoIcon.ZIndex = 52 logoIcon.Parent = sidebar local logoIconCorner = Instance.new("UICorner") logoIconCorner.CornerRadius = UDim.new(0, 8) logoIconCorner.Parent = logoIcon local logoText = Instance.new("TextLabel") logoText.Size = UDim2.new(0, 60, 0, 20) logoText.Position = UDim2.new(0, 48, 0, 12) logoText.BackgroundTransparency = 1 logoText.Text = "Aimox" logoText.TextColor3 = Colors.TextPrimary logoText.TextSize = 16 logoText.Font = FontBold logoText.TextXAlignment = Enum.TextXAlignment.Left logoText.ZIndex = 52 logoText.Parent = sidebar local versionLabel = Instance.new("TextLabel") versionLabel.Size = UDim2.new(0, 28, 0, 14) versionLabel.Position = UDim2.new(0, 48, 0, 32) versionLabel.BackgroundColor3 = Colors.Primary versionLabel.Text = "V1.0" versionLabel.TextColor3 = Color3.fromRGB(255, 255, 255) versionLabel.TextSize = 9 versionLabel.Font = FontBold versionLabel.ZIndex = 52 versionLabel.Parent = sidebar local versionCorner = Instance.new("UICorner") versionCorner.CornerRadius = UDim.new(0, 3) versionCorner.Parent = versionLabel -- 当前选中界面 local CurrentTab = "draw" local MenuButtons = {} local TabContents = {} -- 菜单项 local menuItems = { {name = "公告界面", id = "announcement"}, {name = "绘制界面", id = "draw", active = true}, {name = "其他绘制", id = "other_draw"}, {name = "自动瞄准", id = "aim"}, {name = "静默追踪", id = "silent"}, {name = "其他功能", id = "other"}, {name = "美化界面", id = "beautify"}, } -- 切换界面函数 local function SwitchTab(tabId) CurrentTab = tabId -- 更新按钮样式 for id, btnData in pairs(MenuButtons) do if id == tabId then btnData.btn.BackgroundColor3 = Colors.Primary btnData.txt.TextColor3 = Color3.fromRGB(255, 255, 255) else btnData.btn.BackgroundColor3 = Color3.fromRGB(255, 255, 255) btnData.txt.TextColor3 = Colors.TextPrimary end end -- 切换内容显示 for id, contentFrame in pairs(TabContents) do if contentFrame then contentFrame.Visible = (id == tabId) end end -- 更新标题 for _, item in ipairs(menuItems) do if item.id == tabId then centerTitle.Text = item.name rightTitle.Text = (item.name == "绘制界面") and "样式设置" or "功能设置" break end end end for i, item in ipairs(menuItems) do local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -12, 0, 28) btn.Position = UDim2.new(0, 6, 0, 55 + (i-1) * 30) btn.BackgroundColor3 = item.active and Colors.Primary or Color3.fromRGB(255, 255, 255) btn.Text = "" btn.AutoButtonColor = false btn.ZIndex = 52 btn.Parent = sidebar local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 6) btnCorner.Parent = btn local txt = Instance.new("TextLabel") txt.Size = UDim2.new(1, -12, 1, 0) txt.Position = UDim2.new(0, 10, 0, 0) txt.BackgroundTransparency = 1 txt.Text = item.name txt.TextColor3 = item.active and Color3.fromRGB(255, 255, 255) or Colors.TextPrimary txt.TextSize = 12 txt.Font = FontMedium txt.TextXAlignment = Enum.TextXAlignment.Left txt.ZIndex = 53 txt.Parent = btn -- 保存按钮引用 MenuButtons[item.id] = {btn = btn, txt = txt} -- 点击切换 btn.MouseButton1Click:Connect(function() if CurrentTab ~= item.id then SwitchTab(item.id) end end) end -- 用户卡片 local userCard = Instance.new("Frame") userCard.Name = "UserCard" userCard.Size = UDim2.new(1, -12, 0, 44) userCard.Position = UDim2.new(0, 6, 1, -50) userCard.BackgroundColor3 = Color3.fromRGB(248, 248, 250) userCard.ZIndex = 52 userCard.Parent = sidebar local userCardCorner = Instance.new("UICorner") userCardCorner.CornerRadius = UDim.new(0, 8) userCardCorner.Parent = userCard local avatar = Instance.new("ImageLabel") avatar.Size = UDim2.new(0, 28, 0, 28) avatar.Position = UDim2.new(0, 8, 0.5, -14) avatar.BackgroundColor3 = Colors.Primary avatar.Image = "rbxthumb://type=AvatarHeadShot&id=" .. player.UserId .. "&w=150&h=150" avatar.ZIndex = 53 avatar.Parent = userCard local avatarCorner = Instance.new("UICorner") avatarCorner.CornerRadius = UDim.new(1, 0) avatarCorner.Parent = avatar local userName = Instance.new("TextLabel") userName.Size = UDim2.new(1, -44, 0, 14) userName.Position = UDim2.new(0, 40, 0, 6) userName.BackgroundTransparency = 1 userName.Text = "记得按时吃饭" userName.TextColor3 = Colors.TextPrimary userName.TextSize = 10 userName.Font = FontBold userName.TextXAlignment = Enum.TextXAlignment.Left userName.ZIndex = 53 userName.Parent = userCard -- 内容容器 local ContentContainer = Instance.new("Frame") ContentContainer.Name = "ContentContainer" ContentContainer.Size = UDim2.new(1, -138, 1, -12) ContentContainer.Position = UDim2.new(0, 132, 0, 6) ContentContainer.BackgroundTransparency = 1 ContentContainer.ZIndex = 50 ContentContainer.Parent = mainFrame -- 绘制界面容器 local DrawFrame = Instance.new("Frame") DrawFrame.Name = "DrawFrame" DrawFrame.Size = UDim2.new(1, 0, 1, 0) DrawFrame.BackgroundTransparency = 1 DrawFrame.ZIndex = 51 DrawFrame.Parent = ContentContainer -- 中间面板 local centerPanel = Instance.new("Frame") centerPanel.Name = "CenterPanel" centerPanel.Size = UDim2.new(0, 160, 1, 0) centerPanel.Position = UDim2.new(0, 0, 0, 0) centerPanel.BackgroundColor3 = Colors.Card centerPanel.ZIndex = 51 centerPanel.Parent = DrawFrame local centerCorner = Instance.new("UICorner") centerCorner.CornerRadius = UDim.new(0, 10) centerCorner.Parent = centerPanel local centerTitle = Instance.new("TextLabel") centerTitle.Size = UDim2.new(1, -12, 0, 28) centerTitle.Position = UDim2.new(0, 10, 0, 8) centerTitle.BackgroundTransparency = 1 centerTitle.Text = "绘制界面" centerTitle.TextColor3 = Colors.TextPrimary centerTitle.TextSize = 14 centerTitle.Font = FontBold centerTitle.TextXAlignment = Enum.TextXAlignment.Left centerTitle.ZIndex = 52 centerTitle.Parent = centerPanel local centerScroll = Instance.new("ScrollingFrame") centerScroll.Name = "CenterScroll" centerScroll.Size = UDim2.new(1, -10, 1, -40) centerScroll.Position = UDim2.new(0, 6, 0, 36) centerScroll.BackgroundTransparency = 1 centerScroll.BorderSizePixel = 0 centerScroll.ScrollBarThickness = 3 centerScroll.CanvasSize = UDim2.new(0, 0, 0, 520) centerScroll.ZIndex = 52 centerScroll.Parent = centerPanel -- 【修改】开关列表 - 删除绘制背敌 local toggles = { {text = "绘制方框", key = "BoxESP"}, {text = "绘制射线", key = "LineESP"}, {text = "绘制距离", key = "DistanceESP"}, {text = "绘制骨骼", key = "SkeletonESP"}, {text = "绘制血量", key = "HealthESP"}, {text = "绘制名字", key = "NameESP"}, {text = "绘制武器", key = "WeaponESP"}, } for i, toggleData in ipairs(toggles) do local row = Instance.new("Frame") row.Name = "ToggleRow_" .. i row.Size = UDim2.new(1, 0, 0, 34) row.Position = UDim2.new(0, 0, 0, (i-1) * 36) row.BackgroundTransparency = 1 row.ZIndex = 53 row.Parent = centerScroll local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -50, 1, 0) label.Position = UDim2.new(0, 10, 0, 0) label.BackgroundTransparency = 1 label.Text = toggleData.text label.TextColor3 = Colors.TextPrimary label.TextSize = 12 label.Font = FontMedium label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 54 label.Parent = row local toggleBg = Instance.new("TextButton") toggleBg.Size = UDim2.new(0, 38, 0, 20) toggleBg.Position = UDim2.new(1, -44, 0.5, -10) toggleBg.BackgroundColor3 = Settings[toggleData.key] and Colors.ToggleOn or Colors.ToggleOff toggleBg.Text = "" toggleBg.AutoButtonColor = false toggleBg.ZIndex = 54 toggleBg.Parent = row local toggleCorner = Instance.new("UICorner") toggleCorner.CornerRadius = UDim.new(1, 0) toggleCorner.Parent = toggleBg local dot = Instance.new("Frame") dot.Size = UDim2.new(0, 16, 0, 16) dot.Position = Settings[toggleData.key] and UDim2.new(1, -18, 0, 2) or UDim2.new(0, 2, 0, 2) dot.BackgroundColor3 = Color3.fromRGB(255, 255, 255) dot.ZIndex = 55 dot.Parent = toggleBg local dotCorner = Instance.new("UICorner") dotCorner.CornerRadius = UDim.new(1, 0) dotCorner.Parent = dot toggleBg.MouseButton1Click:Connect(function() local newState = not Settings[toggleData.key] Settings[toggleData.key] = newState if newState then toggleBg.BackgroundColor3 = Colors.ToggleOn dot.Position = UDim2.new(1, -18, 0, 2) else toggleBg.BackgroundColor3 = Colors.ToggleOff dot.Position = UDim2.new(0, 2, 0, 2) end if toggleData.key == "PlayerCountESP" and PlayerCountFrame then PlayerCountFrame.Visible = newState if newState then UpdatePlayerCount() end end end) end -- 右侧面板 local rightPanel = Instance.new("Frame") rightPanel.Name = "RightPanel" rightPanel.Size = UDim2.new(0, 180, 1, 0) rightPanel.Position = UDim2.new(0, 168, 0, 0) rightPanel.BackgroundColor3 = Colors.Card rightPanel.ZIndex = 51 rightPanel.Parent = DrawFrame local rightCorner = Instance.new("UICorner") rightCorner.CornerRadius = UDim.new(0, 10) rightCorner.Parent = rightPanel local header = Instance.new("Frame") header.Name = "Header" header.Size = UDim2.new(1, -16, 0, 32) header.Position = UDim2.new(0, 10, 0, 6) header.BackgroundTransparency = 1 header.ZIndex = 52 header.Parent = rightPanel local backBtn = Instance.new("TextButton") backBtn.Size = UDim2.new(0, 24, 0, 24) backBtn.Position = UDim2.new(0, 0, 0, 4) backBtn.BackgroundTransparency = 1 backBtn.Text = "<" backBtn.TextColor3 = Colors.TextSecondary backBtn.TextSize = 16 backBtn.Font = FontBold backBtn.ZIndex = 53 backBtn.Parent = header backBtn.MouseButton1Click:Connect(function() HideMainFrame() end) local rightTitle = Instance.new("TextLabel") rightTitle.Size = UDim2.new(1, -28, 1, 0) rightTitle.Position = UDim2.new(0, 22, 0, 0) rightTitle.BackgroundTransparency = 1 rightTitle.Text = "样式设置" rightTitle.TextColor3 = Colors.TextPrimary rightTitle.TextSize = 13 rightTitle.Font = FontBold rightTitle.TextXAlignment = Enum.TextXAlignment.Left rightTitle.ZIndex = 53 rightTitle.Parent = header local divider = Instance.new("Frame") divider.Size = UDim2.new(1, -12, 0, 1) divider.Position = UDim2.new(0, 8, 0, 38) divider.BackgroundColor3 = Colors.Border divider.BorderSizePixel = 0 divider.ZIndex = 52 divider.Parent = rightPanel local rightScroll = Instance.new("ScrollingFrame") rightScroll.Name = "RightScroll" rightScroll.Size = UDim2.new(1, -16, 1, -50) rightScroll.Position = UDim2.new(0, 10, 0, 44) rightScroll.BackgroundTransparency = 1 rightScroll.BorderSizePixel = 0 rightScroll.ScrollBarThickness = 3 rightScroll.CanvasSize = UDim2.new(0, 0, 0, 950) rightScroll.ZIndex = 52 rightScroll.Parent = rightPanel -- 类型选择器 local function CreateTypeSelector(titleText, settingKey, options, index) local container = Instance.new("Frame") container.Name = "TypeSelector_" .. settingKey container.Size = UDim2.new(1, 0, 0, 70) container.Position = UDim2.new(0, 0, 0, index * 76) container.BackgroundTransparency = 1 container.ZIndex = 60 container.Parent = rightScroll local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 16) title.BackgroundTransparency = 1 title.Text = titleText title.TextColor3 = Colors.TextPrimary title.TextSize = 12 title.Font = FontMedium title.TextXAlignment = Enum.TextXAlignment.Left title.ZIndex = 61 title.Parent = container local dropdownBtn = Instance.new("TextButton") dropdownBtn.Size = UDim2.new(1, 0, 0, 28) dropdownBtn.Position = UDim2.new(0, 0, 0, 22) dropdownBtn.BackgroundColor3 = Color3.fromRGB(235, 235, 240) dropdownBtn.Text = " " .. Settings[settingKey] .. " ▼" dropdownBtn.TextColor3 = Colors.TextPrimary dropdownBtn.TextSize = 11 dropdownBtn.Font = FontMedium dropdownBtn.TextXAlignment = Enum.TextXAlignment.Left dropdownBtn.ZIndex = 61 dropdownBtn.Parent = container local dropdownCorner = Instance.new("UICorner") dropdownCorner.CornerRadius = UDim.new(0, 6) dropdownCorner.Parent = dropdownBtn local dropdownGui = Instance.new("ScreenGui") dropdownGui.Name = "Dropdown_" .. settingKey dropdownGui.ResetOnSpawn = false dropdownGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling dropdownGui.DisplayOrder = 9999 -- 确保在最顶层 dropdownGui.Enabled = false dropdownGui.Parent = playerGui local optionsFrame = Instance.new("Frame") optionsFrame.Size = UDim2.new(0, 160, 0, #options * 26) optionsFrame.BackgroundColor3 = Colors.Card optionsFrame.BorderSizePixel = 0 optionsFrame.ZIndex = 100 optionsFrame.Parent = dropdownGui local optionsCorner = Instance.new("UICorner") optionsCorner.CornerRadius = UDim.new(0, 6) optionsCorner.Parent = optionsFrame local optionsStroke = Instance.new("UIStroke") optionsStroke.Color = Colors.Border optionsStroke.Thickness = 1 optionsStroke.Parent = optionsFrame for i, option in ipairs(options) do local optionBtn = Instance.new("TextButton") optionBtn.Size = UDim2.new(1, 0, 0, 26) optionBtn.Position = UDim2.new(0, 0, 0, (i-1) * 26) optionBtn.BackgroundColor3 = (option == Settings[settingKey]) and Colors.Primary or Colors.Card optionBtn.Text = " " .. option optionBtn.TextColor3 = (option == Settings[settingKey]) and Color3.fromRGB(255,255,255) or Colors.TextPrimary optionBtn.TextSize = 11 optionBtn.Font = FontMedium optionBtn.TextXAlignment = Enum.TextXAlignment.Left optionBtn.ZIndex = 101 optionBtn.Parent = optionsFrame optionBtn.MouseButton1Click:Connect(function() Settings[settingKey] = option dropdownBtn.Text = " " .. option .. " ▼" dropdownGui.Enabled = false for _, child in pairs(optionsFrame:GetChildren()) do if child:IsA("TextButton") then local optText = string.sub(child.Text, 3) if optText == option then child.BackgroundColor3 = Colors.Primary child.TextColor3 = Color3.fromRGB(255,255,255) else child.BackgroundColor3 = Colors.Card child.TextColor3 = Colors.TextPrimary end end end end) end dropdownBtn.MouseButton1Click:Connect(function() local isOpen = dropdownGui.Enabled for _, gui in pairs(playerGui:GetChildren()) do if gui:IsA("ScreenGui") and string.find(gui.Name, "Dropdown_") then gui.Enabled = false end end if not isOpen then local absPos = dropdownBtn.AbsolutePosition local absSize = dropdownBtn.AbsoluteSize optionsFrame.Position = UDim2.new(0, absPos.X, 0, absPos.Y + absSize.Y + 2) dropdownGui.Enabled = true dropdownBtn.Text = " " .. Settings[settingKey] .. " ▲" else dropdownBtn.Text = " " .. Settings[settingKey] .. " ▼" end end) -- 点击外部关闭下拉菜单 task.spawn(function() while dropdownGui and dropdownGui.Parent do task.wait(0.1) if dropdownGui.Enabled then local input = UserInputService.InputBegan:Wait() if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then task.wait(0.05) -- 等待一帧确保位置更新 local mousePos = UserInputService:GetMouseLocation() local btnPos = dropdownBtn.AbsolutePosition local btnSize = dropdownBtn.AbsoluteSize local framePos = optionsFrame.AbsolutePosition local frameSize = optionsFrame.AbsoluteSize local inBtn = mousePos.X >= btnPos.X and mousePos.X <= btnPos.X + btnSize.X and mousePos.Y >= btnPos.Y and mousePos.Y <= btnPos.Y + btnSize.Y local inFrame = mousePos.X >= framePos.X and mousePos.X <= framePos.X + frameSize.X and mousePos.Y >= framePos.Y and mousePos.Y <= framePos.Y + frameSize.Y if not inBtn and not inFrame then dropdownGui.Enabled = false dropdownBtn.Text = " " .. Settings[settingKey] .. " ▼" end end end end end) end CreateTypeSelector("方框类型", "BoxType", {"默认", "填充", "圆角", "双线"}, 0) CreateTypeSelector("射线类型", "LineType", {"默认", "三线", "箭头", "点线"}, 1) CreateTypeSelector("骨骼类型", "SkeletonType", {"默认", "彩色"}, 2) CreateTypeSelector("血量类型", "HealthType", {"默认", "血条", "数字"}, 3) CreateTypeSelector("射线位置", "LinePosition", {"最下方", "最上方"}, 4) -- 【新增】绘制颜色自定义 - 修复布局 local function CreateColorPicker(titleText, settingKey, defaultColor, index) local container = Instance.new("Frame") container.Name = "ColorPicker_" .. settingKey container.Size = UDim2.new(1, 0, 0, 70) container.Position = UDim2.new(0, 0, 0, index * 76) container.BackgroundTransparency = 1 container.ZIndex = 60 container.Parent = rightScroll -- 标题行:包含文字和颜色预览 local titleRow = Instance.new("Frame") titleRow.Name = "TitleRow" titleRow.Size = UDim2.new(1, 0, 0, 20) titleRow.BackgroundTransparency = 1 titleRow.ZIndex = 61 titleRow.Parent = container local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -40, 1, 0) title.BackgroundTransparency = 1 title.Text = titleText title.TextColor3 = Colors.TextPrimary title.TextSize = 12 title.Font = FontMedium title.TextXAlignment = Enum.TextXAlignment.Left title.ZIndex = 62 title.Parent = titleRow -- 颜色预览移到标题旁边 local preview = Instance.new("Frame") preview.Size = UDim2.new(0, 28, 0, 18) preview.Position = UDim2.new(1, -32, 0, 1) preview.BackgroundColor3 = Settings[settingKey] preview.BorderSizePixel = 0 preview.ZIndex = 62 preview.Parent = titleRow local previewCorner = Instance.new("UICorner") previewCorner.CornerRadius = UDim.new(0, 4) previewCorner.Parent = preview -- RGB输入框区域 local colorFrame = Instance.new("Frame") colorFrame.Size = UDim2.new(1, 0, 0, 36) colorFrame.Position = UDim2.new(0, 0, 0, 26) colorFrame.BackgroundColor3 = Color3.fromRGB(235, 235, 240) colorFrame.ZIndex = 61 colorFrame.Parent = container local colorCorner = Instance.new("UICorner") colorCorner.CornerRadius = UDim.new(0, 6) colorCorner.Parent = colorFrame -- RGB输入框 - 3个等宽输入框 local boxWidth = 42 local boxSpacing = 8 local startX = 8 local rBox = Instance.new("TextBox") rBox.Size = UDim2.new(0, boxWidth, 0, 26) rBox.Position = UDim2.new(0, startX, 0.5, -13) rBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) rBox.Text = tostring(math.floor(Settings[settingKey].R * 255)) rBox.TextColor3 = Color3.fromRGB(200, 0, 0) rBox.TextSize = 12 rBox.Font = FontMedium rBox.ClearTextOnFocus = false rBox.ZIndex = 63 rBox.Parent = colorFrame local rCorner = Instance.new("UICorner") rCorner.CornerRadius = UDim.new(0, 4) rCorner.Parent = rBox local gBox = Instance.new("TextBox") gBox.Size = UDim2.new(0, boxWidth, 0, 26) gBox.Position = UDim2.new(0, startX + boxWidth + boxSpacing, 0.5, -13) gBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) gBox.Text = tostring(math.floor(Settings[settingKey].G * 255)) gBox.TextColor3 = Color3.fromRGB(0, 150, 0) gBox.TextSize = 12 gBox.Font = FontMedium gBox.ClearTextOnFocus = false gBox.ZIndex = 63 gBox.Parent = colorFrame local gCorner = Instance.new("UICorner") gCorner.CornerRadius = UDim.new(0, 4) gCorner.Parent = gBox local bBox = Instance.new("TextBox") bBox.Size = UDim2.new(0, boxWidth, 0, 26) bBox.Position = UDim2.new(0, startX + (boxWidth + boxSpacing) * 2, 0.5, -13) bBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) bBox.Text = tostring(math.floor(Settings[settingKey].B * 255)) bBox.TextColor3 = Color3.fromRGB(0, 0, 200) bBox.TextSize = 12 bBox.Font = FontMedium bBox.ClearTextOnFocus = false bBox.ZIndex = 63 bBox.Parent = colorFrame local bCorner = Instance.new("UICorner") bCorner.CornerRadius = UDim.new(0, 4) bCorner.Parent = bBox local function updateColor() local r = math.clamp(tonumber(rBox.Text) or 0, 0, 255) local g = math.clamp(tonumber(gBox.Text) or 0, 0, 255) local b = math.clamp(tonumber(bBox.Text) or 0, 0, 255) Settings[settingKey] = Color3.fromRGB(r, g, b) preview.BackgroundColor3 = Settings[settingKey] end rBox.FocusLost:Connect(updateColor) gBox.FocusLost:Connect(updateColor) bBox.FocusLost:Connect(updateColor) end CreateColorPicker("方框颜色", "BoxColor", Settings.BoxColor, 5) CreateColorPicker("射线颜色", "LineColor", Settings.LineColor, 6) CreateColorPicker("骨骼颜色", "SkeletonColor", Settings.SkeletonColor, 7) CreateColorPicker("名字颜色", "NameColor", Settings.NameColor, 8) CreateColorPicker("距离颜色", "DistanceColor", Settings.DistanceColor, 9) CreateColorPicker("武器颜色", "WeaponColor", Settings.WeaponColor, 10) -- 绘制循环 RunService.Heartbeat:Connect(function() local needESP = Settings.BoxESP or Settings.LineESP or Settings.SkeletonESP or Settings.NameESP or Settings.DistanceESP or Settings.HealthESP or Settings.WarnESP or Settings.WeaponESP if needESP and DrawingEnabled then UpdateESP() elseif not needESP then for targetPlayer, _ in pairs(ESPObjects) do RemoveESP(targetPlayer) end end pcall(UpdateAimRangeCircle) end) -- ========================================== -- 公告界面 -- ========================================== local AnnouncementFrame = Instance.new("Frame") AnnouncementFrame.Name = "AnnouncementFrame" AnnouncementFrame.Size = UDim2.new(1, 0, 1, 0) AnnouncementFrame.BackgroundTransparency = 1 AnnouncementFrame.Visible = false AnnouncementFrame.ZIndex = 51 AnnouncementFrame.Parent = ContentContainer -- 公告卡片 local AnnounceCard = Instance.new("Frame") AnnounceCard.Size = UDim2.new(1, -20, 0, 200) AnnounceCard.Position = UDim2.new(0, 10, 0, 10) AnnounceCard.BackgroundColor3 = Colors.Card AnnounceCard.ZIndex = 52 AnnounceCard.Parent = AnnouncementFrame local AnnounceCardCorner = Instance.new("UICorner") AnnounceCardCorner.CornerRadius = UDim.new(0, 10) AnnounceCardCorner.Parent = AnnounceCard local AnnounceCardStroke = Instance.new("UIStroke") AnnounceCardStroke.Color = Colors.Border AnnounceCardStroke.Thickness = 1 AnnounceCardStroke.Parent = AnnounceCard -- 版本标签 local VersionTag = Instance.new("TextLabel") VersionTag.Size = UDim2.new(0, 60, 0, 22) VersionTag.Position = UDim2.new(0, 15, 0, 15) VersionTag.BackgroundColor3 = Colors.Primary VersionTag.Text = "V2.0" VersionTag.TextColor3 = Color3.fromRGB(255, 255, 255) VersionTag.TextSize = 12 VersionTag.Font = FontBold VersionTag.ZIndex = 53 VersionTag.Parent = AnnounceCard local VersionTagCorner = Instance.new("UICorner") VersionTagCorner.CornerRadius = UDim.new(0, 4) VersionTagCorner.Parent = VersionTag -- 标题 local AnnounceTitle = Instance.new("TextLabel") AnnounceTitle.Size = UDim2.new(1, -30, 0, 24) AnnounceTitle.Position = UDim2.new(0, 15, 0, 45) AnnounceTitle.BackgroundTransparency = 1 AnnounceTitle.Text = "系统更新" AnnounceTitle.TextColor3 = Colors.TextPrimary AnnounceTitle.TextSize = 18 AnnounceTitle.Font = FontBold AnnounceTitle.TextXAlignment = Enum.TextXAlignment.Left AnnounceTitle.ZIndex = 53 AnnounceTitle.Parent = AnnounceCard -- 分隔线 local AnnounceDivider = Instance.new("Frame") AnnounceDivider.Size = UDim2.new(1, -30, 0, 1) AnnounceDivider.Position = UDim2.new(0, 15, 0, 75) AnnounceDivider.BackgroundColor3 = Colors.Border AnnounceDivider.BorderSizePixel = 0 AnnounceDivider.ZIndex = 53 AnnounceDivider.Parent = AnnounceCard -- 更新内容 local UpdateContent = Instance.new("TextLabel") UpdateContent.Size = UDim2.new(1, -30, 0, 100) UpdateContent.Position = UDim2.new(0, 15, 0, 85) UpdateContent.BackgroundTransparency = 1 UpdateContent.Text = "• 重构绘制核心,优化性能表现\n• 新增骨骼类型与血量样式\n• 支持自定义配色方案\n• 修复箭头与圆圈显示异常" UpdateContent.TextColor3 = Colors.TextSecondary UpdateContent.TextSize = 13 UpdateContent.Font = FontMedium UpdateContent.TextXAlignment = Enum.TextXAlignment.Left UpdateContent.TextYAlignment = Enum.TextYAlignment.Top UpdateContent.ZIndex = 53 UpdateContent.Parent = AnnounceCard -- 日期 local UpdateDate = Instance.new("TextLabel") UpdateDate.Size = UDim2.new(0, 100, 0, 16) UpdateDate.Position = UDim2.new(1, -115, 1, -26) UpdateDate.BackgroundTransparency = 1 UpdateDate.Text = "2025.03.26" UpdateDate.TextColor3 = Colors.TextSecondary UpdateDate.TextSize = 11 UpdateDate.Font = FontMedium UpdateDate.ZIndex = 53 UpdateDate.Parent = AnnounceCard -- 状态卡片 local StatusCard = Instance.new("Frame") StatusCard.Size = UDim2.new(1, -20, 0, 80) StatusCard.Position = UDim2.new(0, 10, 0, 220) StatusCard.BackgroundColor3 = Colors.Card StatusCard.ZIndex = 52 StatusCard.Parent = AnnouncementFrame local StatusCardCorner = Instance.new("UICorner") StatusCardCorner.CornerRadius = UDim.new(0, 10) StatusCardCorner.Parent = StatusCard local StatusCardStroke = Instance.new("UIStroke") StatusCardStroke.Color = Colors.Border StatusCardStroke.Thickness = 1 StatusCardStroke.Parent = StatusCard -- 状态指示器 local StatusIndicator = Instance.new("Frame") StatusIndicator.Size = UDim2.new(0, 8, 0, 8) StatusIndicator.Position = UDim2.new(0, 15, 0, 18) StatusIndicator.BackgroundColor3 = Color3.fromRGB(50, 200, 100) StatusIndicator.ZIndex = 53 StatusIndicator.Parent = StatusCard local StatusIndicatorCorner = Instance.new("UICorner") StatusIndicatorCorner.CornerRadius = UDim.new(1, 0) StatusIndicatorCorner.Parent = StatusIndicator -- 状态文字 local StatusText = Instance.new("TextLabel") StatusText.Size = UDim2.new(1, -40, 0, 20) StatusText.Position = UDim2.new(0, 30, 0, 12) StatusText.BackgroundTransparency = 1 StatusText.Text = "系统运行正常" StatusText.TextColor3 = Colors.TextPrimary StatusText.TextSize = 14 StatusText.Font = FontBold StatusText.TextXAlignment = Enum.TextXAlignment.Left StatusText.ZIndex = 53 StatusText.Parent = StatusCard -- 状态描述 local StatusDesc = Instance.new("TextLabel") StatusDesc.Size = UDim2.new(1, -30, 0, 40) StatusDesc.Position = UDim2.new(0, 15, 0, 36) StatusDesc.BackgroundTransparency = 1 StatusDesc.Text = "所有功能模块已加载完成\n绘制系统就绪" StatusDesc.TextColor3 = Colors.TextSecondary StatusDesc.TextSize = 12 StatusDesc.Font = FontMedium StatusDesc.TextXAlignment = Enum.TextXAlignment.Left StatusDesc.TextYAlignment = Enum.TextYAlignment.Top StatusDesc.ZIndex = 53 StatusDesc.Parent = StatusCard TabContents["announcement"] = AnnouncementFrame -- ========================================== -- 自瞄系统核心功能 -- ========================================== local function GetAimPart(character) if not character then return nil end local targetPart = AimSettings.AimPart if targetPart == "随机部位" then local parts = {} for _, name in ipairs({"Head", "UpperTorso", "LowerTorso", "HumanoidRootPart", "LeftFoot", "RightFoot"}) do local part = character:FindFirstChild(name) if part then table.insert(parts, part) end end if #parts > 0 then return parts[math.random(1, #parts)] end return nil end local part = character:FindFirstChild(targetPart) if part then return part end for _, name in ipairs({"Head", "UpperTorso", "HumanoidRootPart"}) do part = character:FindFirstChild(name) if part then return part end end return nil end local function IsAimingDownSights() if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then return true end if Camera.FieldOfView < 65 then return true end return false end local function IsValidTarget(targetPlayer) if targetPlayer == player then return false, nil, 0 end local character = targetPlayer.Character if not character then return false, nil, 0 end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health <= 0 then return false, nil, 0 end local aimPart = GetAimPart(character) if not aimPart then return false, nil, 0 end local distance = (aimPart.Position - Camera.CFrame.Position).Magnitude if distance > AimSettings.AimMaxDistance then return false, nil, 0 end local screenPos, onScreen = Camera:WorldToViewportPoint(aimPart.Position) if not onScreen or screenPos.Z <= 0 then return false, nil, 0 end if AimSettings.AimMethod == "准星自瞄" then local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) local screenDist = (Vector2.new(screenPos.X, screenPos.Y) - screenCenter).Magnitude if screenDist > AimSettings.AimRange then return false, nil, 0 end end if AimSettings.AimWallCheck then local rayParams = RaycastParams.new() rayParams.FilterDescendantsInstances = {player.Character, character} rayParams.FilterType = Enum.RaycastFilterType.Blacklist local result = Workspace:Raycast(Camera.CFrame.Position, (aimPart.Position - Camera.CFrame.Position).Unit * distance, rayParams) if result then return false, nil, 0 end end return true, aimPart, distance end local function FindBestTarget() local bestTarget = nil local bestScore = math.huge local localChar = player.Character if not localChar then return nil end local cameraPos = Camera.CFrame.Position local cameraLook = Camera.CFrame.LookVector for _, targetPlayer in pairs(Players:GetPlayers()) do if targetPlayer == player then continue end local valid, aimPart, distance = IsValidTarget(targetPlayer) if valid and aimPart then local partPos = aimPart.Position local toTarget = (partPos - cameraPos).Unit local angle = math.acos(math.clamp(cameraLook:Dot(toTarget), -1, 1)) local totalScore = 0 if AimSettings.AimPriority == "准心优先" then totalScore = angle * 1000 + distance * 0.001 else totalScore = angle * 10 + distance * 10 end if totalScore < bestScore then bestScore = totalScore bestTarget = { Player = targetPlayer, Part = aimPart, Distance = distance, LastPosition = partPos, Velocity = aimPart.Velocity or Vector3.new(0, 0, 0) } end end end return bestTarget end local function UpdateAimSystem() if not AimSettings.Enabled then if AimSystem.CurrentTarget then AimSystem.CurrentTarget = nil AimSystem.IsAiming = false AimSystem.CurrentDir = nil end return end local shouldAim = false if AimSettings.AimMethod == "总是自瞄" then shouldAim = true elseif AimSettings.AimMethod == "开镜自瞄" then shouldAim = IsAimingDownSights() elseif AimSettings.AimMethod == "准星自瞄" then shouldAim = true end if not shouldAim then AimSystem.CurrentTarget = nil AimSystem.IsAiming = false return end if AimSystem.CurrentTarget then local valid, aimPart, distance = IsValidTarget(AimSystem.CurrentTarget.Player) if not valid or not aimPart then AimSystem.CurrentTarget = nil AimSystem.CurrentDir = nil else AimSystem.CurrentTarget.Part = aimPart AimSystem.CurrentTarget.Distance = distance AimSystem.CurrentTarget.LastPosition = aimPart.Position AimSystem.CurrentTarget.Velocity = aimPart.Velocity or Vector3.new(0, 0, 0) end end if not AimSystem.CurrentTarget then AimSystem.CurrentTarget = FindBestTarget() if AimSystem.CurrentTarget then AimSystem.TargetLockTime = tick() AimSystem.CurrentDir = Camera.CFrame.LookVector end end if not AimSystem.CurrentTarget or not AimSystem.CurrentTarget.Part then return end local targetPos = AimSystem.CurrentTarget.Part.Position if AimSettings.AimPrediction > 0 then local velocity = AimSystem.CurrentTarget.Velocity if velocity and velocity.Magnitude > 0.1 then local prediction = AimSettings.AimPrediction * math.min(AimSystem.CurrentTarget.Distance / 1000, 1) targetPos = targetPos + velocity * prediction end end local cameraPos = Camera.CFrame.Position local targetDir = (targetPos - cameraPos).Unit local lockSpeed = math.clamp(AimSettings.AimLockSpeed, 0.01, 1) local smoothness = math.clamp(AimSettings.AimSmoothness, 0.01, 0.5) if not AimSystem.CurrentDir then AimSystem.CurrentDir = Camera.CFrame.LookVector end local currentDir = AimSystem.CurrentDir local angle = math.acos(math.clamp(currentDir:Dot(targetDir), -1, 1)) if AimSettings.AimMode == "强锁" then local maxAngle = lockSpeed * 0.8 if angle > maxAngle then local axis = currentDir:Cross(targetDir) if axis.Magnitude > 0.001 then axis = axis.Unit local rotation = CFrame.fromAxisAngle(axis, maxAngle) targetDir = rotation * currentDir end end else local lerpFactor = smoothness * 0.5 lerpFactor = math.clamp(lerpFactor, 0.001, 0.5) targetDir = currentDir:Lerp(targetDir, lerpFactor) end targetDir = targetDir.Unit local newCF = CFrame.new(cameraPos, cameraPos + targetDir) Camera.CFrame = newCF pcall(function() workspace.CurrentCamera.CFrame = newCF end) AimSystem.CurrentDir = targetDir AimSystem.IsAiming = true AimSystem.LastUpdate = tick() end local function StartAimSystem() if AimSystem.Connection then return end AimSystem.CurrentDir = Camera.CFrame.LookVector local function AimLoop() if AimSettings.Enabled then pcall(UpdateAimSystem) end end pcall(function() RunService:BindToRenderStep("AimSystem", Enum.RenderPriority.Camera.Value + 1, AimLoop) AimSystem.Connection = {Disconnect = function() RunService:UnbindFromRenderStep("AimSystem") end} end) if not AimSystem.Connection then AimSystem.Connection = RunService.RenderStepped:Connect(AimLoop) end end local function StopAimSystem() if AimSystem.Connection then pcall(function() AimSystem.Connection:Disconnect() end) AimSystem.Connection = nil end pcall(function() RunService:UnbindFromRenderStep("AimSystem") end) AimSystem.CurrentTarget = nil AimSystem.IsAiming = false AimSystem.CurrentDir = nil end local function UpdateAimRangeCircle() pcall(function() if not DrawingEnabled then return end if not AimSystem.RangeCircle then AimSystem.RangeCircle = Drawing.new("Circle") AimSystem.RangeCircle.Thickness = 1.5 AimSystem.RangeCircle.NumSides = 64 AimSystem.RangeCircle.Filled = false end if AimSettings.ShowRangeCircle and AimSettings.Enabled then local colorTable = { Red = Color3.fromRGB(255, 59, 48), Green = Color3.fromRGB(52, 199, 89), Blue = Color3.fromRGB(0, 122, 255), Yellow = Color3.fromRGB(255, 204, 0), Purple = Color3.fromRGB(175, 82, 222), White = Color3.fromRGB(255, 255, 255), Cyan = Color3.fromRGB(90, 200, 250), Pink = Color3.fromRGB(255, 55, 95) } local color = colorTable[AimSettings.RangeColor] or Color3.fromRGB(255, 0, 0) AimSystem.RangeCircle.Position = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) AimSystem.RangeCircle.Radius = AimSettings.AimRange AimSystem.RangeCircle.Color = color AimSystem.RangeCircle.Visible = true else if AimSystem.RangeCircle then AimSystem.RangeCircle.Visible = false end end end) end StartAimSystem() -- ========================================== -- 其他界面占位 -- ========================================== local function CreatePlaceholderTab(id, name) local frame = Instance.new("Frame") frame.Name = name .. "Frame" frame.Size = UDim2.new(1, 0, 1, 0) frame.BackgroundTransparency = 1 frame.Visible = false frame.ZIndex = 51 frame.Parent = ContentContainer local text = Instance.new("TextLabel") text.Size = UDim2.new(1, 0, 1, 0) text.BackgroundTransparency = 1 text.Text = "功能开发中" text.TextColor3 = Colors.TextSecondary text.TextSize = 16 text.Font = FontMedium text.ZIndex = 52 text.Parent = frame TabContents[id] = frame end -- ========================================== -- 其他绘制界面 - 自瞄功能 -- ========================================== local OtherDrawFrame = Instance.new("Frame") OtherDrawFrame.Name = "OtherDrawFrame" OtherDrawFrame.Size = UDim2.new(1, 0, 1, 0) OtherDrawFrame.BackgroundTransparency = 1 OtherDrawFrame.Visible = false OtherDrawFrame.ZIndex = 51 OtherDrawFrame.Parent = ContentContainer -- 左上:瞄准菜单 local AimMenuPanel = Instance.new("Frame") AimMenuPanel.Size = UDim2.new(0, 200, 0, 180) AimMenuPanel.Position = UDim2.new(0, 10, 0, 10) AimMenuPanel.BackgroundColor3 = Colors.Card AimMenuPanel.ZIndex = 52 AimMenuPanel.Parent = OtherDrawFrame local corner1 = Instance.new("UICorner") corner1.CornerRadius = UDim.new(0, 10) corner1.Parent = AimMenuPanel -- 标题 local title1 = Instance.new("TextLabel") title1.Size = UDim2.new(1, -20, 0, 24) title1.Position = UDim2.new(0, 10, 0, 8) title1.BackgroundTransparency = 1 title1.Text = "瞄准菜单" title1.TextColor3 = Colors.Primary title1.TextSize = 14 title1.Font = FontBold title1.TextXAlignment = Enum.TextXAlignment.Left title1.ZIndex = 53 title1.Parent = AimMenuPanel local div1 = Instance.new("Frame") div1.Size = UDim2.new(1, -20, 0, 2) div1.Position = UDim2.new(0, 10, 0, 32) div1.BackgroundColor3 = Colors.Primary div1.BorderSizePixel = 0 div1.ZIndex = 53 div1.Parent = AimMenuPanel -- 自瞄开关 local switchRow = Instance.new("Frame") switchRow.Size = UDim2.new(1, -20, 0, 32) switchRow.Position = UDim2.new(0, 10, 0, 42) switchRow.BackgroundTransparency = 1 switchRow.ZIndex = 53 switchRow.Parent = AimMenuPanel local switchLabel = Instance.new("TextLabel") switchLabel.Size = UDim2.new(0, 80, 1, 0) switchLabel.BackgroundTransparency = 1 switchLabel.Text = "自瞄开关" switchLabel.TextColor3 = Colors.TextPrimary switchLabel.TextSize = 14 switchLabel.Font = FontBold switchLabel.TextXAlignment = Enum.TextXAlignment.Left switchLabel.ZIndex = 54 switchLabel.Parent = switchRow local toggleBg = Instance.new("TextButton") toggleBg.Name = "AimToggleBg" toggleBg.Size = UDim2.new(0, 50, 0, 26) toggleBg.Position = UDim2.new(0, 90, 0.5, -13) toggleBg.BackgroundColor3 = AimSettings.Enabled and Colors.ToggleOn or Colors.ToggleOff toggleBg.Text = "" toggleBg.AutoButtonColor = false toggleBg.ZIndex = 60 toggleBg.Parent = switchRow local tc1 = Instance.new("UICorner") tc1.CornerRadius = UDim.new(0, 13) tc1.Parent = toggleBg local toggleDot = Instance.new("Frame") toggleDot.Name = "AimToggleDot" toggleDot.Size = UDim2.new(0, 22, 0, 22) toggleDot.Position = AimSettings.Enabled and UDim2.new(1, -24, 0, 2) or UDim2.new(0, 2, 0, 2) toggleDot.BackgroundColor3 = Color3.fromRGB(255, 255, 255) toggleDot.ZIndex = 61 toggleDot.Parent = toggleBg local tc2 = Instance.new("UICorner") tc2.CornerRadius = UDim.new(1, 0) tc2.Parent = toggleDot -- 圆圈瞄/视角瞄 local methodFrame = Instance.new("Frame") methodFrame.Size = UDim2.new(1, -20, 0, 30) methodFrame.Position = UDim2.new(0, 10, 0, 80) methodFrame.BackgroundTransparency = 1 methodFrame.ZIndex = 53 methodFrame.Parent = AimMenuPanel local circleBtn = Instance.new("TextButton") circleBtn.Name = "CircleAimBtn" circleBtn.Size = UDim2.new(0, 80, 0, 28) circleBtn.Position = UDim2.new(0, 0, 0, 0) circleBtn.BackgroundColor3 = AimSettings.AimMethod == "准星自瞄" and Colors.Primary or Color3.fromRGB(230, 230, 230) circleBtn.Text = "圆圈瞄" circleBtn.TextColor3 = AimSettings.AimMethod == "准星自瞄" and Color3.fromRGB(255,255,255) or Colors.TextPrimary circleBtn.TextSize = 12 circleBtn.Font = FontMedium circleBtn.AutoButtonColor = false circleBtn.ZIndex = 60 circleBtn.Parent = methodFrame local mc1 = Instance.new("UICorner") mc1.CornerRadius = UDim.new(0, 6) mc1.Parent = circleBtn local viewBtn = Instance.new("TextButton") viewBtn.Name = "ViewAimBtn" viewBtn.Size = UDim2.new(0, 80, 0, 28) viewBtn.Position = UDim2.new(0, 90, 0, 0) viewBtn.BackgroundColor3 = AimSettings.AimMethod == "总是自瞄" and Colors.Primary or Color3.fromRGB(230, 230, 230) viewBtn.Text = "视角瞄" viewBtn.TextColor3 = AimSettings.AimMethod == "总是自瞄" and Color3.fromRGB(255,255,255) or Colors.TextPrimary viewBtn.TextSize = 12 viewBtn.Font = FontMedium viewBtn.AutoButtonColor = false viewBtn.ZIndex = 60 viewBtn.Parent = methodFrame local mc2 = Instance.new("UICorner") mc2.CornerRadius = UDim.new(0, 6) mc2.Parent = viewBtn -- 复选框 local function CreateCheckbox(name, settingKey, posX, posY) local frame = Instance.new("Frame") frame.Name = name .. "Frame" frame.Size = UDim2.new(0, 90, 0, 24) frame.Position = UDim2.new(0, posX, 0, posY) frame.BackgroundTransparency = 1 frame.ZIndex = 53 frame.Parent = AimMenuPanel local outer = Instance.new("TextButton") outer.Name = name .. "Outer" outer.Size = UDim2.new(0, 18, 0, 18) outer.Position = UDim2.new(0, 0, 0.5, -9) outer.BackgroundColor3 = Color3.fromRGB(255, 255, 255) outer.Text = "" outer.AutoButtonColor = false outer.ZIndex = 60 outer.Parent = frame local oc = Instance.new("UICorner") oc.CornerRadius = UDim.new(1, 0) oc.Parent = outer local stroke = Instance.new("UIStroke") stroke.Color = Colors.Border stroke.Thickness = 2 stroke.Parent = outer local inner = Instance.new("Frame") inner.Name = name .. "Inner" inner.Size = UDim2.new(0, 10, 0, 10) inner.Position = UDim2.new(0.5, -5, 0.5, -5) inner.BackgroundColor3 = Colors.Primary inner.BorderSizePixel = 0 inner.Visible = AimSettings[settingKey] == true inner.ZIndex = 61 inner.Parent = outer local ic = Instance.new("UICorner") ic.CornerRadius = UDim.new(1, 0) ic.Parent = inner local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -24, 1, 0) label.Position = UDim2.new(0, 24, 0, 0) label.BackgroundTransparency = 1 label.Text = name label.TextColor3 = Colors.TextPrimary label.TextSize = 12 label.Font = FontMedium label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 54 label.Parent = frame outer.MouseButton1Click:Connect(function() local newState = not (AimSettings[settingKey] == true) AimSettings[settingKey] = newState inner.Visible = newState print("[自瞄] " .. name .. ": " .. tostring(newState)) end) return inner end local touchInner = CreateCheckbox("触摸位置", "TouchPosition", 10, 120) local lockInner = CreateCheckbox("持续锁定", "ContinuousLock", 105, 120) local rangeInner = CreateCheckbox("范围圈圈", "ShowRangeCircle", 10, 148) -- 左下:瞄准选项卡 local optionsPanel = Instance.new("Frame") optionsPanel.Name = "OptionsPanel" optionsPanel.Size = UDim2.new(0, 200, 0, 150) optionsPanel.Position = UDim2.new(0, 10, 0, 200) optionsPanel.BackgroundColor3 = Colors.Card optionsPanel.ZIndex = 52 optionsPanel.Parent = OtherDrawFrame local corner2 = Instance.new("UICorner") corner2.CornerRadius = UDim.new(0, 10) corner2.Parent = optionsPanel local title2 = Instance.new("TextLabel") title2.Size = UDim2.new(1, -20, 0, 24) title2.Position = UDim2.new(0, 10, 0, 8) title2.BackgroundTransparency = 1 title2.Text = "瞄准选项卡" title2.TextColor3 = Colors.Primary title2.TextSize = 14 title2.Font = FontBold title2.TextXAlignment = Enum.TextXAlignment.Left title2.ZIndex = 53 title2.Parent = optionsPanel local div2 = Instance.new("Frame") div2.Size = UDim2.new(1, -20, 0, 2) div2.Position = UDim2.new(0, 10, 0, 32) div2.BackgroundColor3 = Colors.Primary div2.BorderSizePixel = 0 div2.ZIndex = 53 div2.Parent = optionsPanel -- 准先/距先 local p1 = Instance.new("TextButton") p1.Name = "Priority1Btn" p1.Size = UDim2.new(0, 55, 0, 26) p1.Position = UDim2.new(0, 10, 0, 42) p1.BackgroundColor3 = AimSettings.AimPriority == "准心优先" and Colors.Primary or Color3.fromRGB(230, 230, 230) p1.Text = "准先" p1.TextColor3 = AimSettings.AimPriority == "准心优先" and Color3.fromRGB(255,255,255) or Colors.TextPrimary p1.TextSize = 11 p1.Font = FontMedium p1.AutoButtonColor = false p1.ZIndex = 60 p1.Parent = optionsPanel local pc1 = Instance.new("UICorner") pc1.CornerRadius = UDim.new(0, 6) pc1.Parent = p1 local p2 = Instance.new("TextButton") p2.Name = "Priority2Btn" p2.Size = UDim2.new(0, 55, 0, 26) p2.Position = UDim2.new(0, 72, 0, 42) p2.BackgroundColor3 = AimSettings.AimPriority == "距离优先" and Colors.Primary or Color3.fromRGB(230, 230, 230) p2.Text = "距先" p2.TextColor3 = AimSettings.AimPriority == "距离优先" and Color3.fromRGB(255,255,255) or Colors.TextPrimary p2.TextSize = 11 p2.Font = FontMedium p2.AutoButtonColor = false p2.ZIndex = 60 p2.Parent = optionsPanel local pc2 = Instance.new("UICorner") pc2.CornerRadius = UDim.new(0, 6) pc2.Parent = p2 -- 开火/开镜/火|镜 local t1 = Instance.new("TextButton") t1.Name = "Trigger1Btn" t1.Size = UDim2.new(0, 55, 0, 26) t1.Position = UDim2.new(0, 10, 0, 74) t1.BackgroundColor3 = AimSettings.AimTrigger == "总是自瞄" and Colors.Primary or Color3.fromRGB(230, 230, 230) t1.Text = "开火" t1.TextColor3 = AimSettings.AimTrigger == "总是自瞄" and Color3.fromRGB(255,255,255) or Colors.TextPrimary t1.TextSize = 11 t1.Font = FontMedium t1.AutoButtonColor = false t1.ZIndex = 60 t1.Parent = optionsPanel local tc1b = Instance.new("UICorner") tc1b.CornerRadius = UDim.new(0, 6) tc1b.Parent = t1 local t2 = Instance.new("TextButton") t2.Name = "Trigger2Btn" t2.Size = UDim2.new(0, 55, 0, 26) t2.Position = UDim2.new(0, 72, 0, 74) t2.BackgroundColor3 = AimSettings.AimTrigger == "开镜自瞄" and Colors.Primary or Color3.fromRGB(230, 230, 230) t2.Text = "开镜" t2.TextColor3 = AimSettings.AimTrigger == "开镜自瞄" and Color3.fromRGB(255,255,255) or Colors.TextPrimary t2.TextSize = 11 t2.Font = FontMedium t2.AutoButtonColor = false t2.ZIndex = 60 t2.Parent = optionsPanel local tc2b = Instance.new("UICorner") tc2b.CornerRadius = UDim.new(0, 6) tc2b.Parent = t2 local t3 = Instance.new("TextButton") t3.Name = "Trigger3Btn" t3.Size = UDim2.new(0, 55, 0, 26) t3.Position = UDim2.new(0, 134, 0, 74) t3.BackgroundColor3 = AimSettings.AimTrigger == "准星自瞄" and Colors.Primary or Color3.fromRGB(230, 230, 230) t3.Text = "火|镜" t3.TextColor3 = AimSettings.AimTrigger == "准星自瞄" and Color3.fromRGB(255,255,255) or Colors.TextPrimary t3.TextSize = 11 t3.Font = FontMedium t3.AutoButtonColor = false t3.ZIndex = 60 t3.Parent = optionsPanel local tc3b = Instance.new("UICorner") tc3b.CornerRadius = UDim.new(0, 6) tc3b.Parent = t3 -- 随机/头部/胸部 local part1 = Instance.new("TextButton") part1.Name = "Part1Btn" part1.Size = UDim2.new(0, 55, 0, 26) part1.Position = UDim2.new(0, 10, 0, 106) part1.BackgroundColor3 = AimSettings.AimPart == "随机部位" and Colors.Primary or Color3.fromRGB(230, 230, 230) part1.Text = "随机" part1.TextColor3 = AimSettings.AimPart == "随机部位" and Color3.fromRGB(255,255,255) or Colors.TextPrimary part1.TextSize = 11 part1.Font = FontMedium part1.AutoButtonColor = false part1.ZIndex = 60 part1.Parent = optionsPanel local partc1 = Instance.new("UICorner") partc1.CornerRadius = UDim.new(0, 6) partc1.Parent = part1 local part2 = Instance.new("TextButton") part2.Name = "Part2Btn" part2.Size = UDim2.new(0, 55, 0, 26) part2.Position = UDim2.new(0, 72, 0, 106) part2.BackgroundColor3 = AimSettings.AimPart == "Head" and Colors.Primary or Color3.fromRGB(230, 230, 230) part2.Text = "头部" part2.TextColor3 = AimSettings.AimPart == "Head" and Color3.fromRGB(255,255,255) or Colors.TextPrimary part2.TextSize = 11 part2.Font = FontMedium part2.AutoButtonColor = false part2.ZIndex = 60 part2.Parent = optionsPanel local partc2 = Instance.new("UICorner") partc2.CornerRadius = UDim.new(0, 6) partc2.Parent = part2 local part3 = Instance.new("TextButton") part3.Name = "Part3Btn" part3.Size = UDim2.new(0, 55, 0, 26) part3.Position = UDim2.new(0, 134, 0, 106) part3.BackgroundColor3 = AimSettings.AimPart == "UpperTorso" and Colors.Primary or Color3.fromRGB(230, 230, 230) part3.Text = "胸部" part3.TextColor3 = AimSettings.AimPart == "UpperTorso" and Color3.fromRGB(255,255,255) or Colors.TextPrimary part3.TextSize = 11 part3.Font = FontMedium part3.AutoButtonColor = false part3.ZIndex = 60 part3.Parent = optionsPanel local partc3 = Instance.new("UICorner") partc3.CornerRadius = UDim.new(0, 6) partc3.Parent = part3 -- 右侧:瞄准参数 local paramsPanel = Instance.new("Frame") paramsPanel.Name = "ParamsPanel" paramsPanel.Size = UDim2.new(1, -230, 1, -20) paramsPanel.Position = UDim2.new(0, 220, 0, 10) paramsPanel.BackgroundColor3 = Colors.Card paramsPanel.ZIndex = 52 paramsPanel.Parent = OtherDrawFrame local corner3 = Instance.new("UICorner") corner3.CornerRadius = UDim.new(0, 10) corner3.Parent = paramsPanel local title3 = Instance.new("TextLabel") title3.Size = UDim2.new(1, -20, 0, 24) title3.Position = UDim2.new(0, 10, 0, 8) title3.BackgroundTransparency = 1 title3.Text = "瞄准参数" title3.TextColor3 = Colors.Primary title3.TextSize = 14 title3.Font = FontBold title3.TextXAlignment = Enum.TextXAlignment.Left title3.ZIndex = 53 title3.Parent = paramsPanel local div3 = Instance.new("Frame") div3.Size = UDim2.new(1, -20, 0, 2) div3.Position = UDim2.new(0, 10, 0, 32) div3.BackgroundColor3 = Colors.Primary div3.BorderSizePixel = 0 div3.ZIndex = 53 div3.Parent = paramsPanel -- 滑块函数 local function CreateSlider(name, settingKey, min, max, decimals, scale, posY) local frame = Instance.new("Frame") frame.Name = name .. "Slider" frame.Size = UDim2.new(1, -20, 0, 50) frame.Position = UDim2.new(0, 10, 0, posY) frame.BackgroundTransparency = 1 frame.ZIndex = 53 frame.Parent = paramsPanel local label = Instance.new("TextLabel") label.Size = UDim2.new(0.5, 0, 0, 18) label.BackgroundTransparency = 1 label.Text = name label.TextColor3 = Colors.TextPrimary label.TextSize = 12 label.Font = FontMedium label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 54 label.Parent = frame local val = AimSettings[settingKey] * scale if decimals == 0 then val = math.floor(val + 0.5) else val = math.floor(val * (10^decimals) + 0.5) / (10^decimals) end local valueLabel = Instance.new("TextLabel") valueLabel.Name = name .. "Value" valueLabel.Size = UDim2.new(0, 50, 0, 20) valueLabel.Position = UDim2.new(1, -50, 0, 0) valueLabel.BackgroundColor3 = Colors.Primary valueLabel.Text = tostring(val) valueLabel.TextColor3 = Color3.fromRGB(255, 255, 255) valueLabel.TextSize = 12 valueLabel.Font = FontBold valueLabel.ZIndex = 54 valueLabel.Parent = frame local vc = Instance.new("UICorner") vc.CornerRadius = UDim.new(0, 4) vc.Parent = valueLabel local track = Instance.new("Frame") track.Name = name .. "Track" track.Size = UDim2.new(1, 0, 0, 6) track.Position = UDim2.new(0, 0, 0, 28) track.BackgroundColor3 = Color3.fromRGB(220, 220, 220) track.BorderSizePixel = 0 track.ZIndex = 54 track.Parent = frame local trc = Instance.new("UICorner") trc.CornerRadius = UDim.new(1, 0) trc.Parent = track local percent = (AimSettings[settingKey] - min) / (max - min) local fill = Instance.new("Frame") fill.Name = name .. "Fill" fill.Size = UDim2.new(percent, 0, 1, 0) fill.BackgroundColor3 = Colors.Primary fill.BorderSizePixel = 0 fill.ZIndex = 55 fill.Parent = track local fc = Instance.new("UICorner") fc.CornerRadius = UDim.new(1, 0) fc.Parent = fill local thumb = Instance.new("TextButton") thumb.Name = name .. "Thumb" thumb.Size = UDim2.new(0, 16, 0, 16) thumb.Position = UDim2.new(percent, -8, 0.5, -8) thumb.BackgroundColor3 = Color3.fromRGB(255, 255, 255) thumb.Text = "" thumb.AutoButtonColor = false thumb.ZIndex = 60 thumb.Parent = track local ts = Instance.new("UIStroke") ts.Color = Colors.Primary ts.Thickness = 2 ts.Parent = thumb local thc = Instance.new("UICorner") thc.CornerRadius = UDim.new(1, 0) thc.Parent = thumb local dragging = false local function update(input) local tp = track.AbsolutePosition.X local tsz = track.AbsoluteSize.X local mx = input.Position.X local pct = math.clamp((mx - tp) / tsz, 0, 1) local v = min + (max - min) * pct if decimals == 0 then v = math.floor(v + 0.5) else v = math.floor(v * (10^decimals) + 0.5) / (10^decimals) end AimSettings[settingKey] = v fill.Size = UDim2.new(pct, 0, 1, 0) thumb.Position = UDim2.new(pct, -8, 0.5, -8) local dv = v * scale if decimals == 0 then dv = math.floor(dv + 0.5) else dv = math.floor(dv * (10^decimals) + 0.5) / (10^decimals) end valueLabel.Text = tostring(dv) print("[自瞄] " .. name .. ": " .. tostring(dv)) end thumb.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true end end) UserInputService.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then update(i) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = false end end) track.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then update(i) end end) end CreateSlider("自瞄范围", "AimRange", 50, 500, 0, 1, 48) CreateSlider("触控范围", "AimRange", 50, 300, 0, 1, 100) CreateSlider("腰射距离", "AimMaxDistance", 100, 3000, 0, 0.01, 152) CreateSlider("自瞄速度", "AimLockSpeed", 0.01, 1, 2, 100, 204) CreateSlider("平滑力度", "AimSmoothness", 0.01, 0.5, 2, 100, 256) -- 按钮事件绑定 toggleBg.MouseButton1Click:Connect(function() AimSettings.Enabled = not AimSettings.Enabled toggleBg.BackgroundColor3 = AimSettings.Enabled and Colors.ToggleOn or Colors.ToggleOff local tp = AimSettings.Enabled and UDim2.new(1, -24, 0, 2) or UDim2.new(0, 2, 0, 2) TweenService:Create(toggleDot, TweenInfo.new(0.2), {Position = tp}):Play() print("[自瞄] 开关: " .. tostring(AimSettings.Enabled)) end) circleBtn.MouseButton1Click:Connect(function() AimSettings.AimMethod = "准星自瞄" circleBtn.BackgroundColor3 = Colors.Primary circleBtn.TextColor3 = Color3.fromRGB(255,255,255) viewBtn.BackgroundColor3 = Color3.fromRGB(230, 230, 230) viewBtn.TextColor3 = Colors.TextPrimary print("[自瞄] 模式: 圆圈瞄") end) viewBtn.MouseButton1Click:Connect(function() AimSettings.AimMethod = "总是自瞄" viewBtn.BackgroundColor3 = Colors.Primary viewBtn.TextColor3 = Color3.fromRGB(255,255,255) circleBtn.BackgroundColor3 = Color3.fromRGB(230, 230, 230) circleBtn.TextColor3 = Colors.TextPrimary print("[自瞄] 模式: 视角瞄") end) p1.MouseButton1Click:Connect(function() AimSettings.AimPriority = "准心优先" p1.BackgroundColor3 = Colors.Primary p1.TextColor3 = Color3.fromRGB(255,255,255) p2.BackgroundColor3 = Color3.fromRGB(230, 230, 230) p2.TextColor3 = Colors.TextPrimary print("[自瞄] 优先: 准先") end) p2.MouseButton1Click:Connect(function() AimSettings.AimPriority = "距离优先" p2.BackgroundColor3 = Colors.Primary p2.TextColor3 = Color3.fromRGB(255,255,255) p1.BackgroundColor3 = Color3.fromRGB(230, 230, 230) p1.TextColor3 = Colors.TextPrimary print("[自瞄] 优先: 距先") end) t1.MouseButton1Click:Connect(function() AimSettings.AimTrigger = "总是自瞄" t1.BackgroundColor3 = Colors.Primary t1.TextColor3 = Color3.fromRGB(255,255,255) t2.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t2.TextColor3 = Colors.TextPrimary t3.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t3.TextColor3 = Colors.TextPrimary print("[自瞄] 触发: 开火") end) t2.MouseButton1Click:Connect(function() AimSettings.AimTrigger = "开镜自瞄" t2.BackgroundColor3 = Colors.Primary t2.TextColor3 = Color3.fromRGB(255,255,255) t1.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t1.TextColor3 = Colors.TextPrimary t3.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t3.TextColor3 = Colors.TextPrimary print("[自瞄] 触发: 开镜") end) t3.MouseButton1Click:Connect(function() AimSettings.AimTrigger = "准星自瞄" t3.BackgroundColor3 = Colors.Primary t3.TextColor3 = Color3.fromRGB(255,255,255) t1.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t1.TextColor3 = Colors.TextPrimary t2.BackgroundColor3 = Color3.fromRGB(230, 230, 230) t2.TextColor3 = Colors.TextPrimary print("[自瞄] 触发: 火|镜") end) part1.MouseButton1Click:Connect(function() AimSettings.AimPart = "随机部位" part1.BackgroundColor3 = Colors.Primary part1.TextColor3 = Color3.fromRGB(255,255,255) part2.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part2.TextColor3 = Colors.TextPrimary part3.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part3.TextColor3 = Colors.TextPrimary print("[自瞄] 部位: 随机") end) part2.MouseButton1Click:Connect(function() AimSettings.AimPart = "Head" part2.BackgroundColor3 = Colors.Primary part2.TextColor3 = Color3.fromRGB(255,255,255) part1.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part1.TextColor3 = Colors.TextPrimary part3.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part3.TextColor3 = Colors.TextPrimary print("[自瞄] 部位: 头部") end) part3.MouseButton1Click:Connect(function() AimSettings.AimPart = "UpperTorso" part3.BackgroundColor3 = Colors.Primary part3.TextColor3 = Color3.fromRGB(255,255,255) part1.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part1.TextColor3 = Colors.TextPrimary part2.BackgroundColor3 = Color3.fromRGB(230, 230, 230) part2.TextColor3 = Colors.TextPrimary print("[自瞄] 部位: 胸部") end) TabContents["other_draw"] = OtherDrawFrame -- 自动瞄准占位 local aimTab = Instance.new("Frame") aimTab.Size = UDim2.new(1, 0, 1, 0) aimTab.BackgroundTransparency = 1 aimTab.Visible = false aimTab.ZIndex = 51 aimTab.Parent = ContentContainer local aimText = Instance.new("TextLabel") aimText.Size = UDim2.new(1, 0, 1, 0) aimText.BackgroundTransparency = 1 aimText.Text = "功能开发中" aimText.TextColor3 = Colors.TextSecondary aimText.TextSize = 16 aimText.Font = FontMedium aimText.ZIndex = 52 aimText.Parent = aimTab TabContents["aim"] = aimTab -- 静默追踪占位 local silentTab = Instance.new("Frame") silentTab.Size = UDim2.new(1, 0, 1, 0) silentTab.BackgroundTransparency = 1 silentTab.Visible = false silentTab.ZIndex = 51 silentTab.Parent = ContentContainer local silentText = Instance.new("TextLabel") silentText.Size = UDim2.new(1, 0, 1, 0) silentText.BackgroundTransparency = 1 silentText.Text = "功能开发中" silentText.TextColor3 = Colors.TextSecondary silentText.TextSize = 16 silentText.Font = FontMedium silentText.ZIndex = 52 silentText.Parent = silentTab TabContents["silent"] = silentTab -- 其他功能占位 local otherTab = Instance.new("Frame") otherTab.Size = UDim2.new(1, 0, 1, 0) otherTab.BackgroundTransparency = 1 otherTab.Visible = false otherTab.ZIndex = 51 otherTab.Parent = ContentContainer local otherText = Instance.new("TextLabel") otherText.Size = UDim2.new(1, 0, 1, 0) otherText.BackgroundTransparency = 1 otherText.Text = "功能开发中" otherText.TextColor3 = Colors.TextSecondary otherText.TextSize = 16 otherText.Font = FontMedium otherText.ZIndex = 52 otherText.Parent = otherTab TabContents["other"] = otherTab -- 美化界面占位 local beautifyTab = Instance.new("Frame") beautifyTab.Size = UDim2.new(1, 0, 1, 0) beautifyTab.BackgroundTransparency = 1 beautifyTab.Visible = false beautifyTab.ZIndex = 51 beautifyTab.Parent = ContentContainer local beautifyText = Instance.new("TextLabel") beautifyText.Size = UDim2.new(1, 0, 1, 0) beautifyText.BackgroundTransparency = 1 beautifyText.Text = "功能开发中" beautifyText.TextColor3 = Colors.TextSecondary beautifyText.TextSize = 16 beautifyText.Font = FontMedium beautifyText.ZIndex = 52 beautifyText.Parent = beautifyTab TabContents["beautify"] = beautifyTab CreatePlaceholderTab("aim", "Aim") CreatePlaceholderTab("silent", "Silent") CreatePlaceholderTab("other", "Other") CreatePlaceholderTab("beautify", "Beautify") -- 注册绘制界面 TabContents["draw"] = DrawFrame -- 初始化显示绘制界面 SwitchTab("draw") print("Aimox UI 修改版加载完成!")