Advertisement
Georgetanase792

Test

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