Advertisement
yonidrori

Untitled

Sep 13th, 2015
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. User = script.Parent.Parent.Character
  2. if User.Name == "abakarir" then
  3.  
  4. TailParts = {User.Torso}
  5. Welds = {}
  6. for i = 2, 13 do
  7. TailParts[i] = Instance.new("Part", User)
  8. TailParts[i].Name = "TailPart"
  9. TailParts[i].CanCollide = false
  10. TailParts[i].Locked = true
  11. TailParts[i].formFactor = "Symmetric"
  12. TailParts[i].Size = Vector3.new(1, 1, 1)
  13. TailMesh = Instance.new("BlockMesh", TailParts[i])
  14. TailMesh.Name = "TailMesh"
  15. TailMesh.Scale = Vector3.new(0.3 - (i - 1) / 80, 0.3 - (i - 1) / 80, 0.25)
  16. Welds[i - 1] = Instance.new("Weld", TailParts[i])
  17. Welds[i - 1].Part0 = TailParts[i - 1]
  18. Welds[i - 1].Part1 = TailParts[i]
  19. Welds[i - 1].C0 = CFrame.new(0, 0, 0.125)
  20. Welds[i - 1].C1 = CFrame.new(0, 0, -0.125)
  21. if i ~= 13 then
  22. TailDecoration = Instance.new("Part", User)
  23. TailDecoration.Name = "TailPart"
  24. TailDecoration.CanCollide = false
  25. TailDecoration.Locked = true
  26. TailDecoration.formFactor = "Symmetric"
  27. TailDecoration.Size = Vector3.new(1, 1, 1)
  28. TailDecoration.BrickColor = BrickColor.new("Light stone grey")
  29. TailMesh = Instance.new("BlockMesh", TailDecoration)
  30. TailMesh.Name = "TailMesh"
  31. TailMesh.Scale = Vector3.new(0.305 - (i - 1) / 80, 0.1, 0.255)
  32. Weld = Instance.new("Weld", TailDecoration)
  33. Weld.Part0 = TailParts[i]
  34. Weld.Part1 = TailDecoration
  35. Weld.C0 = CFrame.new(0, -0.1, 0)
  36. Weld.C1 = CFrame.new(0, 0, 0)
  37. for e = 1, math.random(0, 1) do
  38. TailStrype = Instance.new("Part", User)
  39. TailStrype.Name = "TailPart"
  40. TailStrype.CanCollide = false
  41. TailStrype.Locked = true
  42. TailStrype.formFactor = "Symmetric"
  43. TailStrype.Size = Vector3.new(1, 1, 1)
  44. TailStrype.BrickColor = BrickColor.new("Dark stone grey")
  45. TailMesh = Instance.new("BlockMesh", TailStrype)
  46. TailMesh.Name = "TailMesh"
  47. TailMesh.Scale = Vector3.new(0.33 - (i - 1) / 80, 0.33 - (i - 1) / 80, 0.05)
  48. Weld = Instance.new("Weld", TailStrype)
  49. Weld.Part0 = TailParts[i]
  50. Weld.Part1 = TailStrype
  51. Weld.C0 = CFrame.new(0, 0, math.random(-10, 10) / 80)
  52. Weld.C1 = CFrame.new(0, 0, 0)
  53. end
  54. end
  55. end
  56. Welds[1].C0 = CFrame.new(0, -1, 0.5)
  57. --------------------
  58. --Part Colloration--
  59. --------------------
  60. for i = 2, 12 do
  61. TailParts[i].BrickColor = BrickColor.new("Light stone grey")
  62. end
  63. TailParts[13].BrickColor = BrickColor.new("Dark stone grey")
  64. -----------------------
  65. --Animation Smoothing--
  66. -----------------------
  67. function TailSmooth(WhereTo0, WhereTo1)
  68. CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p
  69. CR1 = CFrame.new(WhereTo0).p
  70. AddTo0 = (CR1 - CR0) / 20
  71. CR2 = CFrame.new(Welds[7].C1:toEulerAnglesXYZ()).p
  72. CR3 = CFrame.new(WhereTo1).p
  73. AddTo1 = (CR3 - CR2) / 20
  74. for a = 1, 10 do
  75. wait(0.025)
  76. for b = 1, 6 do
  77. Welds[b].C1 = Welds[b].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y + User.Torso.RotVelocity.y / 128, AddTo0.z)
  78. end
  79. for c = 7, 12 do
  80. Welds[c].C1 = Welds[c].C1 * CFrame.fromEulerAnglesXYZ(AddTo1.x, AddTo1.y + User.Torso.RotVelocity.y / 128, AddTo1.z)
  81. end
  82. end
  83. end
  84. ---------------------
  85. --Animation Players--
  86. ---------------------
  87. Variation = math.random(-5, 5) / 80
  88. while true do
  89. wait()
  90. Variation = (Variation + math.random(-5, 5) / 80) / 2
  91. if User.Torso.Velocity.magnitude > 8 then
  92. TailSmooth(Vector3.new(-math.pi / 12 + Variation, math.pi / 9, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 6, 0))
  93. TailSmooth(Vector3.new(-math.pi / 12 + Variation, math.pi / 6, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 12, 0))
  94. TailSmooth(Vector3.new(-math.pi / 12 + Variation, math.pi / 9, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 12, 0))
  95. TailSmooth(Vector3.new(-math.pi / 12 + Variation, -math.pi / 9, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 6, 0))
  96. TailSmooth(Vector3.new(-math.pi / 12 + Variation, -math.pi / 6, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 12, 0))
  97. TailSmooth(Vector3.new(-math.pi / 12 + Variation, -math.pi / 9, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 12, 0))
  98. else
  99. TailSmooth(Vector3.new(-math.pi / 24 + Variation, math.pi / 18, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 12, 0))
  100. TailSmooth(Vector3.new(-math.pi / 24 + Variation, math.pi / 12, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 24, 0))
  101. TailSmooth(Vector3.new(-math.pi / 24 + Variation, math.pi / 18, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 24, 0))
  102. TailSmooth(Vector3.new(-math.pi / 24 + Variation, -math.pi / 18, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 12, 0))
  103. TailSmooth(Vector3.new(-math.pi / 24 + Variation, -math.pi / 12, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, math.pi / 24, 0))
  104. TailSmooth(Vector3.new(-math.pi / 24 + Variation, -math.pi / 18, 0), Vector3.new(math.pi / 9 + math.random(-5, 5) / 20, -math.pi / 24, 0))
  105. end
  106. end
  107. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement