Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. -- Made by 001 from v3rmillion.net.
  2. -- Map Copy Script: Rewritten
  3. AllowedClassnames = {'Part','WedgePart','SpawnLocation','UnionOperation','Seat','VehicleSeat','TrussPart'}
  4. Settings = {
  5. Copy = true, -- Using this option might cause lag in game but it doesn't remove the game.
  6. Creator = '001', -- Created by 001 from V3rmillion.net.
  7. EverythingAnchored = false, -- Anchors every part.
  8. }
  9. source = ""
  10. newline = [[
  11.  
  12. ]]
  13. tablecheck = function(t,value) -- Function: tablecheck, Description: checks a table for a value, Variables: table (table), value (string).
  14. for i,v in pairs(t) do
  15. if v==value then
  16. return true
  17. end
  18. end
  19. return nil
  20. end
  21. printFunction = function(str) -- Function: printFunction, Description: Custom print function, Variables: print (string).
  22. printconsole(str)
  23. end
  24. --[[ It turned out ifclass doesn't works, function removed.
  25. ifclass = function(part, tabl, str)
  26. for i,v in pairs(tabl) do
  27. if v == part.ClassName then
  28. printFunction(str)
  29. end
  30. end
  31. end
  32. ]]--
  33. copy = function(children) -- no time to document this,
  34. local PartClass = children.ClassName
  35. if tablecheck(AllowedClassnames, PartClass) then
  36. local PartName = "P"..math.random(100,999)
  37. printFunction(PartName.."=Instance.new('"..PartClass.."', Workspace)") -- Instance.new
  38. upc=tostring('false')
  39. if children:IsA'UnionOperation' then
  40. upc=tostring(children.UsePartColor)
  41. end
  42. shape='"N"'
  43. if children:IsA'Part' or children:IsA'SpawnLocation' or children:IsA'Seat' then
  44. shape=tostring(children.Shape)
  45. end
  46. formfactor='"N"'
  47. if children:IsA'Part' or children:IsA'WedgePart' or children:IsA'SpawnLocation' or children:IsA'Seat' then
  48. formfactor=tostring(children.FormFactor)
  49. end
  50. local Anchored = tostring(children.Anchored)
  51. local Locked = tostring(children.Locked)
  52. local Name = children.Name
  53. local Size = children.Size
  54. local CanCollide = tostring(children.CanCollide)
  55. local Archivable = tostring(children.Archivable)
  56. local CFrame = children.CFrame
  57. local Transparency = tonumber(children.Transparency)
  58. local Reflectance = tonumber(children.Reflectance)
  59. local Material = children.Material
  60. local BrickColor = children.BrickColor
  61.  
  62. local fc = PartName..",'"..Name.."',"..tostring(Settings.EverythingAnchored)..","..shape..","..upc..","..CanCollide..","..Locked..","..Anchored..","..Archivable..","..formfactor..",{"..tostring(Size).."},{"..tostring(CFrame).."},'"..tostring(BrickColor).."',"..Transparency..","..tostring(Material)..","..Reflectance
  63. printFunction("c("..fc..")")
  64. printFunction("ss("..PartName..","..tostring(children.BackSurface)..","..tostring(children.BottomSurface)..","..tostring(children.FrontSurface)..","..tostring(children.LeftSurface)..","..tostring(children.RightSurface)..","..tostring(children.TopSurface)..")")
  65. for i,v in pairs(children:GetChildren()) do
  66. if v:IsA'Decal' then
  67. printFunction("d("..v.Name..","..tonumber(v.Transparency)..",'"..tostring(v.Texture).."',"..tostring(v.Face)..",'"..tostring(v.Name).."')") -- Decal
  68. elseif v:IsA'SpecialMesh' then
  69. -- For mesh (d): p=part,t=meshid,te=meshtexture,face=size,n=name,ff=meshtype
  70. printFunction("d("..PartName..",'"..tostring(v.MeshId).."','"..tostring(v.TextureId).."',{"..tostring(v.Scale).."},'"..tostring(v.Name).."',"..tostring(v.MeshType)..")") -- Mesh
  71. end
  72. end
  73. end
  74. end
  75. local decryptFunc = [[
  76. c=function(part,name,everythinganchored,shape,usepartcolor,cancollide,locked,anchored,archivable,formfactor,size,cframe,brickcolor,transparency,material,reflectance)
  77. part.Name=name
  78. function tabltostring(tabl)
  79. s=''
  80. for i,v in pairs(tabl) do
  81. s=s..v
  82. end
  83. return s
  84. end
  85. function n(nu)
  86. return tonumber(nu)
  87. end
  88. if part:IsA'Part' or part:IsA'SpawnLocation' or part:IsA'Seat' then
  89. part.Shape=shape
  90. end
  91. if part:IsA'UnionOperation' then
  92. part.UsePartColor=usepartcolor
  93. end
  94. part.CanCollide=cancollide
  95. part.Locked=locked
  96. if everythinganchored == true then
  97. part.Anchored = true
  98. else
  99. part.Anchored = anchored
  100. end
  101. part.Archivable = archivable
  102. if part:IsA'Part' or part:IsA'WedgePart' or part:IsA'SpawnLocation' or part:IsA'Seat' then
  103. part.FormFactor=formfactor
  104. end
  105. part.Size = Vector3.new(n(size[1]),n(size[2]),n(size[3]))
  106. part.CFrame = CFrame.new(n(cframe[1]),n(cframe[2]),n(cframe[3]),n(cframe[4]),n(cframe[5]),n(cframe[6]),n(cframe[7]),n(cframe[8]),n(cframe[9]),n(cframe[10]),n(cframe[11]),n(cframe[12]))
  107. part.BrickColor = BrickColor.new(brickcolor)
  108. part.Material = material
  109. part.Transparency = transparency
  110. part.Reflectance = reflectance
  111. end
  112. ]]
  113. local function magiclines( str )
  114. if strConfusedub(-1)~="\n" then str=str.."\n" end
  115. return str:gmatch("(.-)\n")
  116. end
  117. function findLoop(childre)
  118. Instance.new('Model',game.Lighting).Name='Copy'
  119. findLoop2 = function(children) -- Function: findLoop, Description: Just a find loop, Variables: children (Part).
  120. for i,v in pairs(children:GetChildren()) do
  121. if tablecheck(AllowedClassnames, v.ClassName) then
  122. if Settings.Copy == true then
  123. v:Clone().Parent = game.Lighting.Copy
  124. else
  125. v.Parent = game.Lighting.Copy
  126. end
  127. end
  128. if v:FindFirstChild'HumanoidRootPart' ~= true then -- Anti player copy.
  129. findLoop2(v)
  130. end
  131. end
  132. end
  133. findLoop2(childre)
  134. wait(2)
  135. for line in magiclines(decryptFunc) do
  136. printFunction(line)
  137. wait()
  138. end
  139. wait(4)
  140. -- For mesh (d): p=part,t=meshid,te=meshtexture,face=size,n=name,ff=meshtype
  141. printFunction("d=function(p,t,te,face,n,ff)if ff then me=Instance.new('SpecialMesh',p);me.MeshType=ff;me.MeshId=t;me.TextureId=te;me.Name=n;me.Scale=Vector3.new(face[1],face[2],face[3]); else xx=Instance.new('Decal',p);xx.Texture=te;xx.Transparency=t;xx.Face=face;xx.Name=n;end;end") -- Decal (d) function.
  142. printFunction("ss=function(p,bs,bz,fs,ls,rs,ts)p.BackSurface=bs;p.BottomSurface=bz;p.FrontSurface=fs;p.LeftSurface=ls;p.RightSurface=rs;p.TopSurface=ts;end") -- SetSurface (ss) function.
  143. for i,v in pairs(game.Lighting.Copy:GetChildren()) do
  144. copy(v)
  145. end
  146. end
  147.  
  148. findLoop(game.Workspace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement