Dynamic Engine Block
3 years ago in Lua
f=Instance.new("StringValue") u={} function o()
e=game.Workspace:GetChildren() _=m:GetChildren()
n={} p=0
function i(b)for _=1,#b
do k=b[_]:GetChildren() if c(b[_])
then p=p+1 a(b[_]) j(b[_])else if#k>0
then i(k)end end end end function c(a)
for _=1,#l do if a.className==l[_]and#(a:GetChildren())>0
then return true end end for _=1,#h do
if string.lower(a.Name)==string.lower(h[_])then
return true end end return false end
function d(a)for _=1,#l do if a.className==l[_]then
return true end end
return false end
function a(_)t=_ u[1]="."..t.Name
while t.Parent.Name~="Workspace"do t=t.Parent u[#u+1]="."..t.Name
end q="game.Workspace" for _=1,#u do q=q..u[#u+1-_]
end u={} q=q.." (".._.className.." Class)" n[#n+1]=q _.Parent=m end
function j(_)if _~=nil then s=_:GetChildren() if d(_)then
r=f:clone() r.Name=_.Name r.Value="Original Class: ".._.className
r.Parent=_.Parent for _=1,#s do s[_].Parent=r end _:remove() _=r
end s=_:GetChildren() for _=1,#s do j(s[_])end
end end i(e)
if p>0 and g then m.Parent=game.Lighting end if p>0 and b
then print("--------------------")