Hebablazin

Giant

Jun 5th, 2016
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. function find(tab, arg, pos)
  2. for i,v in pairs(tab) do
  3. if v == arg and i == pos then
  4. return true
  5. end
  6. end
  7. return false
  8. end
  9.  
  10. function makeGiant(Character, S)
  11. local welds, hats = {}, {}
  12. local torso = Character:findFirstChild("Torso")
  13. local pos = torso.Position
  14. local ssss = torso.Size.Y
  15. for _,v in pairs(torso:children()) do
  16. if v:IsA("Motor6D") or v:IsA("Weld") or v:IsA("Motor") then
  17. table.insert(welds, {v, v.Part0, v.Part1})
  18. end
  19. end
  20. for _, v in pairs(Character:children()) do
  21. if v:IsA("Hat") then
  22. v.AttachmentPos = v.AttachmentPos*S
  23. v.Handle.Mesh.Scale = v.Handle.Mesh.Scale*S
  24. v.Parent = nil
  25. table.insert(hats, v)
  26. elseif v:IsA("BasePart") then
  27. v.formFactor = "Custom"
  28. v.Size = v.Size*S
  29. elseif v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") then
  30. v:remove()
  31. end
  32. end
  33. local anim = Character.Animate
  34. local animc = anim:clone()
  35. anim:remove()
  36. for _,v in pairs(welds) do
  37. local c1 = v[1].C1
  38. local c0 = v[1].C0
  39. local a1, a2, a3 = c1:toEulerAnglesXYZ()
  40. local b1, b2, b3 = c0:toEulerAnglesXYZ()
  41. c1 = CFrame.new(c1.p * S) * CFrame.Angles(a1, a2, a3)
  42. c0 = CFrame.new(c0.p * S) * CFrame.Angles(b1, b2, b3)
  43. local clon = v[1]:clone()
  44. v[1]:remove()
  45. clon.C1 = c1
  46. clon.C0 = c0
  47. clon.Part1 = v[3]
  48. clon.Part0 = v[2]
  49. clon.Parent = Character.Torso
  50. end
  51. animc.Parent = Character
  52. Character.Humanoid.WalkSpeed = 6+10*S
  53. Character:MoveTo(pos+Vector3.new(0,S*(ssss/2),0))
  54. wait(0.1)
  55. for i,v in pairs(hats) do
  56. v.Parent = Character
  57. end
  58. end
  59.  
  60. makeGiant(workspace.xSoulStealerx, 0.5)
Add Comment
Please, Sign In to add comment