Diamond_Nicholas

moveing blocks 2

Feb 8th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.72 KB | None | 0 0
  1.  
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(Enum,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Part0 = Instance.new("Part")
  19. Part1 = Instance.new("Part")
  20. Part2 = Instance.new("Part")
  21. Part3 = Instance.new("Part")
  22. Part4 = Instance.new("Part")
  23. ClickDetector5 = Instance.new("ClickDetector")
  24. Script6 = Instance.new("Script")
  25. Script7 = Instance.new("Script")
  26. Script8 = Instance.new("Script")
  27. Script9 = Instance.new("Script")
  28. Part10 = Instance.new("Part")
  29. Part11 = Instance.new("Part")
  30. Part12 = Instance.new("Part")
  31. Weld13 = Instance.new("Weld")
  32. Weld14 = Instance.new("Weld")
  33. Part15 = Instance.new("Part")
  34. Weld16 = Instance.new("Weld")
  35. Part17 = Instance.new("Part")
  36. Weld18 = Instance.new("Weld")
  37. Part0.Name = "Part2"
  38. Part0.Parent = mas
  39. Part0.CFrame = CFrame.new(79.2618408, 9.16810799, 40.4414635, -0.777146161, 0, 0.629320204, 0, 1, 0, -0.629320204, 0, -0.777146161)
  40. Part0.Orientation = Vector3.new(0, 141, 0)
  41. Part0.Position = Vector3.new(79.2618408, 9.16810799, 40.4414635)
  42. Part0.Rotation = Vector3.new(-180, 39, -180)
  43. Part0.Transparency = 1
  44. Part0.Size = Vector3.new(2.73488593, 5.6370182, 1.93403089)
  45. Part0.Anchored = true
  46. Part0.BottomSurface = Enum.SurfaceType.Smooth
  47. Part0.CanCollide = false
  48. Part0.TopSurface = Enum.SurfaceType.Smooth
  49. Part1.Name = "Part4"
  50. Part1.Parent = mas
  51. Part1.CFrame = CFrame.new(84.6176224, 6.43851995, 33.9547424, -0.777146161, 0, 0.629320204, 0, 1, 0, -0.629320204, 0, -0.777146161)
  52. Part1.Orientation = Vector3.new(0, 141, 0)
  53. Part1.Position = Vector3.new(84.6176224, 6.43851995, 33.9547424)
  54. Part1.Rotation = Vector3.new(-180, 39, -180)
  55. Part1.Transparency = 1
  56. Part1.Size = Vector3.new(2.73488593, 12.8770266, 1.93403089)
  57. Part1.Anchored = true
  58. Part1.BottomSurface = Enum.SurfaceType.Smooth
  59. Part1.CanCollide = false
  60. Part1.TopSurface = Enum.SurfaceType.Smooth
  61. Part2.Parent = mas
  62. Part2.CFrame = CFrame.new(61.5955429, 3.31781602, 18.4288578, 0.629320204, -0.278505117, 0.725528121, 0, 0.933580101, 0.358369082, -0.777146161, -0.225528896, 0.587520778)
  63. Part2.Orientation = Vector3.new(-21, 51, 0)
  64. Part2.Position = Vector3.new(61.5955429, 3.31781602, 18.4288578)
  65. Part2.Rotation = Vector3.new(-31.3799992, 46.5099983, 23.8700008)
  66. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  67. Part2.Size = Vector3.new(2.37000179, 2.48000169, 2.26999974)
  68. Part2.Anchored = true
  69. Part2.BottomSurface = Enum.SurfaceType.Smooth
  70. Part2.BrickColor = BrickColor.new("Dark stone grey")
  71. Part2.Material = Enum.Material.DiamondPlate
  72. Part2.TopSurface = Enum.SurfaceType.Smooth
  73. Part2.brickColor = BrickColor.new("Dark stone grey")
  74. Part3.Parent = mas
  75. Part3.CFrame = CFrame.new(61.8417358, 0.308631986, 18.6347198, 0.629320204, 0, 0.777146161, 0, 1, 0, -0.777146161, 0, 0.629320204)
  76. Part3.Orientation = Vector3.new(0, 51, 0)
  77. Part3.Position = Vector3.new(61.8417358, 0.308631986, 18.6347198)
  78. Part3.Rotation = Vector3.new(0, 51, 0)
  79. Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  80. Part3.Size = Vector3.new(2.3600018, 4.82000065, 2.33999896)
  81. Part3.Anchored = true
  82. Part3.BottomSurface = Enum.SurfaceType.Smooth
  83. Part3.BrickColor = BrickColor.new("Dark stone grey")
  84. Part3.Material = Enum.Material.DiamondPlate
  85. Part3.TopSurface = Enum.SurfaceType.Smooth
  86. Part3.brickColor = BrickColor.new("Dark stone grey")
  87. Part4.Name = "y"
  88. Part4.Parent = mas
  89. Part4.CFrame = CFrame.new(61.2386932, 4.599226, 18.1077347, 0.629320204, -0.278505117, 0.725528121, 0, 0.933580101, 0.358369082, -0.777146161, -0.225528896, 0.587520778)
  90. Part4.Orientation = Vector3.new(-21, 51, 0)
  91. Part4.Position = Vector3.new(61.2386932, 4.599226, 18.1077347)
  92. Part4.Rotation = Vector3.new(-31.3799992, 46.5099983, 23.8700008)
  93. Part4.Color = Color3.new(0.431373, 1, 0.227451)
  94. Part4.Size = Vector3.new(1.01999938, 0.256205767, 1.07275915)
  95. Part4.Anchored = true
  96. Part4.BottomSurface = Enum.SurfaceType.Smooth
  97. Part4.BrickColor = BrickColor.new("Br. yellowish green")
  98. Part4.CanCollide = false
  99. Part4.TopSurface = Enum.SurfaceType.Smooth
  100. Part4.brickColor = BrickColor.new("Br. yellowish green")
  101. ClickDetector5.Parent = Part4
  102. Script6.Parent = Part4
  103. table.insert(cors,sandbox(Script6,function()
  104.  
  105. function onClicked(y)
  106. local s = Instance.new("Sound")
  107.  
  108. s.Name = "Sound"
  109. s.SoundId = "rbxassetid://582374365"
  110. s.Volume = 2
  111. s.Looped = false
  112. s.archivable = false
  113.  
  114. s.Parent = game.Workspace
  115.  
  116. wait()
  117.  
  118. s:play()
  119.  
  120. end
  121.  
  122. script.Parent.ClickDetector.MouseClick:connect(onClicked)
  123.  
  124. end))
  125. Script7.Parent = Part4
  126. table.insert(cors,sandbox(Script7,function()
  127. function onClicked(y)
  128. script.Parent.Parent.BrickColor = BrickColor.new(255,0,0)
  129. end
  130.  
  131. script.Parent.ClickDetector.MouseClick:connect(onClicked)
  132. end))
  133. Script8.Parent = Part4
  134. table.insert(cors,sandbox(Script8,function()
  135. function onClicked(y)
  136.  
  137. for i=0,1,0.001 do
  138. wait()
  139. workspace.g.CFrame = workspace.g.CFrame:lerp(workspace.Part2.CFrame,0.01)
  140. end
  141.  
  142. end
  143.  
  144. script.Parent.ClickDetector.MouseClick:connect(onClicked)
  145.  
  146. end))
  147. Script9.Parent = Part4
  148. table.insert(cors,sandbox(Script9,function()
  149. function onClicked(y)
  150.  
  151. for i=0,1,0.001 do
  152. wait()
  153. workspace.c.CFrame = workspace.c.CFrame:lerp(workspace.Part4.CFrame,0.01)
  154. end
  155.  
  156. end
  157.  
  158. script.Parent.ClickDetector.MouseClick:connect(onClicked)
  159.  
  160. end))
  161. Part10.Name = "c"
  162. Part10.Parent = mas
  163. Part10.CFrame = CFrame.new(-113.067146, 21.5786667, 30.1497421, -0.577532172, 0.161816835, 0.800173044, -0.669131219, 0.467678994, -0.577532589, -0.467675179, -0.868964374, -0.161822975)
  164. Part10.Orientation = Vector3.new(35.2799988, 101.43, -55.0499992)
  165. Part10.Position = Vector3.new(-113.067146, 21.5786667, 30.1497421)
  166. Part10.Rotation = Vector3.new(105.650002, 53.1500015, -164.350006)
  167. Part10.Color = Color3.new(1, 1, 0)
  168. Part10.Size = Vector3.new(2.73488593, 12.8770266, 1.93403089)
  169. Part10.BottomSurface = Enum.SurfaceType.Smooth
  170. Part10.BrickColor = BrickColor.new("New Yeller")
  171. Part10.Material = Enum.Material.Neon
  172. Part10.TopSurface = Enum.SurfaceType.Smooth
  173. Part10.brickColor = BrickColor.new("New Yeller")
  174. Part11.Name = "g"
  175. Part11.Parent = mas
  176. Part11.CFrame = CFrame.new(145.788971, 35.8879089, 55.3902092, -0.28570503, 0.876746237, -0.386896282, 0.891007125, 0.0943906978, -0.444068491, -0.352816045, -0.471599966, -0.808154941)
  177. Part11.Orientation = Vector3.new(26.3600006, -154.419998, 83.9499969)
  178. Part11.Position = Vector3.new(145.788971, 35.8879089, 55.3902092)
  179. Part11.Rotation = Vector3.new(151.210007, -22.7600002, -108.050003)
  180. Part11.Color = Color3.new(1, 0, 0)
  181. Part11.Size = Vector3.new(2.73488593, 2.41701937, 1.93403089)
  182. Part11.BottomSurface = Enum.SurfaceType.Smooth
  183. Part11.BrickColor = BrickColor.new("Really red")
  184. Part11.Material = Enum.Material.Neon
  185. Part11.TopSurface = Enum.SurfaceType.Smooth
  186. Part11.brickColor = BrickColor.new("Really red")
  187. Part12.Name = "c"
  188. Part12.Parent = mas
  189. Part12.CFrame = CFrame.new(-106.73922, 16.9268608, 28.991003, -0.577532172, 0.161816597, 0.800171912, -0.669131219, 0.467678338, -0.577531755, -0.467675179, -0.868963122, -0.161822736)
  190. Part12.Orientation = Vector3.new(35.2799988, 101.43, -55.0499992)
  191. Part12.Position = Vector3.new(-106.73922, 16.9268608, 28.991003)
  192. Part12.Rotation = Vector3.new(105.650002, 53.1500015, -164.350006)
  193. Part12.Color = Color3.new(0, 1, 0)
  194. Part12.Size = Vector3.new(2.73488593, 12.8770266, 1.93403089)
  195. Part12.BottomSurface = Enum.SurfaceType.Smooth
  196. Part12.BrickColor = BrickColor.new("Lime green")
  197. Part12.Material = Enum.Material.Neon
  198. Part12.TopSurface = Enum.SurfaceType.Smooth
  199. Part12.brickColor = BrickColor.new("Lime green")
  200. Weld13.Parent = Part12
  201. Weld13.C0 = CFrame.new(68.8474503, -19.1708679, 45.8920784, 0, 0, -1, 7.48783862e-07, 1.00000083, 0, 1.00000083, -7.48783862e-07, 0)
  202. Weld13.C1 = CFrame.new(68.8474503, -19.3155231, 53.8294716, 0, 0, -1, 7.48783691e-07, 1.0000006, 0, 1.0000006, -7.48783691e-07, 0)
  203. Weld13.Part0 = Part12
  204. Weld13.Part1 = Part10
  205. Weld13.part1 = Part10
  206. Weld14.Parent = Part12
  207. Weld14.C0 = CFrame.new(68.8474503, -19.1708431, 45.8920097, 0, 0, -1, 7.4878335e-07, 1.00000012, 0, 1.00000012, -7.4878335e-07, 0)
  208. Weld14.C1 = CFrame.new(68.8474503, -19.315506, 53.8294144, 0, 0, -1, 7.4878335e-07, 1.00000012, 0, 1.00000012, -7.4878335e-07, 0)
  209. Weld14.Part0 = Part12
  210. Weld14.Part1 = Part10
  211. Weld14.part1 = Part10
  212. Part15.Name = "g"
  213. Part15.Parent = mas
  214. Part15.CFrame = CFrame.new(139.330612, 35.1809998, 58.8210297, -0.28570503, 0.876746237, -0.386896312, 0.891007125, 0.0943907276, -0.444068521, -0.352816015, -0.471599936, -0.808154941)
  215. Part15.Orientation = Vector3.new(26.3600006, -154.419998, 83.9499969)
  216. Part15.Position = Vector3.new(139.330612, 35.1809998, 58.8210297)
  217. Part15.Rotation = Vector3.new(151.210007, -22.7600002, -108.050003)
  218. Part15.Color = Color3.new(1, 0, 0.74902)
  219. Part15.Size = Vector3.new(2.73488593, 5.6370182, 1.93403089)
  220. Part15.Anchored = true
  221. Part15.BottomSurface = Enum.SurfaceType.Smooth
  222. Part15.BrickColor = BrickColor.new("Hot pink")
  223. Part15.Material = Enum.Material.Neon
  224. Part15.TopSurface = Enum.SurfaceType.Smooth
  225. Part15.brickColor = BrickColor.new("Hot pink")
  226. Weld16.Parent = Part15
  227. Weld16.C0 = CFrame.new(30.9576225, 5.23033905, 142.451324, 0.0943899825, 0.891006887, -0.444068938, 0.91825515, 0.094391644, 0.384574771, 0.384575188, -0.444068581, -0.809262037)
  228. Weld16.C1 = CFrame.new(30.9624977, -2.11669922, 142.491318, 0.0943899825, 0.891006887, -0.444068938, 0.91825515, 0.094391644, 0.384574771, 0.384575188, -0.444068581, -0.809262037)
  229. Weld16.Part0 = Part15
  230. Weld16.Part1 = Part11
  231. Weld16.part1 = Part11
  232. Part17.Name = "c"
  233. Part17.Parent = mas
  234. Part17.CFrame = CFrame.new(-109.929504, 19.4206333, 29.3024216, -0.577532172, 0.800170243, -0.161815628, -0.669131219, -0.577530086, -0.467677712, -0.467675179, -0.161823019, 0.868961036)
  235. Part17.Orientation = Vector3.new(27.8799992, -10.5500002, -130.800003)
  236. Part17.Position = Vector3.new(-109.929504, 19.4206333, 29.3024216)
  237. Part17.Rotation = Vector3.new(28.2900009, -9.31000042, -125.82)
  238. Part17.Color = Color3.new(0, 0, 1)
  239. Part17.Size = Vector3.new(2.73488593, 6.11702633, 1.93403089)
  240. Part17.Anchored = true
  241. Part17.BottomSurface = Enum.SurfaceType.Smooth
  242. Part17.BrickColor = BrickColor.new("Really blue")
  243. Part17.Material = Enum.Material.Neon
  244. Part17.TopSurface = Enum.SurfaceType.Smooth
  245. Part17.brickColor = BrickColor.new("Really blue")
  246. Weld18.Parent = Part17
  247. Weld18.C0 = CFrame.new(68.8192596, 49.9356842, 19.5504303, 0, 0, -1, 1.00000024, 0, 0, 0, -1.00000024, 0)
  248. Weld18.C1 = CFrame.new(68.8474503, -19.1709213, 45.8922005, 0, 0, -1, 7.48784771e-07, 1.00000203, 0, 1.00000203, -7.48784771e-07, 0)
  249. Weld18.Part0 = Part17
  250. Weld18.Part1 = Part12
  251. Weld18.part1 = Part12
  252. for i,v in pairs(mas:GetChildren()) do
  253. v.Parent = workspace
  254. pcall(function() v:MakeJoints() end)
  255. end
  256. for i,v in pairs(cors) do
  257. spawn(function()
  258. pcall(v)
  259. end)
  260. end
Add Comment
Please, Sign In to add comment