--[[ https://discord.gg/DNbfshRhgq https://www.youtube.com/@its-skondo ]] getgenv().api = { key = { Keybind = Enum.KeyCode.Z }, gameid = game.PlaceId, } services = setmetatable({}, { __index = function(_, name) local cloneref = cloneref or function(obj) return obj end return cloneref(game:GetService(name)) end }) Players = services.Players RunService = services.RunService UserInputService = services.UserInputService function getvalues() plr = Players.LocalPlayer or Players.PlayerAdded:Wait() char = plr.Character or plr.CharacterAdded:Wait() hrp = char:WaitForChild("HumanoidRootPart") noid = char:FindFirstChildOfClass("Humanoid") mouse = plr:GetMouse() end; getvalues() do local customworkspace = Instance.new("Folder") customworkspace.Parent = game customworkspace.Name = "gg" end task.spawn(function() if char then plr.CharacterAdded:Connect(function() getvalues() end) end end) local target = nil local locked = false function findTarget() local camera = workspace.CurrentCamera local unitRay = camera:ScreenPointToRay(mouse.X, mouse.Y) local params = RaycastParams.new() params.FilterDescendantsInstances = { char } params.FilterType = Enum.RaycastFilterType.Exclude local result = workspace:Raycast(unitRay.Origin, unitRay.Direction * 500, params) if result and result.Instance then local model = result.Instance:FindFirstAncestorOfClass("Model") if model and model:FindFirstChild("Humanoid") and model ~= char then return model end end local closest = nil local minDist = math.huge for _, p in Players:GetPlayers() do if p ~= plr and p.Character and p.Character:FindFirstChild("Head") then local head = p.Character.Head local screenPos, onScreen = camera:WorldToViewportPoint(head.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(mouse.X, mouse.Y)).Magnitude if dist < minDist then minDist = dist closest = p.Character end end end end return closest end UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == api.key.Keybind then locked = not locked if locked then local targChar = findTarget() if targChar then target = targChar:WaitForChild("Head") else locked = false end else target = nil end end end) RunService.RenderStepped:Connect(function() if locked and target and target.Parent then local camera = workspace.CurrentCamera camera.CFrame = CFrame.new(camera.CFrame.Position, target.Position) end end)