Advertisement
Animescapetower

Ice Giant - Ruin Upgrade

Mar 18th, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.23 KB | None | 0 0
  1. -- If you can't unstand people spamming g/c then i add the thing into your character now
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Attachment2 = Instance.new("Attachment")
  22. Attachment3 = Instance.new("Attachment")
  23. Attachment4 = Instance.new("Attachment")
  24. Attachment5 = Instance.new("Attachment")
  25. SpecialMesh6 = Instance.new("SpecialMesh")
  26. Weld7 = Instance.new("Weld")
  27. Decal8 = Instance.new("Decal")
  28. Part9 = Instance.new("Part")
  29. Motor6D10 = Instance.new("Motor6D")
  30. Part11 = Instance.new("Part")
  31. Attachment12 = Instance.new("Attachment")
  32. Attachment13 = Instance.new("Attachment")
  33. Attachment14 = Instance.new("Attachment")
  34. Part15 = Instance.new("Part")
  35. Part16 = Instance.new("Part")
  36. Attachment17 = Instance.new("Attachment")
  37. Part18 = Instance.new("Part")
  38. Part19 = Instance.new("Part")
  39. Attachment20 = Instance.new("Attachment")
  40. Attachment21 = Instance.new("Attachment")
  41. Attachment22 = Instance.new("Attachment")
  42. Attachment23 = Instance.new("Attachment")
  43. Attachment24 = Instance.new("Attachment")
  44. Attachment25 = Instance.new("Attachment")
  45. Attachment26 = Instance.new("Attachment")
  46. Motor6D27 = Instance.new("Motor6D")
  47. Motor6D28 = Instance.new("Motor6D")
  48. Motor6D29 = Instance.new("Motor6D")
  49. Motor6D30 = Instance.new("Motor6D")
  50. Motor6D31 = Instance.new("Motor6D")
  51. Humanoid32 = Instance.new("Humanoid")
  52. WedgePart33 = Instance.new("WedgePart")
  53. WedgePart34 = Instance.new("WedgePart")
  54. Model35 = Instance.new("Model")
  55. Accessory36 = Instance.new("Accessory")
  56. Part37 = Instance.new("Part")
  57. SpecialMesh38 = Instance.new("SpecialMesh")
  58. Part39 = Instance.new("Part")
  59. Attachment40 = Instance.new("Attachment")
  60. Part41 = Instance.new("Part")
  61. Attachment42 = Instance.new("Attachment")
  62. ManualWeld43 = Instance.new("ManualWeld")
  63. Part44 = Instance.new("Part")
  64. Attachment45 = Instance.new("Attachment")
  65. WedgePart46 = Instance.new("WedgePart")
  66. WedgePart47 = Instance.new("WedgePart")
  67. WedgePart48 = Instance.new("WedgePart")
  68. WedgePart49 = Instance.new("WedgePart")
  69. WedgePart50 = Instance.new("WedgePart")
  70. WedgePart51 = Instance.new("WedgePart")
  71. WedgePart52 = Instance.new("WedgePart")
  72. WedgePart53 = Instance.new("WedgePart")
  73. Script54 = Instance.new("Script")
  74. StringValue55 = Instance.new("StringValue")
  75. Animation56 = Instance.new("Animation")
  76. NumberValue57 = Instance.new("NumberValue")
  77. Animation58 = Instance.new("Animation")
  78. NumberValue59 = Instance.new("NumberValue")
  79. StringValue60 = Instance.new("StringValue")
  80. Animation61 = Instance.new("Animation")
  81. StringValue62 = Instance.new("StringValue")
  82. Animation63 = Instance.new("Animation")
  83. StringValue64 = Instance.new("StringValue")
  84. Animation65 = Instance.new("Animation")
  85. StringValue66 = Instance.new("StringValue")
  86. Animation67 = Instance.new("Animation")
  87. StringValue68 = Instance.new("StringValue")
  88. Animation69 = Instance.new("Animation")
  89. StringValue70 = Instance.new("StringValue")
  90. Animation71 = Instance.new("Animation")
  91. StringValue72 = Instance.new("StringValue")
  92. Animation73 = Instance.new("Animation")
  93. Model0.Name = ""
  94. Model0.Parent = mas
  95. Model0.PrimaryPart = Part9
  96. Part1.Name = "Head"
  97. Part1.Parent = Model0
  98. Part1.BrickColor = BrickColor.new("Pastel light blue")
  99. Part1.Rotation = Vector3.new(-180, 0, -180)
  100. Part1.FormFactor = Enum.FormFactor.Symmetric
  101. Part1.Size = Vector3.new(3.40799999, 1.704, 1.704)
  102. Part1.CFrame = CFrame.new(-20.7302055, 7.6680212, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  103. Part1.TopSurface = Enum.SurfaceType.Smooth
  104. Part1.Color = Color3.new(0.686275, 0.866667, 1)
  105. Part1.Position = Vector3.new(-20.7302055, 7.6680212, 4.89356422)
  106. Part1.Orientation = Vector3.new(0, 180, 0)
  107. Part1.Color = Color3.new(0.686275, 0.866667, 1)
  108. Attachment2.Name = "HatAttachment"
  109. Attachment2.Parent = Part1
  110. Attachment2.CFrame = CFrame.new(0, 1.0223999, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  111. Attachment2.Position = Vector3.new(0, 1.0223999, 0)
  112. Attachment3.Name = "HairAttachment"
  113. Attachment3.Parent = Part1
  114. Attachment3.CFrame = CFrame.new(0, 1.0223999, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  115. Attachment3.Position = Vector3.new(0, 1.0223999, 0)
  116. Attachment4.Name = "FaceCenterAttachment"
  117. Attachment4.Parent = Part1
  118. Attachment5.Name = "FaceFrontAttachment"
  119. Attachment5.Parent = Part1
  120. Attachment5.CFrame = CFrame.new(0, 0, -1.0223999, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  121. Attachment5.Position = Vector3.new(0, 0, -1.0223999)
  122. SpecialMesh6.Parent = Part1
  123. SpecialMesh6.Scale = Vector3.new(1.25, 1.25, 1.25)
  124. SpecialMesh6.Scale = Vector3.new(1.25, 1.25, 1.25)
  125. Weld7.Name = "HeadWeld"
  126. Weld7.Parent = Part1
  127. Weld7.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  128. Weld7.Part0 = Part1
  129. Weld7.Part1 = Part37
  130. Decal8.Parent = Part1
  131. Decal8.Texture = "http://www.roblox.com/asset/?id=431054853"
  132. Part9.Name = "HumanoidRootPart"
  133. Part9.Parent = Model0
  134. Part9.Transparency = 1
  135. Part9.Rotation = Vector3.new(-180, 0, -180)
  136. Part9.Anchored = true
  137. Part9.CanCollide = false
  138. Part9.FormFactor = Enum.FormFactor.Symmetric
  139. Part9.Size = Vector3.new(3.40799999, 3.40799999, 1.704)
  140. Part9.CFrame = CFrame.new(-20.7302055, 5.11202145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  141. Part9.BottomSurface = Enum.SurfaceType.Smooth
  142. Part9.TopSurface = Enum.SurfaceType.Smooth
  143. Part9.Position = Vector3.new(-20.7302055, 5.11202145, 4.89356422)
  144. Part9.Orientation = Vector3.new(0, 180, 0)
  145. Motor6D10.Name = "RootJoint"
  146. Motor6D10.Parent = Part9
  147. Motor6D10.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  148. Motor6D10.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  149. Motor6D10.Part0 = Part9
  150. Motor6D10.Part1 = Part19
  151. Motor6D10.MaxVelocity = 0.10000000149012
  152. Part11.Name = "Left Arm"
  153. Part11.Parent = Model0
  154. Part11.BrickColor = BrickColor.new("Pastel light blue")
  155. Part11.Rotation = Vector3.new(-180, 0, -180)
  156. Part11.CanCollide = false
  157. Part11.FormFactor = Enum.FormFactor.Symmetric
  158. Part11.Size = Vector3.new(1.704, 3.40799999, 1.704)
  159. Part11.CFrame = CFrame.new(-18.1742058, 5.11202145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  160. Part11.Color = Color3.new(0.686275, 0.866667, 1)
  161. Part11.Position = Vector3.new(-18.1742058, 5.11202145, 4.89356422)
  162. Part11.Orientation = Vector3.new(0, 180, 0)
  163. Part11.Color = Color3.new(0.686275, 0.866667, 1)
  164. Attachment12.Name = "LeftShoulderAttachment"
  165. Attachment12.Parent = Part11
  166. Attachment12.CFrame = CFrame.new(0, 1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  167. Attachment12.Position = Vector3.new(0, 1.704, 0)
  168. Attachment13.Parent = Part11
  169. Attachment13.Rotation = Vector3.new(-0, -0, -90)
  170. Attachment13.CFrame = CFrame.new(-0.27264002, -1.704, -0.357839972, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  171. Attachment13.Position = Vector3.new(-0.27264002, -1.704, -0.357839972)
  172. Attachment13.Axis = Vector3.new(0, -1, 0)
  173. Attachment13.Orientation = Vector3.new(-0, -0, -90)
  174. Attachment14.Parent = Part11
  175. Attachment14.Rotation = Vector3.new(-0, -0, -90)
  176. Attachment14.CFrame = CFrame.new(-0.170399979, -1.704, 0.408959866, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  177. Attachment14.Position = Vector3.new(-0.170399979, -1.704, 0.408959866)
  178. Attachment14.Axis = Vector3.new(0, -1, 0)
  179. Attachment14.Orientation = Vector3.new(-0, -0, -90)
  180. Part15.Name = "Left Leg"
  181. Part15.Parent = Model0
  182. Part15.BrickColor = BrickColor.new("Pastel light blue")
  183. Part15.Rotation = Vector3.new(-180, 0, -180)
  184. Part15.CanCollide = false
  185. Part15.FormFactor = Enum.FormFactor.Symmetric
  186. Part15.Size = Vector3.new(1.704, 3.40799999, 1.704)
  187. Part15.CFrame = CFrame.new(-19.8782063, 1.70402145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  188. Part15.BottomSurface = Enum.SurfaceType.Smooth
  189. Part15.Color = Color3.new(0.686275, 0.866667, 1)
  190. Part15.Position = Vector3.new(-19.8782063, 1.70402145, 4.89356422)
  191. Part15.Orientation = Vector3.new(0, 180, 0)
  192. Part15.Color = Color3.new(0.686275, 0.866667, 1)
  193. Part16.Name = "Right Arm"
  194. Part16.Parent = Model0
  195. Part16.BrickColor = BrickColor.new("Pastel light blue")
  196. Part16.Rotation = Vector3.new(-180, 0, -180)
  197. Part16.CanCollide = false
  198. Part16.FormFactor = Enum.FormFactor.Symmetric
  199. Part16.Size = Vector3.new(1.704, 3.40799999, 1.704)
  200. Part16.CFrame = CFrame.new(-23.2862053, 5.11202145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  201. Part16.Color = Color3.new(0.686275, 0.866667, 1)
  202. Part16.Position = Vector3.new(-23.2862053, 5.11202145, 4.89356422)
  203. Part16.Orientation = Vector3.new(0, 180, 0)
  204. Part16.Color = Color3.new(0.686275, 0.866667, 1)
  205. Attachment17.Name = "RightShoulderAttachment"
  206. Attachment17.Parent = Part16
  207. Attachment17.CFrame = CFrame.new(0, 1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  208. Attachment17.Position = Vector3.new(0, 1.704, 0)
  209. Part18.Name = "Right Leg"
  210. Part18.Parent = Model0
  211. Part18.BrickColor = BrickColor.new("Pastel light blue")
  212. Part18.Rotation = Vector3.new(-180, 0, -180)
  213. Part18.CanCollide = false
  214. Part18.FormFactor = Enum.FormFactor.Symmetric
  215. Part18.Size = Vector3.new(1.704, 3.40799999, 1.704)
  216. Part18.CFrame = CFrame.new(-21.5822048, 1.70402145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  217. Part18.BottomSurface = Enum.SurfaceType.Smooth
  218. Part18.Color = Color3.new(0.686275, 0.866667, 1)
  219. Part18.Position = Vector3.new(-21.5822048, 1.70402145, 4.89356422)
  220. Part18.Orientation = Vector3.new(0, 180, 0)
  221. Part18.Color = Color3.new(0.686275, 0.866667, 1)
  222. Part19.Name = "Torso"
  223. Part19.Parent = Model0
  224. Part19.BrickColor = BrickColor.new("Cyan")
  225. Part19.Rotation = Vector3.new(-180, 0, -180)
  226. Part19.FormFactor = Enum.FormFactor.Symmetric
  227. Part19.Size = Vector3.new(3.40799999, 3.40799999, 1.704)
  228. Part19.CFrame = CFrame.new(-20.7302055, 5.11202145, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  229. Part19.LeftSurface = Enum.SurfaceType.Weld
  230. Part19.RightSurface = Enum.SurfaceType.Weld
  231. Part19.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  232. Part19.Position = Vector3.new(-20.7302055, 5.11202145, 4.89356422)
  233. Part19.Orientation = Vector3.new(0, 180, 0)
  234. Part19.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  235. Attachment20.Name = "WaistFrontAttachment"
  236. Attachment20.Parent = Part19
  237. Attachment20.CFrame = CFrame.new(0, -1.704, -0.851999998, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  238. Attachment20.Position = Vector3.new(0, -1.704, -0.851999998)
  239. Attachment21.Name = "WaistCenterAttachment"
  240. Attachment21.Parent = Part19
  241. Attachment21.CFrame = CFrame.new(0, -1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  242. Attachment21.Position = Vector3.new(0, -1.704, 0)
  243. Attachment22.Name = "WaistBackAttachment"
  244. Attachment22.Parent = Part19
  245. Attachment22.CFrame = CFrame.new(0, -1.704, 0.851999998, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  246. Attachment22.Position = Vector3.new(0, -1.704, 0.851999998)
  247. Attachment23.Name = "RightCollarAttachment"
  248. Attachment23.Parent = Part19
  249. Attachment23.CFrame = CFrame.new(1.704, 1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  250. Attachment23.Position = Vector3.new(1.704, 1.704, 0)
  251. Attachment24.Name = "NeckAttachment"
  252. Attachment24.Parent = Part19
  253. Attachment24.CFrame = CFrame.new(0, 1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  254. Attachment24.Position = Vector3.new(0, 1.704, 0)
  255. Attachment25.Name = "LeftCollarAttachment"
  256. Attachment25.Parent = Part19
  257. Attachment25.CFrame = CFrame.new(-1.704, 1.704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  258. Attachment25.Position = Vector3.new(-1.704, 1.704, 0)
  259. Attachment26.Name = "BodyBackAttachment"
  260. Attachment26.Parent = Part19
  261. Attachment26.CFrame = CFrame.new(0, 0, 0.851999998, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  262. Attachment26.Position = Vector3.new(0, 0, 0.851999998)
  263. Motor6D27.Name = "Right Shoulder"
  264. Motor6D27.Parent = Part19
  265. Motor6D27.C0 = CFrame.new(1.704, 0.851999998, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  266. Motor6D27.C1 = CFrame.new(-0.851999998, 0.851999998, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  267. Motor6D27.Part0 = Part19
  268. Motor6D27.Part1 = Part16
  269. Motor6D27.MaxVelocity = 0.10000000149012
  270. Motor6D28.Name = "Right Hip"
  271. Motor6D28.Parent = Part19
  272. Motor6D28.C0 = CFrame.new(1.704, -1.704, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  273. Motor6D28.C1 = CFrame.new(0.851999998, 1.704, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  274. Motor6D28.Part0 = Part19
  275. Motor6D28.Part1 = Part18
  276. Motor6D28.MaxVelocity = 0.10000000149012
  277. Motor6D29.Name = "Neck"
  278. Motor6D29.Parent = Part19
  279. Motor6D29.C0 = CFrame.new(0, 1.704, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  280. Motor6D29.C1 = CFrame.new(0, -0.851999998, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  281. Motor6D29.Part0 = Part19
  282. Motor6D29.Part1 = Part1
  283. Motor6D29.MaxVelocity = 0.10000000149012
  284. Motor6D30.Name = "Left Shoulder"
  285. Motor6D30.Parent = Part19
  286. Motor6D30.C0 = CFrame.new(-1.704, 0.851999998, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  287. Motor6D30.C1 = CFrame.new(0.851999998, 0.851999998, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  288. Motor6D30.Part0 = Part19
  289. Motor6D30.Part1 = Part11
  290. Motor6D30.MaxVelocity = 0.10000000149012
  291. Motor6D31.Name = "Left Hip"
  292. Motor6D31.Parent = Part19
  293. Motor6D31.C0 = CFrame.new(-1.704, -1.704, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  294. Motor6D31.C1 = CFrame.new(-0.851999998, 1.704, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  295. Motor6D31.Part0 = Part19
  296. Motor6D31.Part1 = Part15
  297. Motor6D31.MaxVelocity = 0.10000000149012
  298. Humanoid32.Parent = Model0
  299. Humanoid32.RightLeg = Part18
  300. Humanoid32.LeftLeg = Part15
  301. Humanoid32.Torso = Part9
  302. WedgePart33.Parent = Model0
  303. WedgePart33.Material = Enum.Material.Ice
  304. WedgePart33.BrickColor = BrickColor.new("Cyan")
  305. WedgePart33.Transparency = 0.5
  306. WedgePart33.Rotation = Vector3.new(0, -90, 0)
  307. WedgePart33.Size = Vector3.new(0.289681047, 1.704, 0.255599916)
  308. WedgePart33.CFrame = CFrame.new(-17.1773643, 6.06626129, 5.44735575, -4.44091412e-15, 2.9802397e-08, -1, 3.17639753e-22, 1, 2.9802397e-08, 1, 1.58819864e-22, 7.10546293e-15)
  309. WedgePart33.BackSurface = Enum.SurfaceType.Weld
  310. WedgePart33.BottomSurface = Enum.SurfaceType.Smooth
  311. WedgePart33.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  312. WedgePart33.Position = Vector3.new(-17.1773643, 6.06626129, 5.44735575)
  313. WedgePart33.Orientation = Vector3.new(0, -90, 0)
  314. WedgePart33.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  315. WedgePart34.Parent = Model0
  316. WedgePart34.Material = Enum.Material.Ice
  317. WedgePart34.BrickColor = BrickColor.new("Cyan")
  318. WedgePart34.Transparency = 0.5
  319. WedgePart34.Rotation = Vector3.new(-46.5499992, 0, 180)
  320. WedgePart34.Size = Vector3.new(0.289681047, 0.323759854, 0.306719929)
  321. WedgePart34.CFrame = CFrame.new(-17.5522442, 6.90121841, 4.99727345, -0.99999994, -0, 0, 0, -0.687744856, 0.725952506, 0, 0.725952506, 0.687744856)
  322. WedgePart34.BottomSurface = Enum.SurfaceType.Weld
  323. WedgePart34.TopSurface = Enum.SurfaceType.Weld
  324. WedgePart34.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  325. WedgePart34.Position = Vector3.new(-17.5522442, 6.90121841, 4.99727345)
  326. WedgePart34.Orientation = Vector3.new(-46.5499992, 0, 180)
  327. WedgePart34.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  328. Model35.Name = "AnimSaves"
  329. Model35.Parent = Model0
  330. Accessory36.Parent = Model0
  331. Part37.Name = "Handle"
  332. Part37.Parent = Accessory36
  333. Part37.Rotation = Vector3.new(-180, 0, -180)
  334. Part37.CanCollide = false
  335. Part37.FormFactor = Enum.FormFactor.Custom
  336. Part37.Size = Vector3.new(2.59999943, 2.07999945, 2)
  337. Part37.CFrame = CFrame.new(-20.7302055, 8.1680212, 4.89356422, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  338. Part37.BottomSurface = Enum.SurfaceType.Smooth
  339. Part37.TopSurface = Enum.SurfaceType.Smooth
  340. Part37.Position = Vector3.new(-20.7302055, 8.1680212, 4.89356422)
  341. Part37.Orientation = Vector3.new(0, 180, 0)
  342. SpecialMesh38.Parent = Part37
  343. SpecialMesh38.MeshId = "rbxassetid://88878197"
  344. SpecialMesh38.Offset = Vector3.new(0, 1.10000002, 0)
  345. SpecialMesh38.Scale = Vector3.new(2, 2, 2)
  346. SpecialMesh38.TextureId = "rbxassetid://120045146"
  347. SpecialMesh38.MeshType = Enum.MeshType.FileMesh
  348. SpecialMesh38.Scale = Vector3.new(2, 2, 2)
  349. Part39.Parent = Model0
  350. Part39.Material = Enum.Material.Ice
  351. Part39.BrickColor = BrickColor.new("Cyan")
  352. Part39.Transparency = 0.5
  353. Part39.Rotation = Vector3.new(-90, 0, -90)
  354. Part39.Size = Vector3.new(0.0852000043, 1.41432023, 1.7892009)
  355. Part39.CFrame = CFrame.new(-18.2508831, 5.8873415, 5.82223988, -5.3290972e-15, 1, 0, 3.17639753e-22, 0, 1, 1, -5.32909678e-15, 3.17639728e-22)
  356. Part39.BottomSurface = Enum.SurfaceType.Smooth
  357. Part39.LeftSurface = Enum.SurfaceType.Weld
  358. Part39.TopSurface = Enum.SurfaceType.Smooth
  359. Part39.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  360. Part39.Position = Vector3.new(-18.2508831, 5.8873415, 5.82223988)
  361. Part39.Orientation = Vector3.new(-90, -90, 0)
  362. Part39.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  363. Attachment40.Parent = Part39
  364. Attachment40.Rotation = Vector3.new(-180, 0, -180)
  365. Attachment40.CFrame = CFrame.new(-0.0425999984, -0.0228116158, 0.261833906, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  366. Attachment40.Position = Vector3.new(-0.0425999984, -0.0228116158, 0.261833906)
  367. Attachment40.Axis = Vector3.new(-1, 0, 0)
  368. Attachment40.Orientation = Vector3.new(-0, 180, 0)
  369. Part41.Parent = Model0
  370. Part41.Material = Enum.Material.Ice
  371. Part41.BrickColor = BrickColor.new("Cyan")
  372. Part41.Transparency = 0.5
  373. Part41.Size = Vector3.new(0.0852000043, 1.17576003, 1.7892009)
  374. Part41.CFrame = CFrame.new(-17.2625637, 4.45598173, 4.85095596, 1, -2.82122187e-37, -6.21728028e-15, -2.82122187e-37, 1, 3.70579716e-22, -6.21727943e-15, 3.70579691e-22, 1)
  375. Part41.BottomSurface = Enum.SurfaceType.Smooth
  376. Part41.LeftSurface = Enum.SurfaceType.Weld
  377. Part41.TopSurface = Enum.SurfaceType.Smooth
  378. Part41.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  379. Part41.Position = Vector3.new(-17.2625637, 4.45598173, 4.85095596)
  380. Part41.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  381. Attachment42.Parent = Part41
  382. Attachment42.Rotation = Vector3.new(-180, 0, -180)
  383. Attachment42.CFrame = CFrame.new(-0.0425999984, -0.0189638659, 0.261833906, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  384. Attachment42.Position = Vector3.new(-0.0425999984, -0.0189638659, 0.261833906)
  385. Attachment42.Axis = Vector3.new(-1, 0, 0)
  386. Attachment42.Orientation = Vector3.new(-0, 180, 0)
  387. ManualWeld43.Name = "Part-to-Wedge Strong Joint"
  388. ManualWeld43.Parent = Part41
  389. ManualWeld43.C0 = CFrame.new(-0.0426000021, 0.587880015, 0.894600451, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  390. ManualWeld43.C1 = CFrame.new(0.707160354, -0.852001607, 0.30671972, -8.88182867e-16, 1, 0, -2.9802397e-08, 0, 1, 1, 1.77636573e-15, 2.9802397e-08)
  391. ManualWeld43.Part0 = Part41
  392. ManualWeld43.Part1 = WedgePart51
  393. Part44.Name = "Ruin"
  394. Part44.Parent = Model0
  395. Part44.Material = Enum.Material.Ice
  396. Part44.BrickColor = BrickColor.new("Cyan")
  397. Part44.Transparency = 0.40000000596046
  398. Part44.Size = Vector3.new(1.73808074, 3.28871751, 1.84031987)
  399. Part44.CFrame = CFrame.new(-18.1742039, 5.25685978, 4.85948324, 1, 0, -5.3290972e-15, 0, 1, 3.17639753e-22, -5.32909678e-15, 3.17639728e-22, 1)
  400. Part44.BottomSurface = Enum.SurfaceType.Smooth
  401. Part44.TopSurface = Enum.SurfaceType.Smooth
  402. Part44.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  403. Part44.Position = Vector3.new(-18.1742039, 5.25685978, 4.85948324)
  404. Part44.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  405. Attachment45.Parent = Part44
  406. Attachment45.CFrame = CFrame.new(0.86904043, -1.17576015, 0.323759913, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  407. Attachment45.Position = Vector3.new(0.86904043, -1.17576015, 0.323759913)
  408. WedgePart46.Parent = Model0
  409. WedgePart46.Material = Enum.Material.Ice
  410. WedgePart46.BrickColor = BrickColor.new("Cyan")
  411. WedgePart46.Transparency = 0.5
  412. WedgePart46.Rotation = Vector3.new(-46.5499992, 0, 180)
  413. WedgePart46.Size = Vector3.new(0.289681047, 0.323759854, 0.306719929)
  414. WedgePart46.CFrame = CFrame.new(-17.5522442, 6.90121841, 4.12823296, -0.99999994, -0, 0, 0, -0.687744856, 0.725952506, 0, 0.725952506, 0.687744856)
  415. WedgePart46.BottomSurface = Enum.SurfaceType.Weld
  416. WedgePart46.TopSurface = Enum.SurfaceType.Weld
  417. WedgePart46.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  418. WedgePart46.Position = Vector3.new(-17.5522442, 6.90121841, 4.12823296)
  419. WedgePart46.Orientation = Vector3.new(-46.5499992, 0, 180)
  420. WedgePart46.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  421. WedgePart47.Parent = Model0
  422. WedgePart47.Material = Enum.Material.Ice
  423. WedgePart47.BrickColor = BrickColor.new("Cyan")
  424. WedgePart47.Transparency = 0.5
  425. WedgePart47.Rotation = Vector3.new(0, 0, 180)
  426. WedgePart47.Size = Vector3.new(0.289681047, 2.02775979, 0.306719929)
  427. WedgePart47.CFrame = CFrame.new(-17.6544857, 2.39413834, 5.35366297, -1, -2.5340236e-19, -1.33227424e-14, 3.52652718e-36, -1, 1.90202845e-05, 1.33227424e-14, 1.90202845e-05, 1)
  428. WedgePart47.BottomSurface = Enum.SurfaceType.Weld
  429. WedgePart47.TopSurface = Enum.SurfaceType.Weld
  430. WedgePart47.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  431. WedgePart47.Position = Vector3.new(-17.6544857, 2.39413834, 5.35366297)
  432. WedgePart47.Orientation = Vector3.new(0, 0, 180)
  433. WedgePart47.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  434. WedgePart48.Parent = Model0
  435. WedgePart48.Material = Enum.Material.Ice
  436. WedgePart48.BrickColor = BrickColor.new("Cyan")
  437. WedgePart48.Transparency = 0.5
  438. WedgePart48.Rotation = Vector3.new(-46.5499992, 0, 180)
  439. WedgePart48.Size = Vector3.new(0.289681047, 0.323759854, 0.306719929)
  440. WedgePart48.CFrame = CFrame.new(-18.6598434, 6.90121841, 4.74167252, -0.99999994, -0, 0, 0, -0.687744856, 0.725952506, 0, 0.725952506, 0.687744856)
  441. WedgePart48.BottomSurface = Enum.SurfaceType.Weld
  442. WedgePart48.TopSurface = Enum.SurfaceType.Weld
  443. WedgePart48.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  444. WedgePart48.Position = Vector3.new(-18.6598434, 6.90121841, 4.74167252)
  445. WedgePart48.Orientation = Vector3.new(-46.5499992, 0, 180)
  446. WedgePart48.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  447. WedgePart49.Parent = Model0
  448. WedgePart49.Material = Enum.Material.Ice
  449. WedgePart49.BrickColor = BrickColor.new("Cyan")
  450. WedgePart49.Transparency = 0.5
  451. WedgePart49.Rotation = Vector3.new(-0.109999999, 0, 180)
  452. WedgePart49.Size = Vector3.new(0.289681047, 1.22687972, 0.306719929)
  453. WedgePart49.CFrame = CFrame.new(-18.4894753, 2.79451036, 5.11464548, -1, -2.45937919e-17, -1.33227195e-14, 3.52652718e-36, -0.999998331, 0.00184600067, 1.33227424e-14, 0.00184600067, 0.999998331)
  454. WedgePart49.BottomSurface = Enum.SurfaceType.Weld
  455. WedgePart49.TopSurface = Enum.SurfaceType.Weld
  456. WedgePart49.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  457. WedgePart49.Position = Vector3.new(-18.4894753, 2.79451036, 5.11464548)
  458. WedgePart49.Orientation = Vector3.new(-0.109999999, 0, 180)
  459. WedgePart49.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  460. WedgePart50.Parent = Model0
  461. WedgePart50.Material = Enum.Material.Ice
  462. WedgePart50.BrickColor = BrickColor.new("Cyan")
  463. WedgePart50.Transparency = 0.5
  464. WedgePart50.Rotation = Vector3.new(0, 0, 180)
  465. WedgePart50.Size = Vector3.new(0.289681047, 0.647519708, 0.306719929)
  466. WedgePart50.CFrame = CFrame.new(-18.3020058, 3.08425856, 5.55813026, -1, -2.5340236e-19, -1.33227424e-14, 3.52652718e-36, -1, 1.90202845e-05, 1.33227424e-14, 1.90202845e-05, 1)
  467. WedgePart50.BottomSurface = Enum.SurfaceType.Weld
  468. WedgePart50.TopSurface = Enum.SurfaceType.Weld
  469. WedgePart50.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  470. WedgePart50.Position = Vector3.new(-18.3020058, 3.08425856, 5.55813026)
  471. WedgePart50.Orientation = Vector3.new(0, 0, 180)
  472. WedgePart50.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  473. WedgePart51.Parent = Model0
  474. WedgePart51.Material = Enum.Material.Ice
  475. WedgePart51.BrickColor = BrickColor.new("Cyan")
  476. WedgePart51.Transparency = 0.5
  477. WedgePart51.Rotation = Vector3.new(0, -90, 0)
  478. WedgePart51.Size = Vector3.new(0.289681047, 1.704, 0.613440275)
  479. WedgePart51.CFrame = CFrame.new(-16.9984436, 5.89586353, 5.03839588, -4.44091412e-15, 2.9802397e-08, -1, 3.17639753e-22, 1, 2.9802397e-08, 1, 1.58819864e-22, 7.10546293e-15)
  480. WedgePart51.BackSurface = Enum.SurfaceType.Weld
  481. WedgePart51.BottomSurface = Enum.SurfaceType.Smooth
  482. WedgePart51.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  483. WedgePart51.Position = Vector3.new(-16.9984436, 5.89586353, 5.03839588)
  484. WedgePart51.Orientation = Vector3.new(0, -90, 0)
  485. WedgePart51.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  486. WedgePart52.Parent = Model0
  487. WedgePart52.Material = Enum.Material.Ice
  488. WedgePart52.BrickColor = BrickColor.new("Cyan")
  489. WedgePart52.Transparency = 0.5
  490. WedgePart52.Rotation = Vector3.new(0, 0, 180)
  491. WedgePart52.Size = Vector3.new(0.289681047, 1.49951947, 0.306719929)
  492. WedgePart52.CFrame = CFrame.new(-18.1827259, 2.65825844, 4.63797855, -1, -2.5340236e-19, -1.33227424e-14, 3.52652718e-36, -1, 1.90202845e-05, 1.33227424e-14, 1.90202845e-05, 1)
  493. WedgePart52.BottomSurface = Enum.SurfaceType.Weld
  494. WedgePart52.TopSurface = Enum.SurfaceType.Weld
  495. WedgePart52.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  496. WedgePart52.Position = Vector3.new(-18.1827259, 2.65825844, 4.63797855)
  497. WedgePart52.Orientation = Vector3.new(0, 0, 180)
  498. WedgePart52.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  499. WedgePart53.Parent = Model0
  500. WedgePart53.Material = Enum.Material.Ice
  501. WedgePart53.BrickColor = BrickColor.new("Cyan")
  502. WedgePart53.Transparency = 0.5
  503. WedgePart53.Rotation = Vector3.new(0, -90, 0)
  504. WedgePart53.Size = Vector3.new(0.289681047, 1.704, 0.903119862)
  505. WedgePart53.CFrame = CFrame.new(-16.8536034, 6.03219891, 4.61239576, -3.55273147e-15, 2.9802397e-08, -1, 2.6469979e-22, 1, 2.9802397e-08, 1, 1.32349883e-22, 6.21727985e-15)
  506. WedgePart53.BackSurface = Enum.SurfaceType.Weld
  507. WedgePart53.BottomSurface = Enum.SurfaceType.Smooth
  508. WedgePart53.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  509. WedgePart53.Position = Vector3.new(-16.8536034, 6.03219891, 4.61239576)
  510. WedgePart53.Orientation = Vector3.new(0, -90, 0)
  511. WedgePart53.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  512. Script54.Name = "Animate"
  513. Script54.Parent = Model0
  514. table.insert(cors,sandbox(Script54,function()
  515. local Figure = script.Parent
  516. local Torso = Figure:WaitForChild("Torso")
  517. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  518. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  519. local RightHip = Torso:WaitForChild("Right Hip")
  520. local LeftHip = Torso:WaitForChild("Left Hip")
  521. local Neck = Torso:WaitForChild("Neck")
  522. local Humanoid = Figure:WaitForChild("Humanoid")
  523. local pose = "Standing"
  524.  
  525. local currentAnim = ""
  526. local currentAnimInstance = nil
  527. local currentAnimTrack = nil
  528. local currentAnimKeyframeHandler = nil
  529. local currentAnimSpeed = 1.0
  530. local animTable = {}
  531. local animNames = {
  532. idle = {
  533. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  534. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  535. },
  536. walk = {
  537. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  538. },
  539. run = {
  540. { id = "run.xml", weight = 10 }
  541. },
  542. jump = {
  543. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  544. },
  545. fall = {
  546. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  547. },
  548. climb = {
  549. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  550. },
  551. sit = {
  552. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  553. },
  554. toolnone = {
  555. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  556. },
  557. toolslash = {
  558. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  559. -- { id = "slash.xml", weight = 10 }
  560. },
  561. toollunge = {
  562. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  563. },
  564. wave = {
  565. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  566. },
  567. point = {
  568. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  569. },
  570. dance1 = {
  571. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  572. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  573. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  574. },
  575. dance2 = {
  576. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  577. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  578. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  579. },
  580. dance3 = {
  581. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  582. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  583. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  584. },
  585. laugh = {
  586. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  587. },
  588. cheer = {
  589. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  590. },
  591. }
  592. local dances = {"dance1", "dance2", "dance3"}
  593.  
  594. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  595. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  596.  
  597. function configureAnimationSet(name, fileList)
  598. if (animTable[name] ~= nil) then
  599. for _, connection in pairs(animTable[name].connections) do
  600. connection:disconnect()
  601. end
  602. end
  603. animTable[name] = {}
  604. animTable[name].count = 0
  605. animTable[name].totalWeight = 0
  606. animTable[name].connections = {}
  607.  
  608. -- check for config values
  609. local config = script:FindFirstChild(name)
  610. if (config ~= nil) then
  611. -- print("Loading anims " .. name)
  612. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  613. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  614. local idx = 1
  615. for _, childPart in pairs(config:GetChildren()) do
  616. if (childPart:IsA("Animation")) then
  617. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  618. animTable[name][idx] = {}
  619. animTable[name][idx].anim = childPart
  620. local weightObject = childPart:FindFirstChild("Weight")
  621. if (weightObject == nil) then
  622. animTable[name][idx].weight = 1
  623. else
  624. animTable[name][idx].weight = weightObject.Value
  625. end
  626. animTable[name].count = animTable[name].count + 1
  627. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  628. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  629. idx = idx + 1
  630. end
  631. end
  632. end
  633.  
  634. -- fallback to defaults
  635. if (animTable[name].count <= 0) then
  636. for idx, anim in pairs(fileList) do
  637. animTable[name][idx] = {}
  638. animTable[name][idx].anim = Instance.new("Animation")
  639. animTable[name][idx].anim.Name = name
  640. animTable[name][idx].anim.AnimationId = anim.id
  641. animTable[name][idx].weight = anim.weight
  642. animTable[name].count = animTable[name].count + 1
  643. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  644. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  645. end
  646. end
  647. end
  648.  
  649. -- Setup animation objects
  650. function scriptChildModified(child)
  651. local fileList = animNames[child.Name]
  652. if (fileList ~= nil) then
  653. configureAnimationSet(child.Name, fileList)
  654. end
  655. end
  656.  
  657. script.ChildAdded:connect(scriptChildModified)
  658. script.ChildRemoved:connect(scriptChildModified)
  659.  
  660.  
  661. for name, fileList in pairs(animNames) do
  662. configureAnimationSet(name, fileList)
  663. end
  664.  
  665. -- ANIMATION
  666.  
  667. -- declarations
  668. local toolAnim = "None"
  669. local toolAnimTime = 0
  670.  
  671. local jumpAnimTime = 0
  672. local jumpAnimDuration = 0.3
  673.  
  674. local toolTransitionTime = 0.1
  675. local fallTransitionTime = 0.3
  676. local jumpMaxLimbVelocity = 0.75
  677.  
  678. -- functions
  679.  
  680. function stopAllAnimations()
  681. local oldAnim = currentAnim
  682.  
  683. -- return to idle if finishing an emote
  684. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  685. oldAnim = "idle"
  686. end
  687.  
  688. currentAnim = ""
  689. currentAnimInstance = nil
  690. if (currentAnimKeyframeHandler ~= nil) then
  691. currentAnimKeyframeHandler:disconnect()
  692. end
  693.  
  694. if (currentAnimTrack ~= nil) then
  695. currentAnimTrack:Stop()
  696. currentAnimTrack:Destroy()
  697. currentAnimTrack = nil
  698. end
  699. return oldAnim
  700. end
  701.  
  702. function setAnimationSpeed(speed)
  703. if speed ~= currentAnimSpeed then
  704. currentAnimSpeed = speed
  705. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  706. end
  707. end
  708.  
  709. function keyFrameReachedFunc(frameName)
  710. if (frameName == "End") then
  711.  
  712. local repeatAnim = currentAnim
  713. -- return to idle if finishing an emote
  714. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  715. repeatAnim = "idle"
  716. end
  717.  
  718. local animSpeed = currentAnimSpeed
  719. playAnimation(repeatAnim, 0.0, Humanoid)
  720. setAnimationSpeed(animSpeed)
  721. end
  722. end
  723.  
  724. -- Preload animations
  725. function playAnimation(animName, transitionTime, humanoid)
  726.  
  727. local roll = math.random(1, animTable[animName].totalWeight)
  728. local origRoll = roll
  729. local idx = 1
  730. while (roll > animTable[animName][idx].weight) do
  731. roll = roll - animTable[animName][idx].weight
  732. idx = idx + 1
  733. end
  734. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  735. local anim = animTable[animName][idx].anim
  736.  
  737. -- switch animation
  738. if (anim ~= currentAnimInstance) then
  739.  
  740. if (currentAnimTrack ~= nil) then
  741. currentAnimTrack:Stop(transitionTime)
  742. currentAnimTrack:Destroy()
  743. end
  744.  
  745. currentAnimSpeed = 1.0
  746.  
  747. -- load it to the humanoid; get AnimationTrack
  748. currentAnimTrack = humanoid:LoadAnimation(anim)
  749. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  750.  
  751. -- play the animation
  752. currentAnimTrack:Play(transitionTime)
  753. currentAnim = animName
  754. currentAnimInstance = anim
  755.  
  756. -- set up keyframe name triggers
  757. if (currentAnimKeyframeHandler ~= nil) then
  758. currentAnimKeyframeHandler:disconnect()
  759. end
  760. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  761.  
  762. end
  763.  
  764. end
  765.  
  766. -------------------------------------------------------------------------------------------
  767. -------------------------------------------------------------------------------------------
  768.  
  769. local toolAnimName = ""
  770. local toolAnimTrack = nil
  771. local toolAnimInstance = nil
  772. local currentToolAnimKeyframeHandler = nil
  773.  
  774. function toolKeyFrameReachedFunc(frameName)
  775. if (frameName == "End") then
  776. -- print("Keyframe : ".. frameName)
  777. playToolAnimation(toolAnimName, 0.0, Humanoid)
  778. end
  779. end
  780.  
  781.  
  782. function playToolAnimation(animName, transitionTime, humanoid, priority)
  783.  
  784. local roll = math.random(1, animTable[animName].totalWeight)
  785. local origRoll = roll
  786. local idx = 1
  787. while (roll > animTable[animName][idx].weight) do
  788. roll = roll - animTable[animName][idx].weight
  789. idx = idx + 1
  790. end
  791. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  792. local anim = animTable[animName][idx].anim
  793.  
  794. if (toolAnimInstance ~= anim) then
  795.  
  796. if (toolAnimTrack ~= nil) then
  797. toolAnimTrack:Stop()
  798. toolAnimTrack:Destroy()
  799. transitionTime = 0
  800. end
  801.  
  802. -- load it to the humanoid; get AnimationTrack
  803. toolAnimTrack = humanoid:LoadAnimation(anim)
  804. if priority then
  805. toolAnimTrack.Priority = priority
  806. end
  807.  
  808. -- play the animation
  809. toolAnimTrack:Play(transitionTime)
  810. toolAnimName = animName
  811. toolAnimInstance = anim
  812.  
  813. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  814. end
  815. end
  816.  
  817. function stopToolAnimations()
  818. local oldAnim = toolAnimName
  819.  
  820. if (currentToolAnimKeyframeHandler ~= nil) then
  821. currentToolAnimKeyframeHandler:disconnect()
  822. end
  823.  
  824. toolAnimName = ""
  825. toolAnimInstance = nil
  826. if (toolAnimTrack ~= nil) then
  827. toolAnimTrack:Stop()
  828. toolAnimTrack:Destroy()
  829. toolAnimTrack = nil
  830. end
  831.  
  832.  
  833. return oldAnim
  834. end
  835.  
  836. -------------------------------------------------------------------------------------------
  837. -------------------------------------------------------------------------------------------
  838.  
  839.  
  840. function onRunning(speed)
  841. if speed > 0.01 then
  842. playAnimation("walk", 0.1, Humanoid)
  843. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  844. setAnimationSpeed(speed / 14.5)
  845. end
  846. pose = "Running"
  847. else
  848. if emoteNames[currentAnim] == nil then
  849. playAnimation("idle", 0.1, Humanoid)
  850. pose = "Standing"
  851. end
  852. end
  853. end
  854.  
  855. function onDied()
  856. pose = "Dead"
  857. end
  858.  
  859. function onJumping()
  860. playAnimation("jump", 0.1, Humanoid)
  861. jumpAnimTime = jumpAnimDuration
  862. pose = "Jumping"
  863. end
  864.  
  865. function onClimbing(speed)
  866. playAnimation("climb", 0.1, Humanoid)
  867. setAnimationSpeed(speed / 12.0)
  868. pose = "Climbing"
  869. end
  870.  
  871. function onGettingUp()
  872. pose = "GettingUp"
  873. end
  874.  
  875. function onFreeFall()
  876. if (jumpAnimTime <= 0) then
  877. playAnimation("fall", fallTransitionTime, Humanoid)
  878. end
  879. pose = "FreeFall"
  880. end
  881.  
  882. function onFallingDown()
  883. pose = "FallingDown"
  884. end
  885.  
  886. function onSeated()
  887. pose = "Seated"
  888. end
  889.  
  890. function onPlatformStanding()
  891. pose = "PlatformStanding"
  892. end
  893.  
  894. function onSwimming(speed)
  895. if speed > 0 then
  896. pose = "Running"
  897. else
  898. pose = "Standing"
  899. end
  900. end
  901.  
  902. function getTool()
  903. for _, kid in ipairs(Figure:GetChildren()) do
  904. if kid.className == "Tool" then return kid end
  905. end
  906. return nil
  907. end
  908.  
  909. function getToolAnim(tool)
  910. for _, c in ipairs(tool:GetChildren()) do
  911. if c.Name == "toolanim" and c.className == "StringValue" then
  912. return c
  913. end
  914. end
  915. return nil
  916. end
  917.  
  918. function animateTool()
  919.  
  920. if (toolAnim == "None") then
  921. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  922. return
  923. end
  924.  
  925. if (toolAnim == "Slash") then
  926. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  927. return
  928. end
  929.  
  930. if (toolAnim == "Lunge") then
  931. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  932. return
  933. end
  934. end
  935.  
  936. function moveSit()
  937. RightShoulder.MaxVelocity = 0.15
  938. LeftShoulder.MaxVelocity = 0.15
  939. RightShoulder:SetDesiredAngle(3.14 /2)
  940. LeftShoulder:SetDesiredAngle(-3.14 /2)
  941. RightHip:SetDesiredAngle(3.14 /2)
  942. LeftHip:SetDesiredAngle(-3.14 /2)
  943. end
  944.  
  945. local lastTick = 0
  946.  
  947. function move(time)
  948. local amplitude = 1
  949. local frequency = 1
  950. local deltaTime = time - lastTick
  951. lastTick = time
  952.  
  953. local climbFudge = 0
  954. local setAngles = false
  955.  
  956. if (jumpAnimTime > 0) then
  957. jumpAnimTime = jumpAnimTime - deltaTime
  958. end
  959.  
  960. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  961. playAnimation("fall", fallTransitionTime, Humanoid)
  962. elseif (pose == "Seated") then
  963. playAnimation("sit", 0.5, Humanoid)
  964. return
  965. elseif (pose == "Running") then
  966. playAnimation("walk", 0.1, Humanoid)
  967. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  968. -- print("Wha " .. pose)
  969. stopAllAnimations()
  970. amplitude = 0.1
  971. frequency = 1
  972. setAngles = true
  973. end
  974.  
  975. if (setAngles) then
  976. local desiredAngle = amplitude * math.sin(time * frequency)
  977.  
  978. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  979. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  980. RightHip:SetDesiredAngle(-desiredAngle)
  981. LeftHip:SetDesiredAngle(-desiredAngle)
  982. end
  983.  
  984. -- Tool Animation handling
  985. local tool = getTool()
  986. if tool and tool:FindFirstChild("Handle") then
  987.  
  988. local animStringValueObject = getToolAnim(tool)
  989.  
  990. if animStringValueObject then
  991. toolAnim = animStringValueObject.Value
  992. -- message recieved, delete StringValue
  993. animStringValueObject.Parent = nil
  994. toolAnimTime = time + .3
  995. end
  996.  
  997. if time > toolAnimTime then
  998. toolAnimTime = 0
  999. toolAnim = "None"
  1000. end
  1001.  
  1002. animateTool()
  1003. else
  1004. stopToolAnimations()
  1005. toolAnim = "None"
  1006. toolAnimInstance = nil
  1007. toolAnimTime = 0
  1008. end
  1009. end
  1010.  
  1011. -- connect events
  1012. Humanoid.Died:connect(onDied)
  1013. Humanoid.Running:connect(onRunning)
  1014. Humanoid.Jumping:connect(onJumping)
  1015. Humanoid.Climbing:connect(onClimbing)
  1016. Humanoid.GettingUp:connect(onGettingUp)
  1017. Humanoid.FreeFalling:connect(onFreeFall)
  1018. Humanoid.FallingDown:connect(onFallingDown)
  1019. Humanoid.Seated:connect(onSeated)
  1020. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1021. Humanoid.Swimming:connect(onSwimming)
  1022.  
  1023. -- main program
  1024.  
  1025. -- initialize to idle
  1026. playAnimation("idle", 0.1, Humanoid)
  1027. pose = "Standing"
  1028.  
  1029. while Figure.Parent ~= nil do
  1030. local _, time = wait(0.1)
  1031. move(time)
  1032. end
  1033.  
  1034.  
  1035.  
  1036. end))
  1037. StringValue55.Name = "idle"
  1038. StringValue55.Parent = Script54
  1039. Animation56.Name = "Animation1"
  1040. Animation56.Parent = StringValue55
  1041. Animation56.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  1042. NumberValue57.Name = "Weight"
  1043. NumberValue57.Parent = Animation56
  1044. NumberValue57.Value = 9
  1045. Animation58.Name = "Animation2"
  1046. Animation58.Parent = StringValue55
  1047. Animation58.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  1048. NumberValue59.Name = "Weight"
  1049. NumberValue59.Parent = Animation58
  1050. NumberValue59.Value = 1
  1051. StringValue60.Name = "walk"
  1052. StringValue60.Parent = Script54
  1053. Animation61.Name = "WalkAnim"
  1054. Animation61.Parent = StringValue60
  1055. Animation61.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1056. StringValue62.Name = "run"
  1057. StringValue62.Parent = Script54
  1058. Animation63.Name = "RunAnim"
  1059. Animation63.Parent = StringValue62
  1060. Animation63.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1061. StringValue64.Name = "jump"
  1062. StringValue64.Parent = Script54
  1063. Animation65.Name = "JumpAnim"
  1064. Animation65.Parent = StringValue64
  1065. Animation65.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1066. StringValue66.Name = "climb"
  1067. StringValue66.Parent = Script54
  1068. Animation67.Name = "ClimbAnim"
  1069. Animation67.Parent = StringValue66
  1070. Animation67.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  1071. StringValue68.Name = "toolnone"
  1072. StringValue68.Parent = Script54
  1073. Animation69.Name = "ToolNoneAnim"
  1074. Animation69.Parent = StringValue68
  1075. Animation69.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  1076. StringValue70.Name = "fall"
  1077. StringValue70.Parent = Script54
  1078. Animation71.Name = "FallAnim"
  1079. Animation71.Parent = StringValue70
  1080. Animation71.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  1081. StringValue72.Name = "sit"
  1082. StringValue72.Parent = Script54
  1083. Animation73.Name = "SitAnim"
  1084. Animation73.Parent = StringValue72
  1085. Animation73.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  1086. for i,v in pairs(mas:GetChildren()) do
  1087. v.Parent = game:GetService("Players").LocalPlayer.Character
  1088. pcall(function() v:MakeJoints() end)
  1089. end
  1090. mas:Destroy()
  1091. for i,v in pairs(cors) do
  1092. spawn(function()
  1093. pcall(v)
  1094. end)
  1095. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement