Advertisement
WDGASTER132

Untitled

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