Ir al contenido
Funcional

W.I.P untitled drift game lag reduction

CLclarkdevlinorg1 vistasUniversal26 jul 2026
Compartir
W.I.P untitled drift game lag reduction

Código del script

Lua
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local LOCAL_PLAYER = Players.LocalPlayer
local LOCAL_CAR_NAME = LOCAL_PLAYER.Name .. "sCar"

local HIDE_DISTANCE = 100
local UPDATE_RATE = 0.25 -- seconds

type CarData = {
	Model: Model,
	Parts: {BasePart},
	Hidden: boolean,
}

local trackedCars: {[Model]: CarData} = {}

local function getRoot(model: Model): BasePart?
	return model.PrimaryPart
		or model:FindFirstChild("HumanoidRootPart", true)
		or model:FindFirstChildWhichIsA("BasePart", true)
end

local function collectRenderableParts(container: Instance, output: {BasePart})
	for _, obj in ipairs(container:GetDescendants()) do
		if obj:IsA("BasePart") then
			table.insert(output, obj)
		end
	end
end

local function scanCar(car: Model)
	if trackedCars[car] then
		return
	end

	if car.Name == LOCAL_CAR_NAME then
		return
	end

	if not car.Name:match("sCar$") then
		return
	end

	local renderParts = {}

	local targetContainers = {
	"Paint",
	"Misc",
	"shirtstuckedin",
	"c55ag9i",
	"jokus13ag9i",
	"3037ag9i",
	"s14icy",
	"jzx81ag9i",
	"jee46",
	"Model",
	"fd3s",
	"c33",
	"joo o",
}

for _, name in ipairs(targetContainers) do
	local container = car:FindFirstChild(name, true)
	if container then
		collectRenderableParts(container, renderParts)
	end
end

	trackedCars[car] = {
		Model = car,
		Parts = renderParts,
		Hidden = false,
	}
end

local function removeCar(car: Model)
	trackedCars[car] = nil
end

local function hideCar(data: CarData)
	if data.Hidden then
		return
	end

	data.Hidden = true

	for _, part in ipairs(data.Parts) do
		if part.Parent then
			part.LocalTransparencyModifier = 1
		end
	end
end

local function showCar(data: CarData)
	if not data.Hidden then
		return
	end

	data.Hidden = false

	for _, part in ipairs(data.Parts) do
		if part.Parent then
			part.LocalTransparencyModifier = 0
		end
	end
end

for _, obj in ipairs(workspace:GetDescendants()) do
	if obj:IsA("Model") then
		scanCar(obj)
	end
end

workspace.DescendantAdded:Connect(function(obj)
	if obj:IsA("Model") then
		scanCar(obj)
	end
end)

workspace.DescendantRemoving:Connect(function(obj)
	if obj:IsA("Model") then
		removeCar(obj)
	end
end)

local accumulator = 0

RunService.Heartbeat:Connect(function(dt)
	accumulator += dt

	if accumulator < UPDATE_RATE then
		return
	end

	accumulator = 0

	local character = LOCAL_PLAYER.Character
	if not character then
		return
	end

	local hrp = character:FindFirstChild("HumanoidRootPart")
	if not hrp then
		return
	end

	local playerPos = hrp.Position

	for model, data in pairs(trackedCars) do
		if not model.Parent then
			trackedCars[model] = nil
			continue
		end

		local root = getRoot(model)
		if not root then
			continue
		end

		local dist = (root.Position - playerPos).Magnitude

		if dist >= HIDE_DISTANCE then
			hideCar(data)
		else
			showCar(data)
		end
	end
end)

Descripción

Gets other players cars, gets their paint and interior (still working on getting the interior layers) and makes them transparent based on distance. planning on adding more models to be affected, and planning on having it adjust particles and decals for the skid marks and wheel smoke

Comentarios (0)

Inicia sesión para unirte a la conversación

  • Sé el primero en comentar.

Preguntas frecuentes

¿Cómo uso el script W.I.P untitled drift game lag reduction?
Copia el código de arriba, abre tu executor de Roblox, pega el código y presiona ejecutar mientras estés en el juego. Las funciones se activan instantáneamente una vez que el script se ejecuta.
¿El script W.I.P untitled drift game lag reduction es gratuito?
Sí. Este script es gratuito para copiar y usar. Si usa un sistema de claves, sigue el enlace «Obtener clave» para desbloquearlo sin costo.
¿Es seguro usar el script W.I.P untitled drift game lag reduction?
El código fuente completo se muestra en esta página para que puedas leer exactamente qué hace antes de ejecutarlo. Usa siempre un executor de confianza, y recuerda que usar scripts va en contra de los términos de servicio de Roblox — úsalos bajo tu propio riesgo.
¿Qué executor funciona con W.I.P untitled drift game lag reduction?
Este script funciona con la mayoría de los executores populares de Roblox. Consulta nuestra página de executores para encontrar un executor gratuito o de pago confiable para tu dispositivo.
W.I.P untitled drift game lag reduction | BloxScripter