Silent Aim
Key Required Verified Patched

Silent Aim

Phantom ForcesLinemasterLinemaster 140.8K views 242 executesUpdated Oct 18, 2024
1.5/ 5(10 votes)
3730% Positive
Lua Script•125 lines (4269 chars)
--// cache the shared table
local shared;

--// services
local workspace = game:GetService("Workspace");
local players = game:GetService("Players");

--// instances
local camera = workspace.CurrentCamera;
local local_player = players.LocalPlayer;

--// main loop for getting the shared table
local nil_instances = getnilinstances();

for i = 1, #nil_instances do
    local instance = nil_instances[i];

    if instance.Name == "ClientLoader" then
        shared = getsenv(instance).shared; --// get the shared table of the client loader which includes the require function which we need
    end;
end;

--// game modules
local character_object = shared.require("CharacterObject");
local firearm_object = shared.require("FirearmObject");
local replication_interface = shared.require("ReplicationInterface");
local weapon_controller_interface = shared.require("WeaponControllerInterface");

--// get the entries table itself instead of calling getEntry everytime
local entries = debug.getupvalue(replication_interface.addEntry, 1);

--// classes
local combat_t = {}; do
    combat_t.get_closest_player = function()
        local radius = math.huge;
        local center = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2);
        local closest_player;
        local closest_torso;
        
        local all_players = players:GetPlayers();
        
        for i = 1, #all_players do
            local player = all_players[i];
            
            if player ~= local_player and player.Team ~= local_player.Team then
                local entry = entries[player];

                if not entry then
                    continue end;

                local third_person_object = entry:getThirdPersonObject();

                if not third_person_object then
                    continue end;
                
                local torso = third_person_object._torso;
                
                if not torso then
                    continue end;
                
                local screen_position, on_screen = camera:WorldToViewportPoint(torso.Position);
                
                if not on_screen then
                    continue end;
                
                local distance = (center - Vector2.new(screen_position.X, screen_position.Y)).Magnitude;
                
                if distance <= radius then
                    closest_player = player;
                    closest_torso = torso;
                    radius = distance;
                end;
            end;
        end;
        
        return closest_player, closest_torso;
    end;
end;

--// hook the fireRound function, used to change the direction cframe
local old_get_root_part = clonefunction(character_object.getRootPart);
local old_fire_round = clonefunction(firearm_object.fireRound);

--// useful
local is_spoofing = false;

--// save the old offsets in a table, so if you're not targeting it you can restore it
local old_offsets = {};

--// main hook
character_object.getRootPart = function(self)
    if debug.getinfo(2).name == "fireRound" then
        local actual_hrp = old_get_root_part(self);
        local closest_player, closest_torso = combat_t.get_closest_player();

        if closest_player and closest_torso then
            is_spoofing = true;
            local new_cframe = CFrame.new(actual_hrp.Position, closest_torso.Position);
            return {CFrame = new_cframe}; --// the only thing they access in the getRootPart func is the CFrame in fireRound, we can just return a fake table instead of a part, this MIGHT get detected tho by just adding a simple type check
        else
            is_spoofing = false;
        end;
    end;
    
    return old_get_root_part(self);
end;

--// hook the fireRound function, used to change the offsets
--// so the silent aimed position isn't offseted
firearm_object.fireRound = function(self, ...)
    old_offsets[self] = {
        _barrelOffset = self._barrelOffset,
        _mainC0 = self._mainC0
    };
    
    if is_spoofing then
        self._barrelOffset = CFrame.new();
        self._mainC0 = CFrame.new();
    else
        self._barrelOffset = old_offsets[self]._barrelOffset;
        self._mainC0 = old_offsets[self]._mainC0;
    end;

    return old_fire_round(self, ...);
end;

Features & Information

This script is old and outdated (gets you instant banned), for the people telling me to use run_on_actor, this was from the times when exploit's didn't have that (shoutout wave) I will not unpatch this Just a simple silent aim on the torso ALSO make sure to use an actor bypass before complaining about it not working set the FFlagDebugRunParallelLuaOnMainThread fflag to True also FFlagDebugRunParallelLuaOnMainThread is silently detected, if you use it you WILL get banned eventually! also this is a very stupid method, i expect this to get patched very fast also run_on_actor doesn't work for some reason
#silent aim#open source#pf

Community Comments (18)

sametexesametexeOct 18, 2024(edited)

p100

ReplicatedFirstReplicatedFirstOct 18, 2024(edited)

p1/0

LinemasterLinemasterOct 18, 2024(edited)

@ReplicatedFirst does that mean it's good or no? :sob: i made this method in like half an hour

ReplicatedFirstReplicatedFirstOct 18, 2024(edited)

1/0 = infinitely good

grayyzyygrayyzyyOct 20, 2024(edited)

bad

KillaKillaOct 29, 2024(edited)

run_on_actor(getactors[1], [[]]) will not work because phantom forces parents the actor to nil so u need to cache the actor before it gets parented to nil and then use run_on_actor on the cached actor.

yangbill745yangbill745Nov 2, 2024(edited)

i don't get it

19AT19ATNov 20, 2024(edited)

Somewhat worked for me and although the silent aim part of the screen is only the crosshair, its better this way as its less noticable

zue22zue22Nov 22, 2024(edited)

doesnt execute

EnergyBloxEnergyBloxDec 10, 2024(edited)

dude your pfp lis like a meme my friend made as a joke and i send to alot of dc servers, not saying you have to change it i dont care

offdaperc52offdaperc52Dec 24, 2024(edited)

make more that will fr fr work

SantoXSantoXJan 10, 2025(edited)

yjis * got me banned

vDausitavDausitaJan 19, 2025(edited)

Doest support xeno

CometCometFeb 21, 2025(edited)

insta ban

tyiuoplkj901tyiuoplkj901Mar 19, 2025(edited)

you don't need to cache it bro. You can use getgc and get the actor from there (if your getgc returns userdata to, I don't remember what executor doesn't.)

mauvemauveApr 24, 2025

doesnt work bru

Star_EternalStar_EternalMay 22, 2025

* *ing script

Star_EternalStar_EternalMay 22, 2025

šħíţ íš šο *

More Scripts for Phantom Forces