Anti lag lgb open src
Key Required

Anti lag lgb open src

Legends BattlegroundsJosuaomiorJosuaomior 2.2K views 8.3K executesUpdated Aug 8, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•147 lines (3383 chars)
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local function GetProtectedParts()
	local protected = {}

	local char = LocalPlayer.Character
	if char then
		for _, v in pairs(char:GetDescendants()) do
			if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
				protected[v] = true
			end
		end
	end

	for _, player in pairs(Players:GetPlayers()) do
		if player ~= LocalPlayer and player.Character then
			for _, v in pairs(player.Character:GetDescendants()) do
				if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
					protected[v] = true
				end
			end
		end
	end

	for _, v in pairs(Workspace:GetChildren()) do
		if (v:IsA("Part") or v:IsA("MeshPart") or v:IsA("Model")) then
			local n = v.Name:lower()
			if n:match("base") or n:match("floor") or n:match("ground") or n:match("map") or n:match("spawn") then
				protected[v] = true
			end
		end
	end

	return protected
end

local function RemoveEffects()
	for _, v in pairs(Workspace:GetDescendants()) do
		if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") or
		   v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") or
		   v:IsA("Explosion") then
			pcall(function()
				v:Destroy()
			end)
		end
	end
end

RemoveEffects()

local function RemoveBlocks()
	local protected = GetProtectedParts()

	for _, v in pairs(Workspace:GetDescendants()) do
		if protected[v] then
			continue
		end

		if LocalPlayer.Character and v:IsDescendantOf(LocalPlayer.Character) then
			continue
		end

		local isPlayer = false
		for _, player in pairs(Players:GetPlayers()) do
			if player.Character and v:IsDescendantOf(player.Character) then
				isPlayer = true
				break
			end
		end

		if isPlayer then
			continue
		end

		if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
			local name = v.Name:lower()
			local size = v.Size or Vector3.new()

			local keywords = {
				"debris","rubble","rock","stone","fragment","piece","chip","shard",
				"dust","smash","break","crack","shatter","explosion","block",
				"decal","texture","foliage","grass","tree","bush","prop","decoration"
			}

			local remove = false

			for _, k in pairs(keywords) do
				if name:match(k) then
					remove = true
					break
				end
			end

			if not remove and size.X < 3 and size.Y < 3 and size.Z < 3 then
				remove = true
			end

			if remove then
				pcall(function()
					v:Destroy()
				end)
			end
		end
	end
end

RemoveBlocks()

Workspace.DescendantAdded:Connect(function(v)
	task.wait(0.05)

	if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") or
	   v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") or
	   v:IsA("Explosion") then
		pcall(function()
			v:Destroy()
		end)
		return
	end

	if v:IsA("Part") or v:IsA("MeshPart") then
		if v.Parent and not v:IsDescendantOf(LocalPlayer.Character) then
			local name = v.Name:lower()
			local keywords = {
				"debris","rubble","block","decal","grass","tree",
				"bush","rock","stone","fragment","piece","shard"
			}

			for _, k in pairs(keywords) do
				if name:match(k) then
					pcall(function()
						v:Destroy()
					end)
					break
				end
			end
		end
	end
end)

Lighting.GlobalShadows = false
Lighting.Brightness = 0.5
Workspace.StreamingEnabled = true
Workspace.StreamingMinRadius = 30

Features & Information

- 75% Remove VFX - 92% Blocks remover - 10% Max FPS anti-lag /////////////////////// 🚨-If anyone asks, I'll make a more optimized v2 version. ////////////////////// 🚨VFX - I left some VFX visible so you could at least see some attacks, I changed the weather to a more optimized one, etc.

Community Comments (0)

No comments yet for this script.

More Scripts for Legends Battlegrounds