Dogeking

001 copy

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