xNickel

Untitled

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