if _G.__JJS_CONN then for _,c in ipairs(_G.__JJS_CONN) do pcall(function() c:Disconnect() end) end end _G.__JJS_CONN = {} local CONN = _G.__JJS_CONN local function add(c) table.insert(CONN, c); return c end local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local VIM = game:GetService("VirtualInputManager") local LP = Players.LocalPlayer local DIST, HEIGHT = 16, 6 local LOCKTIME, MAXTIME = 1.8, 5 local KEY, THRESHOLD = Enum.KeyCode.R, 0.37 local LOCK_DELAY = 0.12 local locked, camTarget, lockStart, sawInSkill, savedType = false, nil, 0, false, nil local armed, selfPress, sawHigh, lastY = false, false, false, 0 local function pickTarget() local cam = workspace.CurrentCamera local camPos, look = cam.CFrame.Position, cam.CFrame.LookVector local best, bestAng = nil, math.rad(70) local chars = workspace:FindFirstChild("Characters") if not chars then return nil end for _, c in ipairs(chars:GetChildren()) do if c ~= LP.Character and c:IsA("Model") then local hrp = c:FindFirstChild("HumanoidRootPart") local hum = c:FindFirstChildOfClass("Humanoid") if hrp and hum and hum.Health > 0 then local ang = math.acos(math.clamp(look:Dot((hrp.Position - camPos).Unit), -1, 1)) if ang < bestAng then bestAng, best = ang, c end end end end return best end local function unlock() if not locked then return end locked, camTarget = false, nil local cam = workspace.CurrentCamera if cam and savedType then cam.CameraType = savedType end savedType = nil print("[LOCK] снято") end local function lockOn() if locked then return end local t = pickTarget() if not t then print("[LOCK] цель не найдена"); return end camTarget, locked, lockStart, sawInSkill = t, true, tick(), false local cam = workspace.CurrentCamera if cam.CameraType ~= Enum.CameraType.Scriptable then savedType = cam.CameraType end cam.CameraType = Enum.CameraType.Scriptable print("[LOCK] цель: " .. t.Name) end local function findCursor() local chars = workspace:FindFirstChild("Characters") if not chars then return nil end for _, c in ipairs(chars:GetChildren()) do local hrp = c:FindFirstChild("HumanoidRootPart") local r = hrp and hrp:FindFirstChild("Ratio") local b = r and r:FindFirstChild("Bar") local cu = b and b:FindFirstChild("Cursor") if cu then return cu end end end local function press() selfPress = true task.spawn(function() VIM:SendKeyEvent(true, KEY, false, game) task.wait(0.02) VIM:SendKeyEvent(false, KEY, false, game) end) task.delay(0.2, function() selfPress = false end) end add(UIS.InputBegan:Connect(function(i, gp) if gp then return end if i.KeyCode == Enum.KeyCode.One then task.delay(LOCK_DELAY, lockOn) end end)) add(UIS.InputBegan:Connect(function(i, gp) if gp or i.KeyCode ~= KEY or selfPress then return end armed, sawHigh = true, false print("[JJS] armed (R)") task.delay(3, function() armed = false end) end)) add(UIS.InputBegan:Connect(function(i, gp) if gp then return end if i.KeyCode == Enum.KeyCode.End then unlock() for _, c in ipairs(CONN) do pcall(function() c:Disconnect() end) end _G.__JJS_CONN = {}; print("[JJS] стоп (End)") elseif i.KeyCode == Enum.KeyCode.Up then THRESHOLD = math.clamp(THRESHOLD + 0.01, 0.05, 0.9); print(string.format("[JJS] THRESHOLD=%.2f", THRESHOLD)) elseif i.KeyCode == Enum.KeyCode.Down then THRESHOLD = math.clamp(THRESHOLD - 0.01, 0.05, 0.9); print(string.format("[JJS] THRESHOLD=%.2f", THRESHOLD)) end end)) add(RunService.RenderStepped:Connect(function(dt) if locked then if not camTarget or not camTarget.Parent then unlock() else local thrp = camTarget:FindFirstChild("HumanoidRootPart") local myHrp = LP.Character and LP.Character:FindFirstChild("HumanoidRootPart") if not thrp or not myHrp then unlock() else local d = thrp.Position - myHrp.Position d = Vector3.new(d.X, 0, d.Z) if d.Magnitude > 0.1 then d = d.Unit local cam = workspace.CurrentCamera local camPos = myHrp.Position - d * DIST + Vector3.new(0, HEIGHT, 0) cam.CFrame = cam.CFrame:Lerp(CFrame.lookAt(camPos, thrp.Position + Vector3.new(0, 1, 0)), math.clamp(dt * 10, 0, 1)) end local info = LP.Character and LP.Character:FindFirstChild("Info") local is = info and info:FindFirstChild("InSkill") if is and is:IsA("BoolValue") then if is.Value then sawInSkill = true elseif sawInSkill then unlock() end end if locked and tick() - lockStart > (sawInSkill and MAXTIME or LOCKTIME) then unlock() end end end end if armed then local cu = findCursor() if cu then local y = cu.Position.Y.Scale lastY = y if y > 0.55 then sawHigh = true end if sawHigh and y > 0.05 and y <= THRESHOLD then armed = false press() print(string.format("[JJS] 1 cursorY=%.3f", y)) end end end end)) local OUT = { ["rbxassetid://132640361437873"] = "1", ["rbxassetid://71814504662867"] = "2", ["rbxassetid://74763348702619"] = "1", } add(game.DescendantAdded:Connect(function(d) if d:IsA("Sound") and OUT[d.SoundId] then print("[JJS] " .. OUT[d.SoundId] .. string.format(" | cursorY=%.3f", lastY)) end end))