{"id":"7b8UaQrbUY","url":"https://pastebin.ca/7b8UaQrbUY","raw_url":"https://raw.anybin.ca/7b8UaQrbUY","visibility":"profile","access":"public","created_at":1792742290775,"expires_at":1800518290775,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":36045,"syntax_hint":null,"title":"测试","filename":"1","change_note":null,"cipher":null,"cipher_meta":null,"parent_id":null,"root_id":"7b8UaQrbUY","version":1,"owner_id":null,"recipient_id":null,"body":"local Players = game:GetService(\"Players\")\nlocal CoreGui = game:GetService(\"CoreGui\")\nlocal RunService = game:GetService(\"RunService\")\nlocal UserInputService = game:GetService(\"UserInputService\")\nlocal TweenService = game:GetService(\"TweenService\")\nlocal CollectionService = game:GetService(\"CollectionService\")\n\nlocal LocalPlayer = Players.LocalPlayer\nlocal PlayerGui = LocalPlayer:WaitForChild(\"PlayerGui\")\nlocal Camera = workspace.CurrentCamera\n\nlocal clock = os.clock\nlocal random = math.random\nlocal huge = math.huge\nlocal v2new = Vector2.new\nlocal v3new = Vector3.new\nlocal v3zero = Vector3.zero\n\nlocal Config = {\n    Enabled = false,\n    Range = 20,\n    Delay = 0.5,\n    SendMode = \"逐个发送\",\n    PerTargetDelay = 0.03,\n    WalkSpeed = 16,\n    MaxWalkSpeed = 35,\n    Noclip = false,\n    Silent = {\n        Enabled = false, LockMode = \"Crosshair\", MaxDistance = 500,\n        VisibleCheck = false, FOVRadius = 200, FOVScale = 1.0,\n        Wallbang = true, BlacklistedNames = {},\n        NPCCacheRefreshInterval = 0.5, TargetScanInterval = 1/30, VisibilityCacheTime = 0.15\n    },\n    ESP = {\n        Enabled = false, OutlineColor = Color3.fromRGB(255, 255, 255),\n        FillTransparency = 0.5, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,\n        MovementThreshold = 0.3, MovementCheckInterval = 0.1,\n        PendingCheckBatch = 1000, StaticTimeout = nil,\n        Types = {\n            Enemy = {Color = Color3.fromRGB(255, 0, 0), Keywords = {\"enemy\", \"hostile\", \"guard\", \"soldier\", \"bandit\", \"raider\", \"zombie\", \"monster\", \"bot\", \"drone\", \"turret\"}},\n            Hostage = {Color = Color3.fromRGB(0, 255, 0), Keywords = {\"hostage\", \"civilian\", \"victim\", \"prisoner\", \"captive\"}},\n            Friendly = {Color = Color3.fromRGB(0, 150, 255), Keywords = {\"friendly\", \"ally\", \"teammate\", \"squad\", \"partner\"}},\n            Neutral = {Color = Color3.fromRGB(255, 255, 0), Keywords = {\"neutral\", \"trader\", \"merchant\", \"villager\", \"npc\", \"animal\", \"creature\", \"dog\", \"cat\"}},\n            Corpse = {Color = Color3.fromRGB(128, 128, 128), Keywords = {}}\n        }\n    }\n}\n\nlocal function GetBat()\n    local char = LocalPlayer.Character\n    if not char then return nil end\n    return char:FindFirstChild(\"Bat\")\nend\n\nlocal function GetTargetPosition(model)\n    if model.PrimaryPart then return model.PrimaryPart.Position end\n    local part = model:FindFirstChild(\"HumanoidRootPart\") or model:FindFirstChild(\"Head\") or model:FindFirstChild(\"MainPart\")\n    if part then return part.Position end\n    for _, child in ipairs(model:GetChildren()) do\n        if child:IsA(\"BasePart\") then return child.Position end\n    end\n    return nil\nend\n\nlocal HealthAttrNames = {\"Health\", \"HP\", \"health\", \"hp\", \"Durability\", \"Integrity\", \"Hitpoints\", \"CurrentHealth\", \"currentHealth\"}\nlocal HealthValueNames = {\"health\", \"hp\", \"healthvalue\", \"durability\", \"integrity\", \"currenthealth\"}\n\nlocal function HasHealth(model)\n    local hum = model:FindFirstChildOfClass(\"Humanoid\")\n    if hum and hum.Health > 0 then return true end\n    for _, attrName in ipairs(HealthAttrNames) do\n        local val = model:GetAttribute(attrName)\n        if type(val) == \"number\" and val > 0 then return true end\n    end\n    for _, child in ipairs(model:GetChildren()) do\n        if child:IsA(\"NumberValue\") or child:IsA(\"IntValue\") then\n            local n = string.lower(child.Name)\n            for _, validName in ipairs(HealthValueNames) do\n                if n == validName and child.Value > 0 then return true end\n            end\n        end\n    end\n    return false\nend\n\nlocal function IsValidTarget(model)\n    if not model:IsA(\"Model\") then return false end\n    if model == LocalPlayer.Character then return false end\n    if LocalPlayer.Character and model:IsDescendantOf(LocalPlayer.Character) then return false end\n    if model:IsDescendantOf(LocalPlayer) then return false end\n    if Players:GetPlayerFromCharacter(model) then return false end\n    for _, player in ipairs(Players:GetPlayers()) do\n        if player.Character and (model == player.Character or model:IsDescendantOf(player.Character)) then\n            return false\n        end\n    end\n    if not model.Parent then return false end\n    if not HasHealth(model) then return false end\n    local pos = GetTargetPosition(model)\n    if not pos then return false end\n    return true, pos\nend\n\nlocal function GetAllTargets()\n    local seen, list = {}, {}\n    for _, obj in ipairs(workspace:GetDescendants()) do\n        if not seen[obj] then\n            seen[obj] = true\n            local isValid, pos = IsValidTarget(obj)\n            if isValid then table.insert(list, {model = obj, pos = pos}) end\n        end\n    end\n    return list\nend\n\nlocal function ModifyWeaponRange()\n    local bat = GetBat()\n    if not bat then return end\n    for _, v in ipairs(bat:GetDescendants()) do\n        if v:IsA(\"NumberValue\") and (string.find(string.lower(v.Name), \"range\") or string.find(string.lower(v.Name), \"hit\")) then\n            v.Value = 9999\n        end\n    end\nend\n\nlocal function ApplySpeed()\n    local char = LocalPlayer.Character\n    local hum = char and char:FindFirstChildOfClass(\"Humanoid\")\n    if hum then hum.WalkSpeed = Config.WalkSpeed end\nend\n\nlocal function ApplyNoclip()\n    if not Config.Noclip then return end\n    local char = LocalPlayer.Character\n    if not char then return end\n    for _, v in ipairs(char:GetDescendants()) do\n        if v:IsA(\"BasePart\") and v.CanCollide then v.CanCollide = false end\n    end\nend\n\nlocal AttackLoop = function()\n    while Config.Enabled and CoreGui:FindFirstChild(\"ModernToolUI\") do\n        local char = LocalPlayer.Character\n        local hrp = char and char:FindFirstChild(\"HumanoidRootPart\")\n        local bat = GetBat()\n        if char and hrp and bat then\n            local swing = bat:FindFirstChild(\"Swing\")\n            local hitTargets = bat:FindFirstChild(\"HitTargets\")\n            if swing and hitTargets then\n                local allTargets = GetAllTargets()\n                local targets = {}\n                for _, data in ipairs(allTargets) do\n                    if (data.pos - hrp.Position).Magnitude <= Config.Range then\n                        table.insert(targets, data.model)\n                    end\n                end\n                if #targets > 0 then\n                    if Config.SendMode == \"逐个发送\" then\n                        for _, target in ipairs(targets) do\n                            if target and target.Parent then\n                                swing:FireServer()\n                                task.wait(Config.PerTargetDelay)\n                                hitTargets:FireServer({target})\n                                task.wait(Config.PerTargetDelay)\n                            end\n                        end\n                    else\n                        swing:FireServer()\n                        hitTargets:FireServer(targets)\n                    end\n                    if _G.KA_StatusLabel then _G.KA_StatusLabel.Text = \"目标: \" .. #targets end\n                else\n                    if _G.KA_StatusLabel then _G.KA_StatusLabel.Text = \"目标: 0\" end\n                end\n            end\n        end\n        task.wait(Config.Delay)\n    end\nend\n\nlocal currentTargetPart, lockedPart = nil, nil\nlocal lastTargetScan, lastReconcile, lastBlacklistRebuild = 0, 0, 0\nlocal blacklistSet, playerChars, npcEntries, entryByModel, pendingModels = {}, {}, {}, {}, {}\n\nlocal function rebuildBlacklist()\n    for k in pairs(blacklistSet) do blacklistSet[k] = nil end\n    for i = 1, #Config.Silent.BlacklistedNames do blacklistSet[Config.Silent.BlacklistedNames[i]] = true end\nend\nrebuildBlacklist()\n\nlocal function addPlayerChar(char) if char then playerChars[char] = true end end\nlocal function removePlayerChar(char) if char then playerChars[char] = nil end end\n\nfor _, plr in ipairs(Players:GetPlayers()) do\n    addPlayerChar(plr.Character)\n    plr.CharacterAdded:Connect(addPlayerChar)\n    plr.CharacterRemoving:Connect(removePlayerChar)\nend\nPlayers.PlayerAdded:Connect(function(plr)\n    addPlayerChar(plr.Character)\n    plr.CharacterAdded:Connect(addPlayerChar)\n    plr.CharacterRemoving:Connect(removePlayerChar)\nend)\n\nlocal function addEntry(model, hum, root)\n    if entryByModel[model] then return end\n    entryByModel[model] = {model = model, humanoid = hum, root = root, head = model:FindFirstChild(\"Head\")}\n    table.insert(npcEntries, entryByModel[model])\nend\n\nlocal function removeEntry(model)\n    local entry = entryByModel[model]\n    if not entry then return end\n    entryByModel[model] = nil\n    for i, e in ipairs(npcEntries) do\n        if e == entry then table.remove(npcEntries, i); break end\n    end\nend\n\nlocal function tryAddNPC(model)\n    if not model:IsA(\"Model\") or entryByModel[model] or playerChars[model] or blacklistSet[model.Name] then return end\n    local hum, root = model:FindFirstChildOfClass(\"Humanoid\"), model:FindFirstChild(\"HumanoidRootPart\")\n    if hum and root then addEntry(model, hum, root); return end\n    if pendingModels[model] then return end\n    pendingModels[model] = true\n    local conn\n    conn = model.ChildAdded:Connect(function()\n        if entryByModel[model] then\n            if conn.Connected then conn:Disconnect() end\n            pendingModels[model] = nil; return\n        end\n        local h, r = model:FindFirstChildOfClass(\"Humanoid\"), model:FindFirstChild(\"HumanoidRootPart\")\n        if h and r then\n            addEntry(model, h, r)\n            if conn.Connected then conn:Disconnect() end\n            pendingModels[model] = nil\n        end\n    end)\nend\n\ndo\n    for _, d in ipairs(workspace:GetDescendants()) do\n        if d:IsA(\"Model\") then tryAddNPC(d) end\n    end\nend\nworkspace.DescendantAdded:Connect(function(d) if d:IsA(\"Model\") then tryAddNPC(d) end end)\nworkspace.DescendantRemoving:Connect(function(d) if d:IsA(\"Model\") then removeEntry(d) end end)\n\nlocal function reconcile()\n    local now = clock()\n    if now - lastReconcile < 3 then return end\n    lastReconcile = now\n    for i = #npcEntries, 1, -1 do\n        local e = npcEntries[i]\n        if not e.model.Parent or not e.humanoid.Parent or e.humanoid.Health <= 0 then removeEntry(e.model) end\n    end\n    for _, plr in ipairs(Players:GetPlayers()) do\n        if plr ~= LocalPlayer and plr.Character then playerChars[plr.Character] = true end\n    end\nend\n\nlocal screenCenter, lastViewport = v2new(0, 0), v2new(0, 0)\nlocal function updateScreenCenter()\n    local vs = Camera.ViewportSize\n    if vs ~= lastViewport then lastViewport = vs; screenCenter = v2new(vs.X * 0.5, vs.Y * 0.5) end\nend\nupdateScreenCenter()\nworkspace:GetPropertyChangedSignal(\"CurrentCamera\"):Connect(function()\n    Camera = workspace.CurrentCamera; lastViewport = v2new(0, 0); updateScreenCenter()\nend)\n\nlocal visCacheTime, visCacheResult = setmetatable({}, {__mode = \"k\"}), setmetatable({}, {__mode = \"k\"})\nlocal visIgnore = {nil, nil}\nlocal function checkVisible(part, camPos, now)\n    local t = visCacheTime[part]\n    if t and now - t < Config.Silent.VisibilityCacheTime then return visCacheResult[part] end\n    visIgnore[1], visIgnore[2] = LocalPlayer.Character, part.Parent\n    local hit = workspace:FindPartOnRayWithIgnoreList(Ray.new(camPos, part.Position - camPos), visIgnore)\n    local visible = (hit == nil)\n    visCacheTime[part], visCacheResult[part] = now, visible\n    return visible\nend\n\nlocal boxLines = {}\nfor i = 1, 4 do\n    local line = Drawing.new(\"Line\")\n    line.Thickness, line.Color, line.Transparency, line.Visible, line.ZIndex = 2, Color3.fromRGB(255, 255, 255), 0.5, false, 999\n    boxLines[i] = line\nend\n\nlocal function hideBox()\n    for i = 1, 4 do if boxLines[i].Visible then boxLines[i].Visible = false end end\nend\n\nlocal function updateBox(part)\n    if not part or not part.Parent then hideBox() return end\n    local char = part.Parent\n    local head, root = char:FindFirstChild(\"Head\"), char:FindFirstChild(\"HumanoidRootPart\")\n    if not head or not root then hideBox() return end\n    local topScreen, topOn = Camera:WorldToViewportPoint(head.Position + v3new(0, 0.5, 0))\n    local bottomScreen, bottomOn = Camera:WorldToViewportPoint(root.Position - v3new(0, 2.5, 0))\n    if not (topOn and bottomOn) then hideBox() return end\n    local height = bottomScreen.Y - topScreen.Y\n    if height <= 0 then hideBox() return end\n    local width = height * 0.6\n    local centerX = (topScreen.X + bottomScreen.X) * 0.5\n    local left, right, top, bottom = centerX - width * 0.5, centerX + width * 0.5, topScreen.Y, bottomScreen.Y\n    boxLines[1].From, boxLines[1].To = v2new(left, top), v2new(right, top)\n    boxLines[2].From, boxLines[2].To = v2new(right, top), v2new(right, bottom)\n    boxLines[3].From, boxLines[3].To = v2new(right, bottom), v2new(left, bottom)\n    boxLines[4].From, boxLines[4].To = v2new(left, bottom), v2new(left, top)\n    for i = 1, 4 do if not boxLines[i].Visible then boxLines[i].Visible = true end end\nend\n\nlocal function updateTarget()\n    if not Config.Silent.Enabled then\n        if lockedPart then lockedPart, currentTargetPart = nil, nil end\n        hideBox(); return\n    end\n    local now = clock()\n    if now - lastTargetScan < Config.Silent.TargetScanInterval then return end\n    lastTargetScan = now\n    if now - lastBlacklistRebuild > 1 then lastBlacklistRebuild = now; rebuildBlacklist() end\n\n    local camPos, fovCenter = Camera.CFrame.Position, screenCenter\n    local fovRSq, maxDistSq = Config.Silent.FOVRadius^2, Config.Silent.MaxDistance^2\n    local visCheck, w2v, lockMode = Config.Silent.VisibleCheck, Camera.WorldToViewportPoint, Config.Silent.LockMode\n    local bestPart, bestScore, hasLock = nil, huge, false\n\n    if lockedPart and lockedPart.Parent then\n        local entry = entryByModel[lockedPart.Parent]\n        if entry and entry.humanoid.Health > 0 then\n            local sp, onScreen = w2v(Camera, lockedPart.Position)\n            if onScreen then\n                local fovSq = (sp.X - fovCenter.X)^2 + (sp.Y - fovCenter.Y)^2\n                if fovSq <= fovRSq then\n                    bestPart = lockedPart\n                    bestScore = (lockMode == \"Crosshair\") and fovSq or (lockedPart.Position - camPos).Magnitude\n                    hasLock = true\n                end\n            end\n        end\n    end\n\n    for i = 1, #npcEntries do\n        local entry = npcEntries[i]\n        if entry.humanoid.Health > 0 and not blacklistSet[entry.model.Name] then\n            local part = entry.head or entry.root\n            if part and part.Parent then\n                local pp = part.Position\n                local distSq = (pp.X - camPos.X)^2 + (pp.Y - camPos.Y)^2 + (pp.Z - camPos.Z)^2\n                if distSq <= maxDistSq then\n                    local sp, onScreen = w2v(Camera, pp)\n                    if onScreen then\n                        local fovSq = (sp.X - fovCenter.X)^2 + (sp.Y - fovCenter.Y)^2\n                        if fovSq <= fovRSq and ((not visCheck) or checkVisible(part, camPos, now)) then\n                            local score = (lockMode == \"Crosshair\") and fovSq or math.sqrt(distSq)\n                            if (hasLock and score < bestScore * 0.7) or (not hasLock and score < bestScore) then\n                                bestPart, bestScore, hasLock = part, score, false\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if bestPart ~= lockedPart then lockedPart, currentTargetPart = bestPart, bestPart end\n    if lockedPart then updateBox(lockedPart) else hideBox() end\nend\n\nlocal CONTROL_SCRIPTS = {ControlScript = true, ControlModule = true}\nlocal controlCache = setmetatable({}, {__mode = \"k\"})\nlocal function isControlScript(s)\n    if not s then return false end\n    local c = controlCache[s]\n    if c ~= nil then return c end\n    local result = CONTROL_SCRIPTS[tostring(s)] == true\n    controlCache[s] = result\n    return result\nend\n\nlocal oldNamecall\noldNamecall = hookmetamethod(game, \"__namecall\", newcclosure(function(...)\n    local self, Method = ..., getnamecallmethod()\n    if Method ~= \"ScreenPointToRay\" or checkcaller() or isControlScript(getcallingscript()) then return oldNamecall(...) end\n    if Config.Silent.Enabled and currentTargetPart then\n        local origin = Camera.CFrame.Position\n        local direction = CFrame.lookAt(origin, currentTargetPart.Position)\n        local depth = select(3, ...)\n        return Ray.new(origin + (depth and direction.LookVector * depth or v3zero), direction.LookVector)\n    end\n    return oldNamecall(...)\nend))\n\nlocal ESP = {pending = {}, pendingList = {}, watchedHumanoids = {}, lastCheckTime = 0}\nlocal TAG_NAME = \"Bodycam_B\"\nlocal espConfig = Config.ESP\n\nfunction ESP:IsNPCCandidate(model)\n    return model:IsA(\"Model\") and not Players:GetPlayerFromCharacter(model) and model:FindFirstChildWhichIsA(\"BasePart\", true)\nend\n\nfunction ESP:GetNPCType(model)\n    local humanoid = model:FindFirstChildOfClass(\"Humanoid\")\n    if humanoid and humanoid.Health <= 0 then return \"Corpse\" end\n    local attrType = model:GetAttribute(\"NPCType\")\n    if attrType and espConfig.Types[attrType] then return attrType end\n    for typeName, _ in pairs(espConfig.Types) do if CollectionService:HasTag(model, typeName) then return typeName end end\n    local name = model.Name:lower()\n    for typeName, typeData in pairs(espConfig.Types) do\n        for _, keyword in ipairs(typeData.Keywords) do\n            if name:find(keyword, 1, true) then return typeName end\n        end\n    end\n    return \"Enemy\"\nend\n\nfunction ESP:RegisterPending(model)\n    if not self:IsNPCCandidate(model) or model:FindFirstChild(\"ESP_Object\") or self.pending[model] then return end\n    local pos = model:GetPivot().Position\n    if not pos then return end\n    self.pending[model] = {startPos = pos, startTime = clock()}\n    table.insert(self.pendingList, model)\nend\n\nfunction ESP:Apply(model)\n    if not model.Parent or model:FindFirstChild(\"ESP_Object\") then return end\n    local npcType = self:GetNPCType(model)\n    local typeConfig = espConfig.Types[npcType] or espConfig.Types.Enemy\n    local highlight = Instance.new(\"Highlight\")\n    highlight.Name, highlight.FillColor, highlight.OutlineColor = \"ESP_Object\", typeConfig.Color, espConfig.OutlineColor\n    highlight.FillTransparency, highlight.DepthMode, highlight.Adornee = espConfig.FillTransparency, espConfig.DepthMode, model\n    highlight.Parent = model\n    local hum = model:FindFirstChildOfClass(\"Humanoid\")\n    if hum and not self.watchedHumanoids[hum] then\n        self.watchedHumanoids[hum] = true\n        hum.Died:Connect(function()\n            task.defer(function()\n                local h = model:FindFirstChild(\"ESP_Object\")\n                if h then h.FillColor = espConfig.Types.Corpse.Color end\n            end)\n        end)\n    end\n    self.pending[model] = nil\nend\n\nfunction ESP:CheckMovement()\n    if not espConfig.Enabled then return end\n    local now = clock()\n    if now - self.lastCheckTime < espConfig.MovementCheckInterval then return end\n    self.lastCheckTime = now\n    if #self.pendingList == 0 then return end\n    local newList, checked = {}, 0\n    for i = 1, #self.pendingList do\n        local model, data = self.pendingList[i], self.pending[self.pendingList[i]]\n        if data and model.Parent then\n            if checked >= espConfig.PendingCheckBatch then\n                table.insert(newList, model)\n            else\n                checked += 1\n                local pos = model:GetPivot().Position\n                if pos and (pos - data.startPos).Magnitude > espConfig.MovementThreshold then\n                    self.pending[model] = nil; self:Apply(model)\n                elseif not espConfig.StaticTimeout or (now - data.startTime) <= espConfig.StaticTimeout then\n                    table.insert(newList, model)\n                else self.pending[model] = nil end\n            end\n        end\n    end\n    self.pendingList = newList\nend\n\ntask.spawn(function()\n    for _, obj in ipairs(workspace:GetDescendants()) do\n        if obj:IsA(\"Model\") then ESP:RegisterPending(obj) end\n    end\nend)\nworkspace.DescendantAdded:Connect(function(desc)\n    if desc:IsA(\"Model\") then task.spawn(function() ESP:RegisterPending(desc) end) end\nend)\n\nRunService.Heartbeat:Connect(function() ESP:CheckMovement() end)\nRunService.Stepped:Connect(ApplyNoclip)\nRunService.RenderStepped:Connect(function()\n    updateScreenCenter(); reconcile(); updateTarget(); ApplySpeed()\n    if not Config.Silent.Enabled then hideBox() end\nend)\n\nlocal ScreenGui = Instance.new(\"ScreenGui\")\nScreenGui.Name = \"ModernToolUI\"\nScreenGui.ResetOnSpawn = false\nScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling\npcall(function() ScreenGui.Parent = CoreGui end)\nif not ScreenGui.Parent then ScreenGui.Parent = PlayerGui end\n\nlocal Theme = {\n    Bg = Color3.fromRGB(22, 22, 26),\n    Panel = Color3.fromRGB(30, 30, 36),\n    Element = Color3.fromRGB(42, 42, 50),\n    ElementHover = Color3.fromRGB(52, 52, 62),\n    Text = Color3.fromRGB(240, 240, 245),\n    SubText = Color3.fromRGB(150, 150, 160),\n    Accent = Color3.fromRGB(90, 110, 245),\n    AccentDark = Color3.fromRGB(70, 85, 200),\n    Success = Color3.fromRGB(60, 180, 100),\n    Danger = Color3.fromRGB(220, 70, 70),\n    Stroke = Color3.fromRGB(55, 55, 65)\n}\n\nlocal FloatingButton = Instance.new(\"TextButton\")\nFloatingButton.Name = \"FloatingButton\"\nFloatingButton.Size = UDim2.fromOffset(50, 50)\nFloatingButton.Position = UDim2.new(0, 40, 0.5, -25)\nFloatingButton.BackgroundColor3 = Theme.Accent\nFloatingButton.Text = \"T\"\nFloatingButton.TextColor3 = Theme.Text\nFloatingButton.Font = Enum.Font.GothamBold\nFloatingButton.TextSize = 20\nFloatingButton.AutoButtonColor = false\nFloatingButton.Active = true\nFloatingButton.Parent = ScreenGui\n\nInstance.new(\"UICorner\", FloatingButton).CornerRadius = UDim.new(1, 0)\nlocal FB_Stroke = Instance.new(\"UIStroke\", FloatingButton)\nFB_Stroke.Color = Theme.Stroke\nFB_Stroke.Thickness = 2\nlocal FB_Gradient = Instance.new(\"UIGradient\", FloatingButton)\nFB_Gradient.Color = ColorSequence.new(Theme.Accent, Theme.AccentDark)\nFB_Gradient.Rotation = 90\n\nlocal MainFrame = Instance.new(\"Frame\")\nMainFrame.Name = \"MainFrame\"\nMainFrame.Size = UDim2.fromOffset(300, 480)\nMainFrame.Position = UDim2.new(0, 100, 0.5, -240)\nMainFrame.BackgroundColor3 = Theme.Bg\nMainFrame.BorderSizePixel = 0\nMainFrame.Active = true\nMainFrame.Draggable = true\nMainFrame.Visible = false\nMainFrame.Parent = ScreenGui\n\nInstance.new(\"UICorner\", MainFrame).CornerRadius = UDim.new(0, 12)\nlocal Main_Stroke = Instance.new(\"UIStroke\", MainFrame)\nMain_Stroke.Color = Theme.Stroke\nMain_Stroke.Thickness = 1.5\nlocal Main_Gradient = Instance.new(\"UIGradient\", MainFrame)\nMain_Gradient.Color = ColorSequence.new(Color3.fromRGB(35, 35, 42), Color3.fromRGB(22, 22, 26))\nMain_Gradient.Rotation = 90\n\nlocal TitleBar = Instance.new(\"Frame\")\nTitleBar.Size = UDim2.new(1, 0, 0, 40)\nTitleBar.BackgroundTransparency = 1\nTitleBar.Parent = MainFrame\n\nlocal TitleText = Instance.new(\"TextLabel\")\nTitleText.Size = UDim2.new(1, -80, 1, 0)\nTitleText.Position = UDim2.new(0, 15, 0, 0)\nTitleText.BackgroundTransparency = 1\nTitleText.Text = \"EXPLOIT MENU\"\nTitleText.TextColor3 = Theme.Text\nTitleText.Font = Enum.Font.GothamBold\nTitleText.TextSize = 14\nTitleText.TextXAlignment = Enum.TextXAlignment.Left\nTitleText.Parent = TitleBar\n\nlocal MinBtn = Instance.new(\"TextButton\")\nMinBtn.Size = UDim2.fromOffset(28, 28)\nMinBtn.Position = UDim2.new(1, -70, 0.5, -14)\nMinBtn.BackgroundColor3 = Theme.Element\nMinBtn.Text = \"-\"\nMinBtn.TextColor3 = Theme.Text\nMinBtn.Font = Enum.Font.GothamBold\nMinBtn.TextSize = 16\nMinBtn.AutoButtonColor = false\nMinBtn.Parent = TitleBar\nInstance.new(\"UICorner\", MinBtn).CornerRadius = UDim.new(0, 6)\n\nlocal CloseBtn = Instance.new(\"TextButton\")\nCloseBtn.Size = UDim2.fromOffset(28, 28)\nCloseBtn.Position = UDim2.new(1, -35, 0.5, -14)\nCloseBtn.BackgroundColor3 = Theme.Danger\nCloseBtn.Text = \"X\"\nCloseBtn.TextColor3 = Theme.Text\nCloseBtn.Font = Enum.Font.GothamBold\nCloseBtn.TextSize = 12\nCloseBtn.AutoButtonColor = false\nCloseBtn.Parent = TitleBar\nInstance.new(\"UICorner\", CloseBtn).CornerRadius = UDim.new(0, 6)\n\nlocal Divider = Instance.new(\"Frame\")\nDivider.Size = UDim2.new(1, -30, 0, 1)\nDivider.Position = UDim2.new(0, 15, 0, 40)\nDivider.BackgroundColor3 = Theme.Stroke\nDivider.BorderSizePixel = 0\nDivider.Parent = MainFrame\n\nlocal Scroll = Instance.new(\"ScrollingFrame\")\nScroll.Size = UDim2.new(1, -20, 1, -60)\nScroll.Position = UDim2.new(0, 10, 0, 50)\nScroll.BackgroundTransparency = 1\nScroll.BorderSizePixel = 0\nScroll.ScrollBarThickness = 3\nScroll.ScrollBarImageColor3 = Theme.Accent\nScroll.CanvasSize = UDim2.new(0, 0, 0, 0)\nScroll.Parent = MainFrame\n\nlocal Layout = Instance.new(\"UIListLayout\", Scroll)\nLayout.Padding = UDim.new(0, 8)\nLayout.SortOrder = Enum.SortOrder.LayoutOrder\n\nlocal Padding = Instance.new(\"UIPadding\", Scroll)\nPadding.PaddingTop = UDim.new(0, 5)\nPadding.PaddingBottom = UDim.new(0, 10)\n\nLayout:GetPropertyChangedSignal(\"AbsoluteContentSize\"):Connect(function()\n    Scroll.CanvasSize = UDim2.new(0, 0, 0, Layout.AbsoluteContentSize.Y + 20)\nend)\n\nlocal function CreateSection(title, order)\n    local frame = Instance.new(\"Frame\")\n    frame.Size = UDim2.new(1, 0, 0, 24)\n    frame.BackgroundTransparency = 1\n    frame.LayoutOrder = order\n    frame.Parent = Scroll\n    local label = Instance.new(\"TextLabel\")\n    label.Size = UDim2.new(1, 0, 1, 0)\n    label.BackgroundTransparency = 1\n    label.Text = title:upper()\n    label.TextColor3 = Theme.Accent\n    label.Font = Enum.Font.GothamBold\n    label.TextSize = 11\n    label.TextXAlignment = Enum.TextXAlignment.Left\n    label.Parent = frame\nend\n\nlocal function CreateToggle(text, order, defaultState, callback)\n    local btn = Instance.new(\"TextButton\")\n    btn.Size = UDim2.new(1, 0, 0, 32)\n    btn.BackgroundColor3 = Theme.Element\n    btn.Text = \"\"\n    btn.AutoButtonColor = false\n    btn.LayoutOrder = order\n    btn.Parent = Scroll\n    Instance.new(\"UICorner\", btn).CornerRadius = UDim.new(0, 6)\n    local stroke = Instance.new(\"UIStroke\", btn)\n    stroke.Color = Theme.Stroke\n    stroke.Thickness = 1\n\n    local label = Instance.new(\"TextLabel\")\n    label.Size = UDim2.new(1, -60, 1, 0)\n    label.Position = UDim2.new(0, 12, 0, 0)\n    label.BackgroundTransparency = 1\n    label.Text = text\n    label.TextColor3 = Theme.Text\n    label.Font = Enum.Font.GothamMedium\n    label.TextSize = 13\n    label.TextXAlignment = Enum.TextXAlignment.Left\n    label.Parent = btn\n\n    local indicator = Instance.new(\"Frame\")\n    indicator.Size = UDim2.fromOffset(36, 18)\n    indicator.Position = UDim2.new(1, -48, 0.5, -9)\n    indicator.BackgroundColor3 = defaultState and Theme.Success or Color3.fromRGB(60, 60, 70)\n    indicator.Parent = btn\n    Instance.new(\"UICorner\", indicator).CornerRadius = UDim.new(1, 0)\n\n    local dot = Instance.new(\"Frame\")\n    dot.Size = UDim2.fromOffset(14, 14)\n    dot.Position = defaultState and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7)\n    dot.BackgroundColor3 = Theme.Text\n    dot.Parent = indicator\n    Instance.new(\"UICorner\", dot).CornerRadius = UDim.new(1, 0)\n\n    local state = defaultState\n    btn.MouseButton1Click:Connect(function()\n        state = not state\n        indicator.BackgroundColor3 = state and Theme.Success or Color3.fromRGB(60, 60, 70)\n        TweenService:Create(dot, TweenInfo.new(0.15), {Position = state and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7)}):Play()\n        callback(state)\n    end)\nend\n\nlocal function CreateSlider(text, order, default, min, max, step, isFloat, callback)\n    local frame = Instance.new(\"Frame\")\n    frame.Size = UDim2.new(1, 0, 0, 50)\n    frame.BackgroundColor3 = Theme.Element\n    frame.LayoutOrder = order\n    frame.Parent = Scroll\n    Instance.new(\"UICorner\", frame).CornerRadius = UDim.new(0, 6)\n    local stroke = Instance.new(\"UIStroke\", frame)\n    stroke.Color = Theme.Stroke\n    stroke.Thickness = 1\n\n    local label = Instance.new(\"TextLabel\")\n    label.Size = UDim2.new(1, -100, 0, 20)\n    label.Position = UDim2.new(0, 12, 0, 4)\n    label.BackgroundTransparency = 1\n    label.Text = text\n    label.TextColor3 = Theme.SubText\n    label.Font = Enum.Font.GothamMedium\n    label.TextSize = 12\n    label.TextXAlignment = Enum.TextXAlignment.Left\n    label.Parent = frame\n\n    local valueLabel = Instance.new(\"TextLabel\")\n    valueLabel.Size = UDim2.new(0, 80, 0, 20)\n    valueLabel.Position = UDim2.new(1, -90, 0, 4)\n    valueLabel.BackgroundTransparency = 1\n    valueLabel.Text = isFloat and string.format(\"%.2f\", default) or tostring(default)\n    valueLabel.TextColor3 = Theme.Accent\n    valueLabel.Font = Enum.Font.GothamBold\n    valueLabel.TextSize = 13\n    valueLabel.TextXAlignment = Enum.TextXAlignment.Right\n    valueLabel.Parent = frame\n\n    local bar = Instance.new(\"Frame\")\n    bar.Size = UDim2.new(1, -24, 0, 6)\n    bar.Position = UDim2.new(0, 12, 0, 30)\n    bar.BackgroundColor3 = Color3.fromRGB(50, 50, 60)\n    bar.Parent = frame\n    Instance.new(\"UICorner\", bar).CornerRadius = UDim.new(1, 0)\n\n    local fill = Instance.new(\"Frame\")\n    fill.Size = UDim2.new(0, 0, 1, 0)\n    fill.BackgroundColor3 = Theme.Accent\n    fill.Parent = bar\n    Instance.new(\"UICorner\", fill).CornerRadius = UDim.new(1, 0)\n\n    local function updateUI(val)\n        val = math.clamp(val, min, max)\n        local alpha = (val - min) / (max - min)\n        fill.Size = UDim2.new(alpha, 0, 1, 0)\n        valueLabel.Text = isFloat and string.format(\"%.2f\", val) or tostring(val)\n        callback(val)\n    end\n\n    updateUI(default)\n\n    local dragging = false\n    bar.InputBegan:Connect(function(input)\n        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then\n            dragging = true\n        end\n    end)\n    bar.InputEnded:Connect(function(input)\n        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then\n            dragging = false\n        end\n    end)\n    UserInputService.InputChanged:Connect(function(input)\n        if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then\n            local mouseX = UserInputService:GetMouseLocation().X\n            local barAbsPos = bar.AbsolutePosition.X\n            local barAbsSize = bar.AbsoluteSize.X\n            local alpha = math.clamp((mouseX - barAbsPos) / barAbsSize, 0, 1)\n            local val = min + (max - min) * alpha\n            if not isFloat then val = math.floor(val) end\n            updateUI(val)\n        end\n    end)\nend\n\nlocal function CreateDropdown(text, order, options, default, callback)\n    local btn = Instance.new(\"TextButton\")\n    btn.Size = UDim2.new(1, 0, 0, 32)\n    btn.BackgroundColor3 = Theme.Element\n    btn.Text = \"\"\n    btn.AutoButtonColor = false\n    btn.LayoutOrder = order\n    btn.Parent = Scroll\n    Instance.new(\"UICorner\", btn).CornerRadius = UDim.new(0, 6)\n    local stroke = Instance.new(\"UIStroke\", btn)\n    stroke.Color = Theme.Stroke\n    stroke.Thickness = 1\n\n    local label = Instance.new(\"TextLabel\")\n    label.Size = UDim2.new(0.5, 0, 1, 0)\n    label.Position = UDim2.new(0, 12, 0, 0)\n    label.BackgroundTransparency = 1\n    label.Text = text\n    label.TextColor3 = Theme.Text\n    label.Font = Enum.Font.GothamMedium\n    label.TextSize = 13\n    label.TextXAlignment = Enum.TextXAlignment.Left\n    label.Parent = btn\n\n    local valueLabel = Instance.new(\"TextLabel\")\n    valueLabel.Size = UDim2.new(0.5, -12, 1, 0)\n    valueLabel.Position = UDim2.new(0.5, 0, 0, 0)\n    valueLabel.BackgroundTransparency = 1\n    valueLabel.Text = default\n    valueLabel.TextColor3 = Theme.Accent\n    valueLabel.Font = Enum.Font.GothamBold\n    valueLabel.TextSize = 13\n    valueLabel.TextXAlignment = Enum.TextXAlignment.Right\n    valueLabel.Parent = btn\n\n    local idx = table.find(options, default) or 1\n    btn.MouseButton1Click:Connect(function()\n        idx = (idx % #options) + 1\n        valueLabel.Text = options[idx]\n        callback(options[idx])\n    end)\nend\n\nCreateSection(\"Kill Aura\", 1)\nCreateToggle(\"Enable Kill Aura\", 2, Config.Enabled, function(v)\n    Config.Enabled = v\n    if v then\n        ModifyWeaponRange()\n        task.spawn(AttackLoop)\n    end\nend)\nCreateDropdown(\"发送模式\", 3, {\"逐个发送\", \"打包发送\"}, Config.SendMode, function(v)\n    Config.SendMode = v\nend)\nCreateSlider(\"Range\", 4, Config.Range, 1, 60, 1, false, function(v) Config.Range = v end)\nCreateSlider(\"Cooldown\", 5, Config.Delay, 0.1, 2.0, 0.05, true, function(v) Config.Delay = v end)\nCreateSlider(\"Per-Target Delay\", 6, Config.PerTargetDelay, 0.01, 0.2, 0.01, true, function(v) Config.PerTargetDelay = v end)\n\nlocal StatusLabel = Instance.new(\"TextLabel\")\nStatusLabel.Size = UDim2.new(1, 0, 0, 20)\nStatusLabel.BackgroundTransparency = 1\nStatusLabel.Text = \"目标: 0\"\nStatusLabel.TextColor3 = Theme.Success\nStatusLabel.TextSize = 12\nStatusLabel.Font = Enum.Font.Gotham\nStatusLabel.LayoutOrder = 7\nStatusLabel.Parent = Scroll\n_G.KA_StatusLabel = StatusLabel\n\nCreateSection(\"Silent Aim (NPC)\", 10)\nCreateToggle(\"Enable Silent Aim\", 11, Config.Silent.Enabled, function(v) Config.Silent.Enabled = v end)\nCreateDropdown(\"Lock Mode\", 12, {\"Crosshair\", \"Distance\"}, Config.Silent.LockMode, function(v) Config.Silent.LockMode = v end)\nCreateToggle(\"Visibility Check\", 13, Config.Silent.VisibleCheck, function(v) Config.Silent.VisibleCheck = v end)\nCreateSlider(\"FOV Radius\", 14, Config.Silent.FOVRadius, 10, 1000, 10, false, function(v) Config.Silent.FOVRadius = v end)\nCreateSlider(\"FOV Scale\", 15, Config.Silent.FOVScale, 0.5, 2.0, 0.1, true, function(v) Config.Silent.FOVScale = v end)\n\nCreateSection(\"NPC ESP\", 20)\nCreateToggle(\"Enable ESP\", 21, Config.ESP.Enabled, function(v) Config.ESP.Enabled = v end)\n\nCreateSection(\"Misc\", 30)\nCreateToggle(\"Noclip\", 31, Config.Noclip, function(v) Config.Noclip = v end)\nCreateSlider(\"WalkSpeed\", 32, Config.WalkSpeed, 16, Config.MaxWalkSpeed, 1, false, function(v)\n    Config.WalkSpeed = v\n    ApplySpeed()\nend)\n\nlocal isOpen = false\nlocal function ToggleUI()\n    isOpen = not isOpen\n    if isOpen then\n        FloatingButton.Visible = false\n        MainFrame.Visible = true\n        MainFrame.Size = UDim2.fromOffset(0, 0)\n        TweenService:Create(MainFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.fromOffset(300, 480)}):Play()\n    else\n        local tween = TweenService:Create(MainFrame, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {Size = UDim2.fromOffset(0, 0)})\n        tween:Play()\n        tween.Completed:Connect(function()\n            MainFrame.Visible = false\n            FloatingButton.Visible = true\n        end)\n    end\nend\n\nFloatingButton.MouseButton1Click:Connect(ToggleUI)\nMinBtn.MouseButton1Click:Connect(ToggleUI)\nCloseBtn.MouseButton1Click:Connect(function()\n    ScreenGui:Destroy()\n    for i = 1, 4 do boxLines[i]:Remove() end\nend)\n\nlocal draggingFB, fbDragStart, fbStartPos = false, nil, nil\nFloatingButton.InputBegan:Connect(function(input)\n    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then\n        draggingFB = true\n        fbDragStart = input.Position\n        fbStartPos = FloatingButton.Position\n    end\nend)\nFloatingButton.InputEnded:Connect(function(input)\n    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then\n        draggingFB = false\n    end\nend)\nUserInputService.InputChanged:Connect(function(input)\n    if draggingFB and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then\n        local delta = input.Position - fbDragStart\n        FloatingButton.Position = UDim2.new(\n            fbStartPos.X.Scale, fbStartPos.X.Offset + delta.X,\n            fbStartPos.Y.Scale, fbStartPos.Y.Offset + delta.Y\n        )\n    end\nend)\n\nLocalPlayer.CharacterAdded:Connect(function()\n    task.wait(1)\n    ApplySpeed()\nend)\n\ntask.spawn(function()\n    while ScreenGui.Parent do\n        ApplySpeed()\n        task.wait(1)\n    end\nend)"}