local cfg = {transp = 0.2, toggle_bind = "F1"} local a = game:GetService("Workspace") local b = a:FindFirstChild("Map") if not b then return end local c, d, e = false, {}, game:GetService("UserInputService") local currentMap = b local function f(g) if g:IsA("BasePart") or g:IsA("MeshPart") or g:IsA("UnionOperation") or g:IsA("TrussPart") then d[g] = {g.Transparency, g.Material, g.Reflectance} end if g:IsA("Decal") then d[g] = {g.Transparency} end for _, h in pairs(g:GetChildren()) do f(h) end end local function i(j, k) if j:IsA("BasePart") or j:IsA("MeshPart") or j:IsA("UnionOperation") or j:IsA("TrussPart") then j.Transparency = k j.Material = Enum.Material.ForceField j.Reflectance = 0 end if j:IsA("Decal") then j.Transparency = k end for _, l in pairs(j:GetChildren()) do i(l, k) end end local function m(n) if d[n] then local o = d[n] n.Transparency = o[1] if o[2] then n.Material = o[2] end if o[3] ~= nil then n.Reflectance = o[3] end end for _, p in pairs(n:GetChildren()) do m(p) end end local function resetAndSetup(newMap) if currentMap and c then m(currentMap) c = false end d = {} currentMap = newMap f(currentMap) end local function onMapChanged() local newMap = a:FindFirstChild("Map") if newMap and newMap ~= currentMap then resetAndSetup(newMap) end end f(currentMap) a.ChildAdded:Connect(function(child) if child.Name == "Map" and child ~= currentMap then task.wait(0.1) onMapChanged() end end) a.ChildRemoved:Connect(function(child) if child == currentMap then d = {} c = false currentMap = nil end end) e.InputBegan:Connect(function(q, r) if r then return end if q.KeyCode == Enum.KeyCode[cfg.toggle_bind] then if not currentMap then local newMap = a:FindFirstChild("Map") if newMap then currentMap = newMap f(currentMap) else return end end c = not c if c then i(currentMap, cfg.transp) else m(currentMap) end end end) while task.wait(1) do if not currentMap then local newMap = a:FindFirstChild("Map") if newMap then currentMap = newMap f(currentMap) end end end