Advertisement
gokusteve

Untitled

Jun 14th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1.  
  2. 1.User = script.Parent.Parent.Character
  3.  
  4.  
  5. 2.if User.Name == "gokusteve" then
  6.  
  7.  
  8. 3.-------------------------------
  9.  
  10.  
  11. 4.--Part Making and Positioning--
  12.  
  13.  
  14. 5.-------------------------------
  15.  
  16.  
  17. 6.TailParts = {User.Torso}
  18.  
  19.  
  20. 7.Welds = {}
  21.  
  22.  
  23. 8.for i = 2, 13 do
  24.  
  25.  
  26. 9.TailParts[i] = Instance.new("Part", User)
  27.  
  28.  
  29. 10.TailParts[i].Name = "TailPart"
  30.  
  31.  
  32. 11.TailParts[i].CanCollide = false
  33.  
  34.  
  35. 12.TailParts[i].Locked = true
  36.  
  37.  
  38. 13.TailParts[i].formFactor = "Symmetric"
  39.  
  40.  
  41. 14.TailParts[i].Size = Vector3.new(1, 1, 1)
  42.  
  43.  
  44. 15.TailMesh = Instance.new("BlockMesh", TailParts[i])
  45.  
  46.  
  47. 16.TailMesh.Name = "TailMesh"
  48.  
  49.  
  50. 17.TailMesh.Scale = Vector3.new(0.3 - (i - 1) / 80, 0.3 - (i - 1) / 80, 0.25)
  51.  
  52.  
  53. 18.Welds[i - 1] = Instance.new("Weld", TailParts[i])
  54.  
  55.  
  56. 19.Welds[i - 1].Part0 = TailParts[i - 1]
  57.  
  58.  
  59. 20.Welds[i - 1].Part1 = TailParts[i]
  60.  
  61.  
  62. 21.Welds[i - 1].C0 = CFrame.new(0, 0, 0.125)
  63.  
  64.  
  65. 22.Welds[i - 1].C1 = CFrame.new(0, 0, -0.125)
  66.  
  67.  
  68. 23.if i ~= 13 then
  69.  
  70.  
  71. 24.TailDecoration = Instance.new("Part", User)
  72.  
  73.  
  74. 25.TailDecoration.Name = "TailPart"
  75.  
  76.  
  77. 26.TailDecoration.CanCollide = false
  78.  
  79.  
  80. 27.TailDecoration.Locked = true
  81.  
  82.  
  83. 28.TailDecoration.formFactor = "Symmetric"
  84.  
  85.  
  86. 29.TailDecoration.Size = Vector3.new(1, 1, 1)
  87.  
  88.  
  89. 30.TailDecoration.BrickColor = BrickColor.new("Light stone grey")
  90.  
  91.  
  92. 31.TailMesh = Instance.new("BlockMesh", TailDecoration)
  93.  
  94.  
  95. 32.TailMesh.Name = "TailMesh"
  96.  
  97.  
  98. 33.TailMesh.Scale = Vector3.new(0.305 - (i - 1) / 80, 0.1, 0.255)
  99.  
  100.  
  101. 34.Weld = Instance.new("Weld", TailDecoration)
  102.  
  103.  
  104. 35.Weld.Part0 = TailParts[i]
  105.  
  106.  
  107. 36.Weld.Part1 = TailDecoration
  108.  
  109.  
  110. 37.Weld.C0 = CFrame.new(0, -0.1, 0)
  111.  
  112.  
  113. 38.Weld.C1 = CFrame.new(0, 0, 0)
  114.  
  115.  
  116. 39.for e = 1, math.random(0, 1) do
  117.  
  118.  
  119. 40.TailStrype = Instance.new("Part", User)
  120.  
  121.  
  122. 41.TailStrype.Name = "TailPart"
  123.  
  124.  
  125. 42.TailStrype.CanCollide = false
  126.  
  127.  
  128. 43.TailStrype.Locked = true
  129.  
  130.  
  131. 44.TailStrype.formFactor = "Symmetric"
  132.  
  133.  
  134. 45.TailStrype.Size = Vector3.new(1, 1, 1)
  135.  
  136.  
  137. 46.TailStrype.BrickColor = BrickColor.new("Dark stone grey")
  138.  
  139.  
  140. 47.TailMesh = Instance.new("BlockMesh", TailStrype)
  141.  
  142.  
  143. 48.TailMesh.Name = "TailMesh"
  144.  
  145.  
  146. 49.TailMesh.Scale = Vector3.new(0.33 - (i - 1) / 80, 0.33 - (i - 1) / 80, 0.05)
  147.  
  148.  
  149. 50.Weld = Instance.new("Weld", TailStrype)
  150.  
  151.  
  152. 51.Weld.Part0 = TailParts[i]
  153.  
  154.  
  155. 52.Weld.Part1 = TailStrype
  156.  
  157.  
  158. 53.Weld.C0 = CFrame.new(0, 0, math.random(-10, 10) / 80)
  159.  
  160.  
  161. 54.Weld.C1 = CFrame.new(0, 0, 0)
  162.  
  163.  
  164. 55.end
  165.  
  166.  
  167. 56.end
  168.  
  169.  
  170. 57.end
  171.  
  172.  
  173. 58.Welds[1].C0 = CFrame.new(0, -1, 0.5)
  174.  
  175.  
  176. 59.--------------------
  177.  
  178.  
  179. 60.--Part Colloration--
  180.  
  181.  
  182. 61.--------------------
  183.  
  184.  
  185. 62.for i = 2, 12 do
  186.  
  187.  
  188. 63.TailParts[i].BrickColor = BrickColor.new("Light stone grey")
  189.  
  190.  
  191. 64.end
  192.  
  193.  
  194. 65.TailParts[13].BrickColor = BrickColor.new("Dark stone grey")
  195.  
  196.  
  197. 66.-----------------------
  198.  
  199.  
  200. 67.--Animation Smoothing--
  201.  
  202.  
  203. 68.-----------------------
  204.  
  205.  
  206. 69.function TailSmooth(WhereTo0, WhereTo1)
  207.  
  208.  
  209. 70.CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p
  210.  
  211.  
  212. 71.CR1 = CFrame.new(WhereTo0).p
  213.  
  214.  
  215. 72.AddTo0 = (CR1 - CR0) / 20
  216.  
  217.  
  218. 73.CR2 = CFrame.new(Welds[7].C1:toEulerAnglesXYZ()).p
  219.  
  220.  
  221. 74.CR3 = CFrame.new(WhereTo1).p
  222.  
  223.  
  224. 75.AddTo1 = (CR3 - CR2) / 20
  225.  
  226.  
  227. 76.for a = 1, 10 do
  228.  
  229.  
  230. 77.wait(0.025)
  231.  
  232.  
  233. 78.for b = 1, 6 do
  234.  
  235.  
  236. 79.Welds[b].C1 = Welds[b].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y + User.Torso.RotVelocity.y / 128, AddTo0.z)
  237.  
  238.  
  239. 80.end
  240.  
  241.  
  242. 81.for c = 7, 12 do
  243.  
  244.  
  245. 82.Welds[c].C1 = Welds[c].C1 * CFrame.fromEulerAnglesXYZ(AddTo1.x, AddTo1.y + User.Torso.RotVelocity.y / 128, AddTo1.z)
  246.  
  247.  
  248. 83.end
  249.  
  250.  
  251. 84.end
  252.  
  253.  
  254. 85.end
  255.  
  256.  
  257. 86.---------------------
  258.  
  259.  
  260. 87.--Animation Players--
  261.  
  262.  
  263. 88.---------------------
  264.  
  265.  
  266. 89.Variation = math.random(-5, 5) / 80
  267.  
  268.  
  269. 90.while true do
  270.  
  271.  
  272. 91.wait()
  273.  
  274.  
  275. 92.Variation = (Variation + math.random(-5, 5) / 80) / 2
  276.  
  277.  
  278. 93.if User.Torso.Velocity.magnitude > 8 then
  279.  
  280.  
  281. 94.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))
  282.  
  283.  
  284. 95.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))
  285.  
  286.  
  287. 96.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))
  288.  
  289.  
  290. 97.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))
  291.  
  292.  
  293. 98.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))
  294.  
  295.  
  296. 99.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))
  297.  
  298.  
  299. 100.else
  300.  
  301.  
  302. 101.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))
  303.  
  304.  
  305. 102.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))
  306.  
  307.  
  308. 103.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))
  309.  
  310.  
  311. 104.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))
  312.  
  313.  
  314. 105.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))
  315.  
  316.  
  317. 106.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))
  318.  
  319.  
  320. 107.end
  321.  
  322.  
  323. 108.end
  324.  
  325.  
  326. 109.end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement