local lib = getgenv().Library local cfg = Configuration local win = lib.Open -- keybind widget still exists in the ui? local finding = 0 for _, d in ipairs(win.Gui:GetDescendants()) do if d.Name == "Keybind_Aim Lock Keybind" then finding += 1 end end print("aim lock keybind control in ui:", finding > 0) -- finder with no keybind: enable silent aim and point the camera at someone cfg.SilentAimRelated["Silent Aim Enabled"] = true local cam = workspace.CurrentCamera local old = cam.CameraType cam.CameraType = Enum.CameraType.Scriptable local target for _, p in ipairs(game:GetService("Players"):GetChildren()) do if p ~= game:GetService("Players").LocalPlayer and p.Character and p.Character:FindFirstChild("Head") and p.Character:FindFirstChild("HumanoidRootPart") then target = p end end local pos = target.Character.HumanoidRootPart.Position cam.CFrame = CFrame.lookAt(pos + Vector3.new(0, 3, 24), pos) task.wait(0.6) print("with silent aim enabled, target found:", tostring(cfg.TargetRelated["Current Target"] and cfg.TargetRelated["Current Target"].Name), "| hitpart:", tostring(cfg.TargetRelated["Current Target Hitpart"] and cfg.TargetRelated["Current Target Hitpart"].Name)) cfg.SilentAimRelated["Silent Aim Enabled"] = false task.wait(0.4) print("silent aim off -> target cleared:", tostring(cfg.TargetRelated["Current Target"] == nil)) -- aimlock still finds with only aim lock enabled, and the keybind drives held cfg.SilentAimRelated["Aim Lock Enabled"] = true task.wait(0.5) print("with only aim lock enabled, target found:", tostring(cfg.TargetRelated["Current Target"] ~= nil)) -- camera aimlock path (held via keybind callback) local before = cam.CFrame cfg.SilentAimRelated["Aim Lock Held"] = true task.wait(0.5) local after = cam.CFrame local yawBefore = select(2, before:ToOrientation()) local yawAfter = select(2, after:ToOrientation()) print(string.format("camera aimlock moved view: %s (yaw %.1f -> %.1f)", tostring(math.abs(yawAfter - yawBefore) > 0.001), math.deg(yawBefore), math.deg(yawAfter))) cfg.SilentAimRelated["Aim Lock Held"] = false cfg.SilentAimRelated["Aim Lock Enabled"] = false task.wait(0.2) -- aimlock type switch lib.Registry["Aim Lock Type"].Set("Camera") task.wait(0.1) print("aim lock type via menu:", cfg.SilentAimRelated["Aim Lock Type"]) lib.Registry["Aim Lock Type"].Set("Mouse") lib.Registry["Fill Transparency"].Set(60) task.wait(0.1) print("fill transparency via menu:", cfg.TargetRelated["FOV Circle Transparency"]) lib.Registry["Fill Transparency"].Set(25) cam.CameraType = old