Safe-SlientAim open-source
Keyless

Safe-SlientAim open-source

Tribes 3v3hong74167hong74167 3K views 1.5K executesUpdated Oct 19, 2026
2.5/ 5(2 votes)
1150% Positive
Lua Script•259 lines (7690 chars)
--safe
--!native
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local LocalPlayer = Players.LocalPlayer
local Env = (getgenv and getgenv()) or _G

if Env.BallisticSilentAimState and Env.BallisticSilentAimState.Cleanup then
	Env.BallisticSilentAimState.Cleanup()
end

local State = {
	Active = true,
	OriginalAimDirection = nil :: ((Vector3) -> Vector3)?,
	OriginalAssistDirection = nil :: ((Vector3, Vector3, boolean?) -> Vector3)?,
	OriginalAimPoint = nil :: ((number?) -> (Vector3, RaycastResult?))?,
}

local function ResolveCombatFolder(): Instance?
	local playerScripts = LocalPlayer:FindFirstChild("PlayerScripts")
	if playerScripts then
		local combatFolder = playerScripts:FindFirstChild("Combat")
		if combatFolder then
			return combatFolder
		end
	end
	return LocalPlayer:FindFirstChild("Combat")
end

local CombatFolder = ResolveCombatFolder()
local SharedFolder = ReplicatedStorage:WaitForChild("Shared", 10)

local UtilModule = if CombatFolder and CombatFolder:FindFirstChild("Util")
	then require(CombatFolder.Util)
	else nil
local CombatShared = if SharedFolder and SharedFolder:FindFirstChild("Combat")
	then require(SharedFolder.Combat)
	else nil

local ControllerStateTable: { [any]: any }? = nil
if filtergc then
	local matches = filtergc("table", { Keys = { "shotId", "killStreak", "pressed" } }, true)
	if type(matches) == "table" and #matches > 0 then
		ControllerStateTable = matches[1]
	end
elseif getgc then
	for _, v in getgc(true) do
		if type(v) ~= "table" then
			continue
		end
		if rawget(v, "shotId") ~= nil and rawget(v, "killStreak") ~= nil and rawget(v, "pressed") ~= nil then
			ControllerStateTable = v
			break
		end
	end
end

local function GetActiveProjectilePhysics(): (number, number)
	local speed = 180
	local gravity = 60

	if ControllerStateTable then
		local handler = rawget(ControllerStateTable, "handler")
		if type(handler) == "table" then
			local tuning = rawget(handler, "tuning")
			if type(tuning) == "table" then
				local g = rawget(tuning, "gravity")
				if type(g) == "number" then
					gravity = g
				end

				local charge = 1
				local chargeFn = rawget(handler, "Charge") or (getmetatable(handler) and rawget(getmetatable(handler), "Charge"))
				if type(chargeFn) == "function" then
					local ok, c = pcall(chargeFn, handler)
					if ok and type(c) == "number" and c > 0 then
						charge = c
					end
				end

				if CombatShared and type(rawget(CombatShared, "DrawnShot")) == "function" then
					local ok, _, drawnSpeed = pcall(rawget(CombatShared, "DrawnShot"), tuning, charge)
					if ok and type(drawnSpeed) == "number" and drawnSpeed > 0 then
						speed = drawnSpeed
					end
				elseif type(rawget(tuning, "speed")) == "number" then
					speed = rawget(tuning, "speed")
				end
			end
		end
	end

	return speed, gravity
end

local function FindBestTarget(origin: Vector3): (BasePart?, Model?)
	if not UtilModule then
		return nil, nil
	end

	local targetsFn = rawget(UtilModule, "Targets")
	local canPredictFn = rawget(UtilModule, "CanPredictHit")
	local worldParamsFn = rawget(UtilModule, "WorldParams")
	if type(targetsFn) ~= "function" then
		return nil, nil
	end

	local targets = targetsFn()
	local rayParams = if type(worldParamsFn) == "function" then worldParamsFn(targets) else nil

	local camera = workspace.CurrentCamera
	local camLook = if camera then camera.CFrame.LookVector else Vector3.new(0, 0, -1)

	local bestPart: BasePart? = nil
	local bestModel: Model? = nil
	local bestScore = math.huge

	for _, model in targets do
		if typeof(model) ~= "Instance" or not model:IsA("Model") then
			continue
		end

		if type(canPredictFn) == "function" and not canPredictFn(model) then
			continue
		end

		local hum = model:FindFirstChildOfClass("Humanoid")
		if not hum or hum.Health <= 0 then
			continue
		end

		local head = model:FindFirstChild("Head")
		local root = model:FindFirstChild("HumanoidRootPart")
		local targetPart: BasePart? = if head and head:IsA("BasePart")
			then head
			elseif root and root:IsA("BasePart") then root
			else nil

		if not targetPart then
			continue
		end

		local delta = targetPart.Position - origin
		local dist = delta.Magnitude
		if dist < 1 or dist > 450 then
			continue
		end

		if rayParams then
			local hit = workspace:Raycast(origin, delta, rayParams)
			if hit and not hit.Instance:IsDescendantOf(model) then
				continue
			end
		end

		local dot = delta.Unit:Dot(camLook)
		local score = (1 - dot) * 120 + dist * 0.15
		if score < bestScore then
			bestScore = score
			bestPart = targetPart
			bestModel = model
		end
	end

	return bestPart, bestModel
end

local function ComputeBallisticAimPoint(origin: Vector3, targetPart: BasePart): Vector3
	local speed, gravity = GetActiveProjectilePhysics()
	local targetPos = targetPart.Position
	local velocity = targetPart.AssemblyLinearVelocity

	local dist = (targetPos - origin).Magnitude
	local flightTime = if speed > 1 then dist / speed else 0

	local predictedPos = targetPos + Vector3.new(velocity.X, velocity.Y * 0.35, velocity.Z) * flightTime
	flightTime = if speed > 1 then (predictedPos - origin).Magnitude / speed else 0

	local dropCompensation = 0.5 * gravity * (flightTime * flightTime)
	return predictedPos + Vector3.new(0, dropCompensation, 0)
end

if UtilModule and not table.isfrozen(UtilModule) then
	State.OriginalAimDirection = rawget(UtilModule, "AimDirection")
	State.OriginalAssistDirection = rawget(UtilModule, "AssistDirection")
	State.OriginalAimPoint = rawget(UtilModule, "AimPoint")

	rawset(UtilModule, "AimDirection", function(origin: Vector3): Vector3
		if State.Active and typeof(origin) == "Vector3" then
			local targetPart = FindBestTarget(origin)
			if targetPart then
				local aimPos = ComputeBallisticAimPoint(origin, targetPart)
				local delta = aimPos - origin
				if delta.Magnitude > 0.01 then
					return delta.Unit
				end
			end
		end
		if State.OriginalAimDirection then
			return State.OriginalAimDirection(origin)
		end
		return Vector3.new(0, 0, -1)
	end)

	rawset(UtilModule, "AssistDirection", function(origin: Vector3, dir: Vector3, isArc: boolean?): Vector3
		if State.Active and typeof(origin) == "Vector3" then
			local targetPart = FindBestTarget(origin)
			if targetPart then
				local aimPos = ComputeBallisticAimPoint(origin, targetPart)
				local delta = aimPos - origin
				if delta.Magnitude > 0.01 then
					return delta.Unit
				end
			end
		end
		if State.OriginalAssistDirection then
			return State.OriginalAssistDirection(origin, dir, isArc)
		end
		return dir
	end)

	rawset(UtilModule, "AimPoint", function(range: number?): (Vector3, RaycastResult?)
		if State.Active then
			local char = LocalPlayer.Character
			local head = char and char:FindFirstChild("Head")
			local origin = if head and head:IsA("BasePart")
				then head.Position
				elseif workspace.CurrentCamera then workspace.CurrentCamera.CFrame.Position
				else Vector3.zero

			local targetPart = FindBestTarget(origin)
			if targetPart then
				return ComputeBallisticAimPoint(origin, targetPart), nil
			end
		end
		if State.OriginalAimPoint then
			return State.OriginalAimPoint(range)
		end
		return Vector3.zero, nil
	end)
end

State.Cleanup = function()
	State.Active = false
	if UtilModule and not table.isfrozen(UtilModule) then
		if State.OriginalAimDirection then
			rawset(UtilModule, "AimDirection", State.OriginalAimDirection)
		end
		if State.OriginalAssistDirection then
			rawset(UtilModule, "AssistDirection", State.OriginalAssistDirection)
		end
		if State.OriginalAimPoint then
			rawset(UtilModule, "AimPoint", State.OriginalAimPoint)
		end
	end
end

Env.BallisticSilentAimState = State

Features & Information

Just execute and use Bow

Community Comments (1)

Justbro123Justbro123Oct 19, 2026

It wouldn't load

More Scripts for Tribes 3v3