Advertisement
lafur

Untitled

Oct 22nd, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.44 KB | None | 0 0
  1. --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
  2. --What's Added To M2S with Dittoide's Edit?
  3. --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
  4. --/ Removed Gui In Bottom-Left for when you are making guis.
  5. --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
  6. --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
  7. --Errors: Camera,Terrain
  8. local runDummyScript = function(f,scri)
  9. if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
  10. local Dummy_CoRoutine = coroutine.create(function()
  11. getfenv().script = scri
  12. ypcall(function() f() end)
  13. end)
  14. table.insert(cors,Dummy_CoRoutine);
  15. coroutine.resume(Dummy_CoRoutine);
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. mas.Name = "M2S_Model"
  20. o3 = Instance.new("Part")
  21. o4 = Instance.new("Model")
  22. o5 = Instance.new("Model")
  23. o6 = Instance.new("Part")
  24. o7 = Instance.new("Model")
  25. o8 = Instance.new("Part")
  26. o9 = Instance.new("Model")
  27. o10 = Instance.new("Part")
  28. o11 = Instance.new("Part")
  29. o12 = Instance.new("SpecialMesh")
  30. o13 = Instance.new("Part")
  31. o14 = Instance.new("SpecialMesh")
  32. o15 = Instance.new("Part")
  33. o16 = Instance.new("SpecialMesh")
  34. o17 = Instance.new("Part")
  35. o18 = Instance.new("SpecialMesh")
  36. o19 = Instance.new("Model")
  37. o20 = Instance.new("Part")
  38. o21 = Instance.new("Humanoid")
  39. o22 = Instance.new("Part")
  40. o23 = Instance.new("Script")
  41. o24 = Instance.new("Script")
  42. o25 = Instance.new("Script")
  43. o26 = Instance.new("Script")
  44. o27 = Instance.new("LocalScript")
  45. o28 = Instance.new("Script")
  46. o29 = Instance.new("Script")
  47. o30 = Instance.new("Model")
  48. o31 = Instance.new("Part")
  49. o32 = Instance.new("SpecialMesh")
  50. o33 = Instance.new("Model")
  51. o34 = Instance.new("Part")
  52. o3.Name = "Baseplate"
  53. o3.Parent = mas
  54. o3.BrickColor = BrickColor.new("Dark stone grey")
  55. o3.Position = Vector3.new(0, -10, 0)
  56. o3.Anchored = true
  57. o3.Locked = true
  58. o3.FormFactor = Enum.FormFactor.Symmetric
  59. o3.Size = Vector3.new(512, 20, 512)
  60. o3.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  61. o3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  62. o3.Position = Vector3.new(0, -10, 0)
  63. o4.Name = "Despacito Spider"
  64. o4.Parent = mas
  65. o5.Name = "Leg2"
  66. o5.Parent = o4
  67. o6.Name = "Middle"
  68. o6.Parent = o5
  69. o6.Material = Enum.Material.SmoothPlastic
  70. o6.BrickColor = BrickColor.new("Toothpaste")
  71. o6.Transparency = 1
  72. o6.Position = Vector3.new(-4.84442091, 3.55425906, -13.0755157)
  73. o6.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  74. o6.Anchored = true
  75. o6.FormFactor = Enum.FormFactor.Symmetric
  76. o6.Size = Vector3.new(1, 2, 1)
  77. o6.CFrame = CFrame.new(-4.84442091, 3.55425906, -13.0755157, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  78. o6.BottomSurface = Enum.SurfaceType.Smooth
  79. o6.TopSurface = Enum.SurfaceType.Smooth
  80. o6.Color = Color3.new(0, 1, 1)
  81. o6.Position = Vector3.new(-4.84442091, 3.55425906, -13.0755157)
  82. o7.Name = "Leg1"
  83. o7.Parent = o4
  84. o8.Name = "Middle"
  85. o8.Parent = o7
  86. o8.Material = Enum.Material.SmoothPlastic
  87. o8.BrickColor = BrickColor.new("Toothpaste")
  88. o8.Transparency = 1
  89. o8.Position = Vector3.new(-4.88909912, 3.55425191, -12.0771484)
  90. o8.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  91. o8.Anchored = true
  92. o8.FormFactor = Enum.FormFactor.Symmetric
  93. o8.Size = Vector3.new(1, 2, 1)
  94. o8.CFrame = CFrame.new(-4.88909912, 3.55425191, -12.0771484, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  95. o8.BottomSurface = Enum.SurfaceType.Smooth
  96. o8.TopSurface = Enum.SurfaceType.Smooth
  97. o8.Color = Color3.new(0, 1, 1)
  98. o8.Position = Vector3.new(-4.88909912, 3.55425191, -12.0771484)
  99. o9.Name = "Chest"
  100. o9.Parent = o4
  101. o10.Name = "Middle"
  102. o10.Parent = o9
  103. o10.Material = Enum.Material.SmoothPlastic
  104. o10.BrickColor = BrickColor.new("Toothpaste")
  105. o10.Reflectance = 0.5
  106. o10.Transparency = 1
  107. o10.Position = Vector3.new(-4.9022522, 5.55323982, -12.5778961)
  108. o10.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  109. o10.Anchored = true
  110. o10.FormFactor = Enum.FormFactor.Symmetric
  111. o10.Size = Vector3.new(2, 2, 1)
  112. o10.CFrame = CFrame.new(-4.9022522, 5.55323982, -12.5778961, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  113. o10.BottomSurface = Enum.SurfaceType.Smooth
  114. o10.TopSurface = Enum.SurfaceType.Smooth
  115. o10.Color = Color3.new(0, 1, 1)
  116. o10.Position = Vector3.new(-4.9022522, 5.55323982, -12.5778961)
  117. o11.Name = "Biggerhead"
  118. o11.Parent = o9
  119. o11.Position = Vector3.new(-4.94131422, 4.43987703, -12.6244345)
  120. o11.Rotation = Vector3.new(-180, -88.8299942, 0)
  121. o11.Anchored = true
  122. o11.FormFactor = Enum.FormFactor.Plate
  123. o11.Size = Vector3.new(3, 3, 3)
  124. o11.CFrame = CFrame.new(-4.94131422, 4.43987703, -12.6244345, 0.0204270072, 0, -0.999791384, 0, -1, 0, -0.999791384, 0, -0.0204270072)
  125. o11.BottomSurface = Enum.SurfaceType.Smooth
  126. o11.TopSurface = Enum.SurfaceType.Smooth
  127. o11.Position = Vector3.new(-4.94131422, 4.43987703, -12.6244345)
  128. o12.Parent = o11
  129. o12.MeshId = "http://www.roblox.com/asset/?id=1047997"
  130. o12.Scale = Vector3.new(1.5, 1.5, 1.5)
  131. o12.TextureId = "http://www.roblox.com/asset/?id=606673948"
  132. o12.MeshType = Enum.MeshType.FileMesh
  133. o13.Name = "Bighead"
  134. o13.Parent = o9
  135. o13.Position = Vector3.new(-4.94134521, 6.29006481, -12.6244345)
  136. o13.Rotation = Vector3.new(0.359999985, 88.8299942, -0.359999985)
  137. o13.Anchored = true
  138. o13.FormFactor = Enum.FormFactor.Plate
  139. o13.Size = Vector3.new(2.90001917, 2.90001917, 2.90001917)
  140. o13.CFrame = CFrame.new(-4.94134521, 6.29006481, -12.6244345, 0.0204270072, 0.000130007291, 0.999791384, -6.30000213e-05, 1, -0.000128747255, -0.999791384, -6.0356957e-05, 0.0204270147)
  141. o13.BottomSurface = Enum.SurfaceType.Smooth
  142. o13.TopSurface = Enum.SurfaceType.Smooth
  143. o13.Position = Vector3.new(-4.94134521, 6.29006481, -12.6244345)
  144. o14.Parent = o13
  145. o14.MeshId = "http://www.roblox.com/asset/?id=1047997"
  146. o14.Scale = Vector3.new(1.45000958, 1.45000958, 1.45000958)
  147. o14.TextureId = "http://www.roblox.com/asset/?id=1047998"
  148. o14.MeshType = Enum.MeshType.FileMesh
  149. o15.Name = "SpiderLegs"
  150. o15.Parent = o9
  151. o15.Position = Vector3.new(-4.94128418, 3.81869411, -12.6244965)
  152. o15.Rotation = Vector3.new(0, 88.8299942, 0)
  153. o15.Anchored = true
  154. o15.FormFactor = Enum.FormFactor.Custom
  155. o15.Size = Vector3.new(7.24265194, 7.24265194, 0.905331492)
  156. o15.CFrame = CFrame.new(-4.94128418, 3.81869411, -12.6244965, 0.0204270072, 0, 0.999791384, 0, 1, 0, -0.999791384, 0, 0.0204270072)
  157. o15.BottomSurface = Enum.SurfaceType.Smooth
  158. o15.TopSurface = Enum.SurfaceType.Smooth
  159. o15.Position = Vector3.new(-4.94128418, 3.81869411, -12.6244965)
  160. o16.Parent = o15
  161. o16.MeshId = "rbxassetid://302260025"
  162. o16.Scale = Vector3.new(0.724265337, 0.724265337, 0.724265337)
  163. o16.TextureId = "rbxassetid://302260095"
  164. o16.MeshType = Enum.MeshType.FileMesh
  165. o17.Name = "SpiderLegs"
  166. o17.Parent = o15
  167. o17.Position = Vector3.new(-4.94128418, 3.7200191, -12.6244965)
  168. o17.Rotation = Vector3.new(0, 88.8299942, 0)
  169. o17.Anchored = true
  170. o17.FormFactor = Enum.FormFactor.Custom
  171. o17.Size = Vector3.new(7.24265194, 7.4399991, 0.905331492)
  172. o17.CFrame = CFrame.new(-4.94128418, 3.7200191, -12.6244965, 0.0204270072, 0, 0.999791384, 0, 1, 0, -0.999791384, 0, 0.0204270072)
  173. o17.BottomSurface = Enum.SurfaceType.Smooth
  174. o17.TopSurface = Enum.SurfaceType.Smooth
  175. o17.Position = Vector3.new(-4.94128418, 3.7200191, -12.6244965)
  176. o18.Parent = o17
  177. o18.MeshId = "rbxassetid://302260025"
  178. o18.Scale = Vector3.new(0.724265337, 0.724265337, 0.724265337)
  179. o18.TextureId = "rbxassetid://302260095"
  180. o18.MeshType = Enum.MeshType.FileMesh
  181. o19.Name = "Arm1"
  182. o19.Parent = o4
  183. o20.Name = "Middle"
  184. o20.Parent = o19
  185. o20.Material = Enum.Material.SmoothPlastic
  186. o20.BrickColor = BrickColor.new("Toothpaste")
  187. o20.Transparency = 1
  188. o20.Position = Vector3.new(-4.96960402, 5.55327415, -11.0795441)
  189. o20.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  190. o20.Anchored = true
  191. o20.FormFactor = Enum.FormFactor.Symmetric
  192. o20.Size = Vector3.new(1, 2, 1)
  193. o20.CFrame = CFrame.new(-4.96960402, 5.55327415, -11.0795441, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  194. o20.BottomSurface = Enum.SurfaceType.Smooth
  195. o20.TopSurface = Enum.SurfaceType.Smooth
  196. o20.Color = Color3.new(0, 1, 1)
  197. o20.Position = Vector3.new(-4.96960402, 5.55327415, -11.0795441)
  198. o21.Parent = o4
  199. o21.Health = 0
  200. o21.MaxHealth = 0
  201. o22.Name = "Head"
  202. o22.Parent = o4
  203. o22.BrickColor = BrickColor.new("Really black")
  204. o22.Position = Vector3.new(-8.3656311, 2.53267288, -12.8221884)
  205. o22.Rotation = Vector3.new(0, 88.4399948, 90)
  206. o22.Anchored = true
  207. o22.FormFactor = Enum.FormFactor.Custom
  208. o22.Shape = Enum.PartType.Cylinder
  209. o22.Size = Vector3.new(0.200000003, 4.19999981, 4)
  210. o22.CFrame = CFrame.new(-8.3656311, 2.53267288, -12.8221884, 0, -0.0272749998, 0.999628007, 1, 0, 0, 0, 0.999628007, 0.0272749998)
  211. o22.BottomSurface = Enum.SurfaceType.Smooth
  212. o22.TopSurface = Enum.SurfaceType.Smooth
  213. o22.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  214. o22.Position = Vector3.new(-8.3656311, 2.53267288, -12.8221884)
  215. o23.Name = "HatRemover"
  216. o23.Parent = o22
  217.  
  218. runDummyScript(function()
  219. function onTouched(hit)
  220. local d = hit.Parent:GetChildren()
  221. for i=1, #d do
  222. if (d[i].className == "Hat") then
  223. d[i]:remove()
  224. end
  225. end
  226. end
  227.  
  228. script.Parent.Touched:connect(onTouched)
  229. end,o23)
  230.  
  231. o24.Parent = o22
  232.  
  233. runDummyScript(function()
  234. -- declarations
  235.  
  236. local head = script.Parent
  237. local sound = head:findFirstChild("Victory")
  238.  
  239. function onTouched(part)
  240. local h = part.Parent:findFirstChild("Humanoid")
  241. if h~=nil then
  242. sound:play()
  243. if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
  244. part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="717dea9c5a1659640155f77c84892c " end
  245. end
  246.  
  247. script.Parent.Touched:connect(onTouched)
  248. end,o24)
  249.  
  250. o25.Parent = o22
  251.  
  252. runDummyScript(function()
  253. -- declarations
  254.  
  255. local head = script.Parent
  256. local sound = head:findFirstChild("Victory")
  257.  
  258. function onTouched(part)
  259. local h = part.Parent:findFirstChild("Humanoid")
  260. if h~=nil then
  261. sound:play()
  262. if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
  263. part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="717dea9c5a1659640155f77c84892c " end
  264. end
  265.  
  266. script.Parent.Touched:connect(onTouched)
  267. end,o25)
  268.  
  269. o26.Name = "Stepped"
  270. o26.Parent = o22
  271.  
  272. runDummyScript(function()
  273. local Button = script.Parent
  274. local Sound = Button:WaitForChild("Sound") -- change if you change the name of the sound
  275. local SoundPlayer = script:WaitForChild("SoundPlayer")
  276.  
  277. function GiveSound(Character)
  278. local Player = game.Players:GetPlayerFromCharacter(Character)
  279. if Player ~= nil then
  280. local PlayerGui = Player:FindFirstChild("PlayerGui")
  281. if PlayerGui ~= nil then
  282. local SoundScript = SoundPlayer:clone()
  283. local SoundCopy = Sound:clone()
  284. SoundCopy.Name = "Sound"
  285. SoundCopy.Parent = SoundScript
  286.  
  287. SoundScript.Parent = PlayerGui
  288. SoundScript.Disabled = false
  289. end
  290. end
  291. end
  292.  
  293. function Stepped(Part)
  294. if Part.Parent == nil then return end
  295. GiveSound(Part.Parent)
  296. end
  297. Button.Touched:connect(Stepped)
  298.  
  299. end,o26)
  300.  
  301. o27.Name = "SoundPlayer"
  302. o27.Parent = o26
  303. o27.Disabled = true
  304.  
  305. runDummyScript(function()
  306. local Camera = game.Workspace.CurrentCamera
  307. local Sound = script:WaitForChild("Sound")
  308.  
  309. local RobloxHasWorkingIsPlaying = false -- change me to true when roblox updates IsPlaying
  310. local SoundDeleteTimeForNonLooped = 1 -- set me while roblox still has non working IsPlaying
  311.  
  312. function PlaySound()
  313. Sound.Name = "SteppedSound"
  314. Sound.Parent = Camera
  315. if RobloxHasWorkingIsPlaying then
  316. Sound.Changed:connect(function(Property) if Property == "IsPlaying" and Sound.IsPlaying == false then Sound:Destroy(); script:Destroy() end end)
  317. Sound:Play()
  318. elseif not Sound.Looped then
  319. game.Debris:AddItem(Sound,SoundDeleteTimeForNonLooped)
  320. Sound:Play()
  321. script:Destroy()
  322. else
  323. Sound:Play()
  324. script:Destroy()
  325. end
  326. end
  327.  
  328. function Soundify()
  329. local OldSound = Camera:FindFirstChild("SteppedSound")
  330. if OldSound ~= nil then
  331. if OldSound.SoundId ~= Sound.SoundId then
  332. OldSound:Destroy()
  333. PlaySound()
  334. else
  335. script:Destroy()
  336. end
  337. else
  338. PlaySound()
  339. end
  340. end
  341.  
  342. Soundify()
  343. end,o27)
  344.  
  345. o28.Name = "Morph Script"
  346. o28.Parent = o22
  347.  
  348. runDummyScript(function()
  349. function onTouched(hit)
  350.  
  351. if hit.Parent:findFirstChild("Arm1") ~= nil then
  352. hit.Parent:findFirstChild("Arm1"):Destroy()
  353. end
  354.  
  355. if hit.Parent:findFirstChild("Arm2") ~= nil then
  356. hit.Parent:findFirstChild("Arm2"):Destroy()
  357. end
  358.  
  359. if hit.Parent:findFirstChild("Leg1") ~= nil then
  360. hit.Parent:findFirstChild("Leg1"):Destroy()
  361. end
  362.  
  363. if hit.Parent:findFirstChild("Leg2") ~= nil then
  364. hit.Parent:findFirstChild("Leg2"):Destroy()
  365. end
  366.  
  367. if hit.Parent:findFirstChild("Chest") ~= nil then
  368. hit.Parent:findFirstChild("Chest"):Destroy()
  369. end
  370.  
  371. if hit.Parent:findFirstChild("xHead") ~= nil then
  372. hit.Parent:findFirstChild("xHead"):Destroy()
  373. end
  374. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Arm1") == nil then
  375. local g = script.Parent.Parent.Arm1:clone()
  376. g.Parent = hit.Parent
  377. local C = g:GetChildren()
  378. for i=1, #C do
  379. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  380. local W = Instance.new("Weld")
  381. W.Part0 = g.Middle
  382. W.Part1 = C[i]
  383. local CJ = CFrame.new(g.Middle.Position)
  384. local C0 = g.Middle.CFrame:inverse()*CJ
  385. local C1 = C[i].CFrame:inverse()*CJ
  386. W.C0 = C0
  387. W.C1 = C1
  388. W.Parent = g.Middle
  389. end
  390. local Y = Instance.new("Weld")
  391. Y.Part0 = hit.Parent["Left Arm"]
  392. Y.Part1 = g.Middle
  393. Y.C0 = CFrame.new(0, 0, 0)
  394. Y.Parent = Y.Part0
  395. end
  396.  
  397. local h = g:GetChildren()
  398. for i = 1, # h do
  399. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  400. h[i].Anchored = false
  401. h[i].CanCollide = false
  402. end
  403. end
  404.  
  405. end
  406.  
  407. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Arm2") == nil then
  408. local g = script.Parent.Parent.Arm2:clone()
  409. g.Parent = hit.Parent
  410. local C = g:GetChildren()
  411. for i=1, #C do
  412. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  413. local W = Instance.new("Weld")
  414. W.Part0 = g.Middle
  415. W.Part1 = C[i]
  416. local CJ = CFrame.new(g.Middle.Position)
  417. local C0 = g.Middle.CFrame:inverse()*CJ
  418. local C1 = C[i].CFrame:inverse()*CJ
  419. W.C0 = C0
  420. W.C1 = C1
  421. W.Parent = g.Middle
  422. end
  423. local Y = Instance.new("Weld")
  424. Y.Part0 = hit.Parent["Right Arm"]
  425. Y.Part1 = g.Middle
  426. Y.C0 = CFrame.new(0, 0, 0)
  427. Y.Parent = Y.Part0
  428. end
  429.  
  430. local h = g:GetChildren()
  431. for i = 1, # h do
  432. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  433. h[i].Anchored = false
  434. h[i].CanCollide = false
  435. end
  436. end
  437.  
  438. end
  439. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Leg1") == nil then
  440. local g = script.Parent.Parent.Leg1:clone()
  441. g.Parent = hit.Parent
  442. local C = g:GetChildren()
  443. for i=1, #C do
  444. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  445. local W = Instance.new("Weld")
  446. W.Part0 = g.Middle
  447. W.Part1 = C[i]
  448. local CJ = CFrame.new(g.Middle.Position)
  449. local C0 = g.Middle.CFrame:inverse()*CJ
  450. local C1 = C[i].CFrame:inverse()*CJ
  451. W.C0 = C0
  452. W.C1 = C1
  453. W.Parent = g.Middle
  454. end
  455. local Y = Instance.new("Weld")
  456. Y.Part0 = hit.Parent["Left Leg"]
  457. Y.Part1 = g.Middle
  458. Y.C0 = CFrame.new(0, 0, 0)
  459. Y.Parent = Y.Part0
  460. end
  461.  
  462. local h = g:GetChildren()
  463. for i = 1, # h do
  464. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  465. h[i].Anchored = false
  466. h[i].CanCollide = false
  467. end
  468. end
  469.  
  470. end
  471. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Leg2") == nil then
  472. local g = script.Parent.Parent.Leg2:clone()
  473. g.Parent = hit.Parent
  474. local C = g:GetChildren()
  475. for i=1, #C do
  476. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  477. local W = Instance.new("Weld")
  478. W.Part0 = g.Middle
  479. W.Part1 = C[i]
  480. local CJ = CFrame.new(g.Middle.Position)
  481. local C0 = g.Middle.CFrame:inverse()*CJ
  482. local C1 = C[i].CFrame:inverse()*CJ
  483. W.C0 = C0
  484. W.C1 = C1
  485. W.Parent = g.Middle
  486. end
  487. local Y = Instance.new("Weld")
  488. Y.Part0 = hit.Parent["Right Leg"]
  489. Y.Part1 = g.Middle
  490. Y.C0 = CFrame.new(0, 0, 0)
  491. Y.Parent = Y.Part0
  492. end
  493.  
  494. local h = g:GetChildren()
  495. for i = 1, # h do
  496. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  497. h[i].Anchored = false
  498. h[i].CanCollide = false
  499. end
  500. end
  501.  
  502. end
  503.  
  504.  
  505. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("xHead") == nil then
  506. local g = script.Parent.Parent.xHead:clone()
  507. g.Parent = hit.Parent
  508. local C = g:GetChildren()
  509. for i=1, #C do
  510. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  511. local W = Instance.new("Weld")
  512. W.Part0 = g.Middle
  513. W.Part1 = C[i]
  514. local CJ = CFrame.new(g.Middle.Position)
  515. local C0 = g.Middle.CFrame:inverse()*CJ
  516. local C1 = C[i].CFrame:inverse()*CJ
  517. W.C0 = C0
  518. W.C1 = C1
  519. W.Parent = g.Middle
  520. end
  521. local Y = Instance.new("Weld")
  522. Y.Part0 = hit.Parent["Head"]
  523. Y.Part1 = g.Middle
  524. Y.C0 = CFrame.new(0, 0, 0)
  525. Y.Parent = Y.Part0
  526. end
  527.  
  528. local h = g:GetChildren()
  529. for i = 1, # h do
  530. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  531. h[i].Anchored = false
  532. h[i].CanCollide = false
  533. end
  534. end
  535.  
  536. end
  537.  
  538.  
  539.  
  540. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Chest") == nil then
  541. local g = script.Parent.Parent.Chest:clone()
  542. g.Parent = hit.Parent
  543. local C = g:GetChildren()
  544. for i=1, #C do
  545. if C[i].className == "Part" or C[i].className == "UnionOperation" then
  546. local W = Instance.new("Weld")
  547. W.Part0 = g.Middle
  548. W.Part1 = C[i]
  549. local CJ = CFrame.new(g.Middle.Position)
  550. local C0 = g.Middle.CFrame:inverse()*CJ
  551. local C1 = C[i].CFrame:inverse()*CJ
  552. W.C0 = C0
  553. W.C1 = C1
  554. W.Parent = g.Middle
  555. end
  556. local Y = Instance.new("Weld")
  557. Y.Part0 = hit.Parent.Torso
  558. Y.Part1 = g.Middle
  559. Y.C0 = CFrame.new(0, 0, 0)
  560. Y.Parent = Y.Part0
  561. end
  562.  
  563. local h = g:GetChildren()
  564. for i = 1, # h do
  565. if h[i].className == "Part" or C[i].className == "UnionOperation" then
  566. h[i].Anchored = false
  567. h[i].CanCollide = false
  568. end
  569. end
  570. hit.Parent:findFirstChild("Head").BrickColor = BrickColor.new(125)
  571. hit.Parent:findFirstChild("Head").Transparency = 0.98
  572. hit.Parent:findFirstChild("Torso").BrickColor = BrickColor.new(23)
  573. hit.Parent:findFirstChild("Torso").Transparency = 1
  574. hit.Parent:findFirstChild("Left Arm").BrickColor = BrickColor.new(23)
  575. hit.Parent:findFirstChild("Left Arm").Transparency = 1
  576. hit.Parent:findFirstChild("Right Arm").BrickColor = BrickColor.new(23)
  577. hit.Parent:findFirstChild("Right Arm").Transparency = 1
  578. hit.Parent:findFirstChild("Left Leg").BrickColor = BrickColor.new(23)
  579. hit.Parent:findFirstChild("Left Leg").CanCollide = true
  580. hit.Parent:findFirstChild("Left Leg").Transparency = 1
  581. hit.Parent:findFirstChild("Right Leg").BrickColor = BrickColor.new(23)
  582. hit.Parent:findFirstChild("Right Leg").CanCollide = true
  583. hit.Parent:findFirstChild("Right Leg").Transparency = 1
  584. end
  585. end
  586. script.Parent.Touched:connect(onTouched)
  587. end,o28)
  588.  
  589. o29.Name = "Instructions"
  590. o29.Parent = o4
  591.  
  592. runDummyScript(function()
  593. --[[how to make a morph that works with meshes and unions!
  594.  
  595. take a regular brick, make it look like whatever you want,
  596. put it on the person where you want it to be,
  597. and put it in the model inside the morph that the brick is on
  598. its that easy!
  599. Credit to blockgun
  600.  
  601. ~hiimcool34]]
  602. end,o29)
  603.  
  604. o30.Name = "xHead"
  605. o30.Parent = o4
  606. o31.Name = "Middle"
  607. o31.Parent = o30
  608. o31.Material = Enum.Material.SmoothPlastic
  609. o31.BrickColor = BrickColor.new("Navy blue")
  610. o31.Reflectance = 0.5
  611. o31.Transparency = 1
  612. o31.Position = Vector3.new(-4.92971802, 7.05269623, -12.5790396)
  613. o31.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  614. o31.Anchored = true
  615. o31.FormFactor = Enum.FormFactor.Symmetric
  616. o31.Size = Vector3.new(2, 1, 1)
  617. o31.CFrame = CFrame.new(-4.92971802, 7.05269623, -12.5790396, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  618. o31.BottomSurface = Enum.SurfaceType.Smooth
  619. o31.TopSurface = Enum.SurfaceType.Smooth
  620. o31.Color = Color3.new(0, 0.12549, 0.376471)
  621. o31.Position = Vector3.new(-4.92971802, 7.05269623, -12.5790396)
  622. o32.Parent = o31
  623. o32.Scale = Vector3.new(1.25, 1.25, 1.25)
  624. o33.Name = "Arm2"
  625. o33.Parent = o4
  626. o34.Name = "Middle"
  627. o34.Parent = o33
  628. o34.Material = Enum.Material.SmoothPlastic
  629. o34.BrickColor = BrickColor.new("Bright yellow")
  630. o34.Transparency = 1
  631. o34.Position = Vector3.new(-4.83511305, 5.55327415, -14.0761261)
  632. o34.Rotation = Vector3.new(-21.5599995, 87.2399979, 21.539999)
  633. o34.Anchored = true
  634. o34.FormFactor = Enum.FormFactor.Symmetric
  635. o34.Size = Vector3.new(1, 2, 1)
  636. o34.CFrame = CFrame.new(-4.83511305, 5.55327415, -14.0761261, 0.0448689945, -0.017707983, 0.998835981, 0, 0.999842882, 0.0177258365, -0.99899286, -0.000795340398, 0.04486195)
  637. o34.BottomSurface = Enum.SurfaceType.Smooth
  638. o34.TopSurface = Enum.SurfaceType.Smooth
  639. o34.Color = Color3.new(0.960784, 0.803922, 0.188235)
  640. o34.Position = Vector3.new(-4.83511305, 5.55327415, -14.0761261)
  641. mas.Parent = workspace
  642. mas:MakeJoints()
  643. local mas1 = mas:GetChildren()
  644. for i=1,#mas1 do
  645. mas1[i].Parent = workspace
  646. ypcall(function() mas1[i]:MakeJoints() end)
  647. end
  648. mas:Destroy()
  649. for i=1,#cors do
  650. coroutine.resume(cors[i])
  651. end
  652. mess_handle.Text = "Resetting"
  653. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  654. v:LoadCharacter()
  655. end
  656. wait(1)
  657. mess_handle:Remove()
  658.  
  659. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  660. game:GetService("Lighting").Brightness = 1
  661. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  662. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  663. game:GetService("Lighting").GlobalShadows = true
  664. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  665. game:GetService("Lighting").Outlines = false
  666. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  667. game:GetService("Lighting").TimeOfDay = "14:00:00"
  668. game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
  669. game:GetService("Lighting").FogEnd = 100000
  670. game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement