Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Вопрос Как писать аим

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
1 Июл 2024
Сообщения
14
Реакции
0
всем привет кто умеет писать аимы посвятите меня просто нигде не могу найти гайды а на ютубе онли на английском просто хотелось бы больше пояснений а в английском я не так сильно шарю
 
всем привет кто умеет писать аимы посвятите меня просто нигде не могу найти гайды а на ютубе онли на английском просто хотелось бы больше пояснений а в английском я не так сильно шарю
руками братишка. берешь и пишешь ну или в крайняк у чата жпт попроси мб поможет
 
проси помощи у искусственного интеллекта. платно. он и код за тя напишет. а если бюджет ещё больше, чем подписка на ИИ - ищи индивидуального репетитора.
 
всем привет кто умеет писать аимы посвятите меня просто нигде не могу найти гайды а на ютубе онли на английском просто хотелось бы больше пояснений а в английском я не так сильно шарю
example:
Expand Collapse Copy
local Players = game:GetService("Players");

local Camera = workspace.CurrentCamera;
local LocalPlayer = Players.LocalPlayer;

local GetClosestPlayer = function(Range)
    local ClosestPlayer, ClosestDistance = nil, Range;

    for _, Player in Players:GetPlayers() do
        if (Player == LocalPlayer) then
            continue;
        end

        local Character = Player.Character;
        local Root = Character and Character:FindFirstChild("HumanoidRootPart");

        if (not Root) then
            continue;
        end

        local ScreenPos, OnScreen = Camera:WorldToViewportPoint(Root.Position);

        if (not OnScreen) then
            continue;
        end

        local Distance = (Vector2.new(ScreenPos.X, ScreenPos.Y) - Camera.ViewportSize / 2).Magnitude;

        if (Distance < ClosestDistance) then
            ClosestPlayer = Character;
            ClosestDistance = Distance;
        end
    end

    return ClosestPlayer;
end

for _, Object in getgc(false) do
    local Info = typeof(Object) == "function" and islclosure(Object) and debug.info(Object, "n");

    if (not Info) then
        continue;
    end

    if (Info == "BulletRaycast") then
        Old = hookfunction(Object, function(OriginPosition, LookVector, IgnoreList)
            local ClosestPlayer = GetClosestPlayer(1000);
            local HitPart = ClosestPlayer and ClosestPlayer:FindFirstChild("Head");

            if (HitPart) then
                LookVector = CFrame.lookAt(OriginPosition, HitPart.Position).LookVector * 10000;
            end

            return Old(OriginPosition, LookVector, IgnoreList);
        end)
    end
end
example2:
Expand Collapse Copy
-- // Variables
local players = game:GetService("Players");
local localPlayer = players.LocalPlayer;
local camera = workspace.CurrentCamera;

-- // Tables
local silentAim = {
    Enabled = true,
    HitPart = "Head",
    Fov = 1000,
};

-- // Functions
local function getTarget()
    local closest, closestHitpart = silentAim.Fov, nil;

    for index, player in players:GetPlayers() do

        if index == 1 or player.Team == localPlayer.Team then
            continue;
        end;

        if not player:FindFirstChild("NRPBS") or not player.Character then
            continue;
        end;

        if player.NRPBS.Health.Value < 0 then
            continue;
        end;

        local hitPart = player.Character:FindFirstChild(silentAim.HitPart);
        if not hitPart then
            continue;
        end;

        local screenPosition = camera:WorldToViewportPoint(hitPart.Position);
        if screenPosition.Z < 0 then
            continue;
        end;

        local distnace = (Vector2.new(screenPosition.X, screenPosition.Y) - camera.ViewportSize/2).Magnitude;
        if distnace < closest then
            closest = distnace;
            closestHitpart = hitPart;
        end;

    end;

    return closestHitpart;
end;

-- // Hooks
local oldIndex; oldIndex = hookmetamethod(game, "__index", newcclosure(function(self, index)
    if silentAim.Enabled and self == camera and index == "CoordinateFrame" and string.match(debug.info(3, "s"), "Client.Functions.Weapons") and debug.info(3, "n") ~= "RotCamera" then
        local hitPart = getTarget();
        if hitPart then
            return CFrame.new(camera.CFrame.Position, hitPart.Position);
        end;
    end;

    return oldIndex(self, index);
end));
 
example:
Expand Collapse Copy
local Players = game:GetService("Players");

local Camera = workspace.CurrentCamera;
local LocalPlayer = Players.LocalPlayer;

local GetClosestPlayer = function(Range)
    local ClosestPlayer, ClosestDistance = nil, Range;

    for _, Player in Players:GetPlayers() do
        if (Player == LocalPlayer) then
            continue;
        end

        local Character = Player.Character;
        local Root = Character and Character:FindFirstChild("HumanoidRootPart");

        if (not Root) then
            continue;
        end

        local ScreenPos, OnScreen = Camera:WorldToViewportPoint(Root.Position);

        if (not OnScreen) then
            continue;
        end

        local Distance = (Vector2.new(ScreenPos.X, ScreenPos.Y) - Camera.ViewportSize / 2).Magnitude;

        if (Distance < ClosestDistance) then
            ClosestPlayer = Character;
            ClosestDistance = Distance;
        end
    end

    return ClosestPlayer;
end

for _, Object in getgc(false) do
    local Info = typeof(Object) == "function" and islclosure(Object) and debug.info(Object, "n");

    if (not Info) then
        continue;
    end

    if (Info == "BulletRaycast") then
        Old = hookfunction(Object, function(OriginPosition, LookVector, IgnoreList)
            local ClosestPlayer = GetClosestPlayer(1000);
            local HitPart = ClosestPlayer and ClosestPlayer:FindFirstChild("Head");

            if (HitPart) then
                LookVector = CFrame.lookAt(OriginPosition, HitPart.Position).LookVector * 10000;
            end

            return Old(OriginPosition, LookVector, IgnoreList);
        end)
    end
end
example2:
Expand Collapse Copy
-- // Variables
local players = game:GetService("Players");
local localPlayer = players.LocalPlayer;
local camera = workspace.CurrentCamera;

-- // Tables
local silentAim = {
    Enabled = true,
    HitPart = "Head",
    Fov = 1000,
};

-- // Functions
local function getTarget()
    local closest, closestHitpart = silentAim.Fov, nil;

    for index, player in players:GetPlayers() do

        if index == 1 or player.Team == localPlayer.Team then
            continue;
        end;

        if not player:FindFirstChild("NRPBS") or not player.Character then
            continue;
        end;

        if player.NRPBS.Health.Value < 0 then
            continue;
        end;

        local hitPart = player.Character:FindFirstChild(silentAim.HitPart);
        if not hitPart then
            continue;
        end;

        local screenPosition = camera:WorldToViewportPoint(hitPart.Position);
        if screenPosition.Z < 0 then
            continue;
        end;

        local distnace = (Vector2.new(screenPosition.X, screenPosition.Y) - camera.ViewportSize/2).Magnitude;
        if distnace < closest then
            closest = distnace;
            closestHitpart = hitPart;
        end;

    end;

    return closestHitpart;
end;

-- // Hooks
local oldIndex; oldIndex = hookmetamethod(game, "__index", newcclosure(function(self, index)
    if silentAim.Enabled and self == camera and index == "CoordinateFrame" and string.match(debug.info(3, "s"), "Client.Functions.Weapons") and debug.info(3, "n") ~= "RotCamera" then
        local hitPart = getTarget();
        if hitPart then
            return CFrame.new(camera.CFrame.Position, hitPart.Position);
        end;
    end;

    return oldIndex(self, index);
end));
спасибо
 
Назад
Сверху Снизу