Advertisement
cat568

epic

Apr 30th, 2019
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.96 KB | None | 0 0
  1. wait(.5)
  2.  
  3. --Converted with ttyyuu12345's model to script plugin v4
  4. function sandbox(var,func)
  5. local env = getfenv(func)
  6. local newenv = setmetatable({},{
  7. __index = function(self,k)
  8. if k=="script" then
  9. return var
  10. else
  11. return env[k]
  12. end
  13. end,
  14. })
  15. setfenv(func,newenv)
  16. return func
  17. end
  18. cors = {}
  19. mas = Instance.new("Model",game:GetService("Lighting"))
  20. Model0 = Instance.new("Model")
  21. Part1 = Instance.new("Part")
  22. Part2 = Instance.new("Part")
  23. Part3 = Instance.new("Part")
  24. Decal4 = Instance.new("Decal")
  25. Motor6D5 = Instance.new("Motor6D")
  26. Motor6D6 = Instance.new("Motor6D")
  27. Motor6D7 = Instance.new("Motor6D")
  28. Motor6D8 = Instance.new("Motor6D")
  29. Motor6D9 = Instance.new("Motor6D")
  30. Motor6D10 = Instance.new("Motor6D")
  31. Motor6D11 = Instance.new("Motor6D")
  32. Decal12 = Instance.new("Decal")
  33. attac = Instance.new("Attachment")
  34. attac1 = Instance.new("Attachment")
  35. attac2 = Instance.new("Attachment")
  36. attac3 = Instance.new("Attachment")
  37. Decal13 = Instance.new("Decal")
  38. RopeConstraint14 = Instance.new("RopeConstraint")
  39. RopeConstraint15 = Instance.new("RopeConstraint")
  40. Part16 = Instance.new("Part")
  41. Part17 = Instance.new("Part")
  42. RopeConstraint18 = Instance.new("RopeConstraint")
  43. Part19 = Instance.new("Part")
  44. Motor6D20 = Instance.new("Motor6D")
  45. Part21 = Instance.new("Part")
  46. Part22 = Instance.new("Part")
  47. Part23 = Instance.new("Part")
  48. Script24 = Instance.new("Script")
  49. Sound25 = Instance.new("Sound")
  50. Part26 = Instance.new("Part")
  51. Part27 = Instance.new("Part")
  52.  
  53. LocalScript29 = Instance.new("LocalScript")
  54. StringValue30 = Instance.new("StringValue")
  55. Animation31 = Instance.new("Animation")
  56. NumberValue32 = Instance.new("NumberValue")
  57. Animation33 = Instance.new("Animation")
  58. NumberValue34 = Instance.new("NumberValue")
  59. StringValue35 = Instance.new("StringValue")
  60. Animation36 = Instance.new("Animation")
  61. StringValue37 = Instance.new("StringValue")
  62. Animation38 = Instance.new("Animation")
  63. StringValue39 = Instance.new("StringValue")
  64. Animation40 = Instance.new("Animation")
  65. StringValue41 = Instance.new("StringValue")
  66. Animation42 = Instance.new("Animation")
  67. StringValue43 = Instance.new("StringValue")
  68. Animation44 = Instance.new("Animation")
  69. StringValue45 = Instance.new("StringValue")
  70. Animation46 = Instance.new("Animation")
  71. StringValue47 = Instance.new("StringValue")
  72. Animation48 = Instance.new("Animation")
  73. NumberValue49 = Instance.new("NumberValue")
  74. Model0.Name = "a"
  75. Model0.Parent = mas
  76. Part1.Name = "front right leg"
  77. Part1.Parent = Model0
  78. Part1.CFrame = CFrame.new(1.25000703, 0.975010395, -0.475000978, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  79. Part1.Position = Vector3.new(1.25000703, 0.975010395, -0.475000978)
  80. Part1.Color = Color3.new(0.835294, 0.45098, 0.239216)
  81. Part1.Size = Vector3.new(1, 2, 1)
  82. Part1.BottomSurface = Enum.SurfaceType.Smooth
  83. Part1.BrickColor = BrickColor.new("Neon orange")
  84. Part1.CanCollide = false
  85. Part1.TopSurface = Enum.SurfaceType.Smooth
  86. Part1.brickColor = BrickColor.new("Neon orange")
  87. Part2.Name = "back left leg"
  88. Part2.Parent = Model0
  89. Part2.CFrame = CFrame.new(-1.74999297, 0.975010395, 2.52499914, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  90. Part2.Position = Vector3.new(-1.74999297, 0.975010395, 2.52499914)
  91. Part2.Color = Color3.new(0.835294, 0.45098, 0.239216)
  92. Part2.Size = Vector3.new(1, 2, 1)
  93. Part2.BottomSurface = Enum.SurfaceType.Smooth
  94. Part2.BrickColor = BrickColor.new("Neon orange")
  95. Part2.CanCollide = false
  96. Part2.TopSurface = Enum.SurfaceType.Smooth
  97. Part2.brickColor = BrickColor.new("Neon orange")
  98. Part3.Name = "Torso"
  99. Part3.Parent = Model0
  100. Part3.CFrame = CFrame.new(-0.249992996, 3.9750104, 1.02499902, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  101. Part3.Position = Vector3.new(-0.249992996, 3.9750104, 1.02499902)
  102. Part3.Color = Color3.new(0.835294, 0.45098, 0.239216)
  103. Part3.Size = Vector3.new(4, 4, 4)
  104. Part3.BottomSurface = Enum.SurfaceType.Smooth
  105. Part3.BrickColor = BrickColor.new("Neon orange")
  106. Part3.TopSurface = Enum.SurfaceType.Smooth
  107. Part3.brickColor = BrickColor.new("Neon orange")
  108. Decal4.Name = "Cat Face"
  109. Decal4.Parent = Part3
  110. Decal4.Texture = "http://www.roblox.com/asset/?id=161258368"
  111. Motor6D5.Name = "stripe1"
  112. Motor6D5.Parent = Part3
  113. Motor6D5.C1 = CFrame.new(0, -2.0250001, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  114. Motor6D5.Part0 = Part3
  115. Motor6D5.Part1 = Part23
  116. Motor6D5.part1 = Part23
  117. Motor6D6.Name = "stripe2"
  118. Motor6D6.Parent = Part3
  119. Motor6D6.C1 = CFrame.new(0, -2.0250001, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  120. Motor6D6.Part0 = Part3
  121. Motor6D6.Part1 = Part26
  122. Motor6D6.part1 = Part26
  123. Motor6D7.Name = "fll"
  124. Motor6D7.Parent = Part3
  125. Motor6D7.C0 = CFrame.new(-1.60000002, -2, -1.5999999, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  126. Motor6D7.C1 = CFrame.new(-0.0999999791, 1, -0.0999999493, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  127. Motor6D7.Part0 = Part3
  128. Motor6D7.Part1 = Part16
  129. Motor6D7.part1 = Part16
  130. Motor6D8.Name = "bll"
  131. Motor6D8.Parent = Part3
  132. Motor6D8.C0 = CFrame.new(-1.39999998, -2, 1.60000014, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  133. Motor6D8.C1 = CFrame.new(0.100000024, 0.99999994, 0.100000054, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  134. Motor6D8.Part0 = Part3
  135. Motor6D8.Part1 = Part2
  136. Motor6D8.part1 = Part2
  137. Motor6D9.Name = "frl"
  138. Motor6D9.Parent = Part3
  139. Motor6D9.C0 = CFrame.new(1.60000002, -1.80000007, -1.60000002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  140. Motor6D9.C1 = CFrame.new(0.100000024, 1.19999993, -0.100000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  141. Motor6D9.Part0 = Part3
  142. Motor6D9.Part1 = Part1
  143. Motor6D9.part1 = Part1
  144. Motor6D10.Name = "brl"
  145. Motor6D10.Parent = Part3
  146. Motor6D10.C0 = CFrame.new(1.60000002, -2, 1.60000002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  147. Motor6D10.C1 = CFrame.new(0.100000024, 0.99999994, 0.100000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  148. Motor6D10.Part0 = Part3
  149. Motor6D10.Part1 = Part21
  150. Motor6D10.part1 = Part21
  151. Motor6D11.Name = "Head"
  152. Motor6D11.Parent = Part3
  153. Motor6D11.C1 = CFrame.new(0, -1, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  154. Motor6D11.Part0 = Part3
  155. Motor6D11.Part1 = Part27
  156. Motor6D11.part1 = Part27
  157. Decal12.Name = "award winning art"
  158. Decal12.Parent = Part3
  159. Decal12.Texture = "http://www.roblox.com/asset/?id=2912303330"
  160. Decal12.Face = Enum.NormalId.Left
  161. Decal13.Name = "award winning art"
  162. Decal13.Parent = Part3
  163. Decal13.Texture = "http://www.roblox.com/asset/?id=2912303330"
  164. Decal13.Face = Enum.NormalId.Right
  165. attac.Name = "attac"
  166. attac.Parent = Part3
  167.  
  168. attac.Position = Vector3.new(0,-.35,2)
  169. attac1.Name = "attac1"
  170. attac1.Parent = Part17
  171.  
  172. attac1.Position = Vector3.new(0,-1,-0.15)
  173. attac2.Name = "attac2"
  174. attac2.Parent = Part17
  175.  
  176. attac2.Position = Vector3.new(0,1,0)
  177. attac3.Name = "attac3"
  178. attac3.Parent = Part22
  179.  
  180. attac3.Position = Vector3.new(0,-.775,0)
  181. RopeConstraint14.Parent = Part3
  182. RopeConstraint14.Length = 0.034995075315237
  183. RopeConstraint14.Visible = true
  184. RopeConstraint14.Attachment0 = attac
  185. RopeConstraint14.Attachment1 = attac1
  186. RopeConstraint15.Parent = Part3
  187. RopeConstraint15.Length = 0.034995075315237
  188. RopeConstraint15.Visible = true
  189. RopeConstraint15.Attachment0 = attac
  190. RopeConstraint15.Attachment1 = attac1
  191. Part16.Name = "front left leg"
  192. Part16.Parent = Model0
  193. Part16.CFrame = CFrame.new(-1.74999297, 0.975010395, -0.475000978, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  194. Part16.Position = Vector3.new(-1.74999297, 0.975010395, -0.475000978)
  195. Part16.Color = Color3.new(0.835294, 0.45098, 0.239216)
  196. Part16.Size = Vector3.new(1, 2, 1)
  197. Part16.BottomSurface = Enum.SurfaceType.Smooth
  198. Part16.BrickColor = BrickColor.new("Neon orange")
  199. Part16.CanCollide = false
  200. Part16.TopSurface = Enum.SurfaceType.Smooth
  201. Part16.brickColor = BrickColor.new("Neon orange")
  202. Part17.Name = "tail1"
  203. Part17.Parent = Model0
  204. Part17.CFrame = CFrame.new(-0.249992996, 3.4707334, 4.0597291, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  205. Part17.Orientation = Vector3.new(90, 0, 0)
  206. Part17.Position = Vector3.new(-0.249992996, 3.4707334, 4.0597291)
  207. Part17.Rotation = Vector3.new(90, 0, 0)
  208. Part17.Color = Color3.new(0.835294, 0.45098, 0.239216)
  209. Part17.Size = Vector3.new(1, 2, 1)
  210. Part17.BottomSurface = Enum.SurfaceType.Smooth
  211. Part17.BrickColor = BrickColor.new("Neon orange")
  212. Part17.CanCollide = false
  213. Part17.TopSurface = Enum.SurfaceType.Smooth
  214. Part17.brickColor = BrickColor.new("Neon orange")
  215. RopeConstraint18.Parent = Part17
  216. RopeConstraint18.Length = 0.30000001192093
  217. RopeConstraint18.Visible = true
  218. RopeConstraint18.Attachment0 = attac2
  219. RopeConstraint18.Attachment1 = attac3
  220. Part19.Name = "HumanoidRootPart"
  221. Part19.Parent = Model0
  222. Part19.CFrame = CFrame.new(-0.249992996, 3.9750104, 1.02499902, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  223. Part19.Position = Vector3.new(-0.249992996, 3.9750104, 1.02499902)
  224. Part19.Color = Color3.new(0.835294, 0.45098, 0.239216)
  225. Part19.Size = Vector3.new(2, 2, 2)
  226. Part19.BottomSurface = Enum.SurfaceType.Smooth
  227. Part19.BrickColor = BrickColor.new("Neon orange")
  228. Part19.TopSurface = Enum.SurfaceType.Smooth
  229. Part19.brickColor = BrickColor.new("Neon orange")
  230. Motor6D20.Name = "Torso"
  231. Motor6D20.Parent = Part19
  232. Motor6D20.Part0 = Part19
  233. Motor6D20.Part1 = Part3
  234. Motor6D20.part1 = Part3
  235. Part21.Name = "back right leg"
  236. Part21.Parent = Model0
  237. Part21.CFrame = CFrame.new(1.25000703, 0.975010395, 2.52499914, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  238. Part21.Position = Vector3.new(1.25000703, 0.975010395, 2.52499914)
  239. Part21.Color = Color3.new(0.835294, 0.45098, 0.239216)
  240. Part21.Size = Vector3.new(1, 2, 1)
  241. Part21.BottomSurface = Enum.SurfaceType.Smooth
  242. Part21.BrickColor = BrickColor.new("Neon orange")
  243. Part21.CanCollide = false
  244. Part21.TopSurface = Enum.SurfaceType.Smooth
  245. Part21.brickColor = BrickColor.new("Neon orange")
  246. Part22.Name = "tail2"
  247. Part22.Parent = Model0
  248. Part22.CFrame = CFrame.new(-0.249992996, 3.45801449, 5.8580308, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  249. Part22.Orientation = Vector3.new(90, 0, 0)
  250. Part22.Position = Vector3.new(-0.249992996, 3.45801449, 5.8580308)
  251. Part22.Rotation = Vector3.new(90, 0, 0)
  252. Part22.Color = Color3.new(0.835294, 0.45098, 0.239216)
  253. Part22.Size = Vector3.new(1, 1.55000007, 1)
  254. Part22.BottomSurface = Enum.SurfaceType.Smooth
  255. Part22.BrickColor = BrickColor.new("Neon orange")
  256. Part22.CanCollide = false
  257. Part22.CollisionGroupId = 1
  258. Part22.TopSurface = Enum.SurfaceType.Smooth
  259. Part22.brickColor = BrickColor.new("Neon orange")
  260. Part23.Name = "stipe 1"
  261. Part23.Parent = Model0
  262. Part23.CFrame = CFrame.new(-0.249992996, 6.00001049, 0.0249990225, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  263. Part23.Position = Vector3.new(-0.249992996, 6.00001049, 0.0249990225)
  264. Part23.Color = Color3.new(0.411765, 0.25098, 0.156863)
  265. Part23.Size = Vector3.new(3.9000001, 0.0500000715, 1)
  266. Part23.BottomSurface = Enum.SurfaceType.Smooth
  267. Part23.BrickColor = BrickColor.new("Reddish brown")
  268. Part23.CanCollide = false
  269. Part23.TopSurface = Enum.SurfaceType.Smooth
  270. Part23.brickColor = BrickColor.new("Reddish brown")
  271. Script24.Name = "i told u ppl"
  272. Script24.Parent = Part23
  273.  
  274. Sound25.Name = "Song"
  275. Sound25.Parent = Script24
  276. Sound25.SoundId = "rbxassetid://1091083826"
  277. Sound25.Volume = 1
  278. Part26.Name = "stripe 2"
  279. Part26.Parent = Model0
  280. Part26.CFrame = CFrame.new(-0.249992996, 6.00001049, 2.02499914, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  281. Part26.Position = Vector3.new(-0.249992996, 6.00001049, 2.02499914)
  282. Part26.Color = Color3.new(0.411765, 0.25098, 0.156863)
  283. Part26.Size = Vector3.new(3.9000001, 0.0500000715, 1)
  284. Part26.BottomSurface = Enum.SurfaceType.Smooth
  285. Part26.BrickColor = BrickColor.new("Reddish brown")
  286. Part26.CanCollide = false
  287. Part26.TopSurface = Enum.SurfaceType.Smooth
  288. Part26.brickColor = BrickColor.new("Reddish brown")
  289. Part27.Name = "Head"
  290. Part27.Parent = Model0
  291. Part27.CFrame = CFrame.new(-0.249992996, 4.9750104, 0.524999022, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  292. Part27.Position = Vector3.new(-0.249992996, 4.9750104, 0.524999022)
  293. Part27.Color = Color3.new(0.835294, 0.45098, 0.239216)
  294. Part27.Size = Vector3.new(2, 2, 2)
  295. Part27.BottomSurface = Enum.SurfaceType.Smooth
  296. Part27.BrickColor = BrickColor.new("Neon orange")
  297. Part27.CanCollide = false
  298. Part27.TopSurface = Enum.SurfaceType.Smooth
  299. Part27.brickColor = BrickColor.new("Neon orange")
  300.  
  301. LocalScript29.Name = "Animate"
  302. LocalScript29.Parent = Model0
  303. table.insert(cors,sandbox(LocalScript29,function()
  304. local Figure = script.Parent
  305. local Torso = Figure:WaitForChild("Torso")
  306. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  307. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  308. local RightHip = Torso:WaitForChild("Right Hip")
  309. local LeftHip = Torso:WaitForChild("Left Hip")
  310. local Neck = Torso:WaitForChild("Neck")
  311. local Humanoid = Figure:WaitForChild("Humanoid")
  312. local pose = "Standing"
  313.  
  314. local currentAnim = ""
  315. local currentAnimInstance = nil
  316. local currentAnimTrack = nil
  317. local currentAnimKeyframeHandler = nil
  318. local currentAnimSpeed = 1.0
  319. local animTable = {}
  320. local animNames = {
  321. idle = {
  322. { id = "http://www.roblox.com/asset/?id=2912266963", weight = 9 },
  323. { id = "http://www.roblox.com/asset/?id=2912266963", weight = 1 }
  324. },
  325. walk = {
  326. { id = "http://www.roblox.com/asset/?id=2912268301", weight = 10 }
  327. },
  328. run = {
  329. { id = "run.xml", weight = 10 }
  330. },
  331. jump = {
  332. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  333. },
  334. fall = {
  335. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  336. },
  337. climb = {
  338. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  339. },
  340. sit = {
  341. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  342. },
  343. toolnone = {
  344. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  345. },
  346. toolslash = {
  347. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  348. -- { id = "slash.xml", weight = 10 }
  349. },
  350. toollunge = {
  351. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  352. },
  353. wave = {
  354. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  355. },
  356. point = {
  357. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  358. },
  359. dance1 = {
  360. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  361. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  362. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  363. },
  364. dance2 = {
  365. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  366. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  367. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  368. },
  369. dance3 = {
  370. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  371. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  372. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  373. },
  374. laugh = {
  375. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  376. },
  377. cheer = {
  378. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  379. },
  380. }
  381. local dances = {"dance1", "dance2", "dance3"}
  382.  
  383. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  384. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  385.  
  386. function configureAnimationSet(name, fileList)
  387. if (animTable[name] ~= nil) then
  388. for _, connection in pairs(animTable[name].connections) do
  389. connection:disconnect()
  390. end
  391. end
  392. animTable[name] = {}
  393. animTable[name].count = 0
  394. animTable[name].totalWeight = 0
  395. animTable[name].connections = {}
  396.  
  397. -- check for config values
  398. local config = script:FindFirstChild(name)
  399. if (config ~= nil) then
  400. -- print("Loading anims " .. name)
  401. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  402. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  403. local idx = 1
  404. for _, childPart in pairs(config:GetChildren()) do
  405. if (childPart:IsA("Animation")) then
  406. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  407. animTable[name][idx] = {}
  408. animTable[name][idx].anim = childPart
  409. local weightObject = childPart:FindFirstChild("Weight")
  410. if (weightObject == nil) then
  411. animTable[name][idx].weight = 1
  412. else
  413. animTable[name][idx].weight = weightObject.Value
  414. end
  415. animTable[name].count = animTable[name].count + 1
  416. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  417. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  418. idx = idx + 1
  419. end
  420. end
  421. end
  422.  
  423. -- fallback to defaults
  424. if (animTable[name].count <= 0) then
  425. for idx, anim in pairs(fileList) do
  426. animTable[name][idx] = {}
  427. animTable[name][idx].anim = Instance.new("Animation")
  428. animTable[name][idx].anim.Name = name
  429. animTable[name][idx].anim.AnimationId = anim.id
  430. animTable[name][idx].weight = anim.weight
  431. animTable[name].count = animTable[name].count + 1
  432. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  433. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  434. end
  435. end
  436. end
  437.  
  438. -- Setup animation objects
  439. function scriptChildModified(child)
  440. local fileList = animNames[child.Name]
  441. if (fileList ~= nil) then
  442. configureAnimationSet(child.Name, fileList)
  443. end
  444. end
  445.  
  446. script.ChildAdded:connect(scriptChildModified)
  447. script.ChildRemoved:connect(scriptChildModified)
  448.  
  449.  
  450. for name, fileList in pairs(animNames) do
  451. configureAnimationSet(name, fileList)
  452. end
  453.  
  454. -- ANIMATION
  455.  
  456. -- declarations
  457. local toolAnim = "None"
  458. local toolAnimTime = 0
  459.  
  460. local jumpAnimTime = 0
  461. local jumpAnimDuration = 0.3
  462.  
  463. local toolTransitionTime = 0.1
  464. local fallTransitionTime = 0.3
  465. local jumpMaxLimbVelocity = 0.75
  466.  
  467. -- functions
  468.  
  469. function stopAllAnimations()
  470. local oldAnim = currentAnim
  471.  
  472. -- return to idle if finishing an emote
  473. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  474. oldAnim = "idle"
  475. end
  476.  
  477. currentAnim = ""
  478. currentAnimInstance = nil
  479. if (currentAnimKeyframeHandler ~= nil) then
  480. currentAnimKeyframeHandler:disconnect()
  481. end
  482.  
  483. if (currentAnimTrack ~= nil) then
  484. currentAnimTrack:Stop()
  485. currentAnimTrack:Destroy()
  486. currentAnimTrack = nil
  487. end
  488. return oldAnim
  489. end
  490.  
  491. function setAnimationSpeed(speed)
  492. if speed ~= currentAnimSpeed then
  493. currentAnimSpeed = speed
  494. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  495. end
  496. end
  497.  
  498. function keyFrameReachedFunc(frameName)
  499. if (frameName == "End") then
  500.  
  501. local repeatAnim = currentAnim
  502. -- return to idle if finishing an emote
  503. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  504. repeatAnim = "idle"
  505. end
  506.  
  507. local animSpeed = currentAnimSpeed
  508. playAnimation(repeatAnim, 0.0, Humanoid)
  509. setAnimationSpeed(animSpeed)
  510. end
  511. end
  512.  
  513. -- Preload animations
  514. function playAnimation(animName, transitionTime, humanoid)
  515.  
  516. local roll = math.random(1, animTable[animName].totalWeight)
  517. local origRoll = roll
  518. local idx = 1
  519. while (roll > animTable[animName][idx].weight) do
  520. roll = roll - animTable[animName][idx].weight
  521. idx = idx + 1
  522. end
  523. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  524. local anim = animTable[animName][idx].anim
  525.  
  526. -- switch animation
  527. if (anim ~= currentAnimInstance) then
  528.  
  529. if (currentAnimTrack ~= nil) then
  530. currentAnimTrack:Stop(transitionTime)
  531. currentAnimTrack:Destroy()
  532. end
  533.  
  534. currentAnimSpeed = 1.0
  535.  
  536. -- load it to the humanoid; get AnimationTrack
  537. currentAnimTrack = humanoid:LoadAnimation(anim)
  538. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  539.  
  540. -- play the animation
  541. currentAnimTrack:Play(transitionTime)
  542. currentAnim = animName
  543. currentAnimInstance = anim
  544.  
  545. -- set up keyframe name triggers
  546. if (currentAnimKeyframeHandler ~= nil) then
  547. currentAnimKeyframeHandler:disconnect()
  548. end
  549. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  550.  
  551. end
  552.  
  553. end
  554.  
  555. -------------------------------------------------------------------------------------------
  556. -------------------------------------------------------------------------------------------
  557.  
  558. local toolAnimName = ""
  559. local toolAnimTrack = nil
  560. local toolAnimInstance = nil
  561. local currentToolAnimKeyframeHandler = nil
  562.  
  563. function toolKeyFrameReachedFunc(frameName)
  564. if (frameName == "End") then
  565. -- print("Keyframe : ".. frameName)
  566. playToolAnimation(toolAnimName, 0.0, Humanoid)
  567. end
  568. end
  569.  
  570.  
  571. function playToolAnimation(animName, transitionTime, humanoid, priority)
  572.  
  573. local roll = math.random(1, animTable[animName].totalWeight)
  574. local origRoll = roll
  575. local idx = 1
  576. while (roll > animTable[animName][idx].weight) do
  577. roll = roll - animTable[animName][idx].weight
  578. idx = idx + 1
  579. end
  580. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  581. local anim = animTable[animName][idx].anim
  582.  
  583. if (toolAnimInstance ~= anim) then
  584.  
  585. if (toolAnimTrack ~= nil) then
  586. toolAnimTrack:Stop()
  587. toolAnimTrack:Destroy()
  588. transitionTime = 0
  589. end
  590.  
  591. -- load it to the humanoid; get AnimationTrack
  592. toolAnimTrack = humanoid:LoadAnimation(anim)
  593. if priority then
  594. toolAnimTrack.Priority = priority
  595. end
  596.  
  597. -- play the animation
  598. toolAnimTrack:Play(transitionTime)
  599. toolAnimName = animName
  600. toolAnimInstance = anim
  601.  
  602. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  603. end
  604. end
  605.  
  606. function stopToolAnimations()
  607. local oldAnim = toolAnimName
  608.  
  609. if (currentToolAnimKeyframeHandler ~= nil) then
  610. currentToolAnimKeyframeHandler:disconnect()
  611. end
  612.  
  613. toolAnimName = ""
  614. toolAnimInstance = nil
  615. if (toolAnimTrack ~= nil) then
  616. toolAnimTrack:Stop()
  617. toolAnimTrack:Destroy()
  618. toolAnimTrack = nil
  619. end
  620.  
  621.  
  622. return oldAnim
  623. end
  624.  
  625. -------------------------------------------------------------------------------------------
  626. -------------------------------------------------------------------------------------------
  627.  
  628.  
  629. function onRunning(speed)
  630. if speed > 0.01 then
  631. playAnimation("walk", 0.1, Humanoid)
  632. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  633. setAnimationSpeed(speed / 14.5)
  634. end
  635. pose = "Running"
  636. else
  637. if emoteNames[currentAnim] == nil then
  638. playAnimation("idle", 0.1, Humanoid)
  639. pose = "Standing"
  640. end
  641. end
  642. end
  643.  
  644. function onDied()
  645. pose = "Dead"
  646. end
  647.  
  648. function onJumping()
  649. playAnimation("jump", 0.1, Humanoid)
  650. jumpAnimTime = jumpAnimDuration
  651. pose = "Jumping"
  652. end
  653.  
  654. function onClimbing(speed)
  655. playAnimation("climb", 0.1, Humanoid)
  656. setAnimationSpeed(speed / 12.0)
  657. pose = "Climbing"
  658. end
  659.  
  660. function onGettingUp()
  661. pose = "GettingUp"
  662. end
  663.  
  664. function onFreeFall()
  665. if (jumpAnimTime <= 0) then
  666. playAnimation("fall", fallTransitionTime, Humanoid)
  667. end
  668. pose = "FreeFall"
  669. end
  670.  
  671. function onFallingDown()
  672. pose = "FallingDown"
  673. end
  674.  
  675. function onSeated()
  676. pose = "Seated"
  677. end
  678.  
  679. function onPlatformStanding()
  680. pose = "PlatformStanding"
  681. end
  682.  
  683. function onSwimming(speed)
  684. if speed > 0 then
  685. pose = "Running"
  686. else
  687. pose = "Standing"
  688. end
  689. end
  690.  
  691. function getTool()
  692. for _, kid in ipairs(Figure:GetChildren()) do
  693. if kid.className == "Tool" then return kid end
  694. end
  695. return nil
  696. end
  697.  
  698. function getToolAnim(tool)
  699. for _, c in ipairs(tool:GetChildren()) do
  700. if c.Name == "toolanim" and c.className == "StringValue" then
  701. return c
  702. end
  703. end
  704. return nil
  705. end
  706.  
  707. function animateTool()
  708.  
  709. if (toolAnim == "None") then
  710. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  711. return
  712. end
  713.  
  714. if (toolAnim == "Slash") then
  715. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  716. return
  717. end
  718.  
  719. if (toolAnim == "Lunge") then
  720. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  721. return
  722. end
  723. end
  724.  
  725. function moveSit()
  726. RightShoulder.MaxVelocity = 0.15
  727. LeftShoulder.MaxVelocity = 0.15
  728. RightShoulder:SetDesiredAngle(3.14 /2)
  729. LeftShoulder:SetDesiredAngle(-3.14 /2)
  730. RightHip:SetDesiredAngle(3.14 /2)
  731. LeftHip:SetDesiredAngle(-3.14 /2)
  732. end
  733.  
  734. local lastTick = 0
  735.  
  736. function move(time)
  737. local amplitude = 1
  738. local frequency = 1
  739. local deltaTime = time - lastTick
  740. lastTick = time
  741.  
  742. local climbFudge = 0
  743. local setAngles = false
  744.  
  745. if (jumpAnimTime > 0) then
  746. jumpAnimTime = jumpAnimTime - deltaTime
  747. end
  748.  
  749. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  750. playAnimation("fall", fallTransitionTime, Humanoid)
  751. elseif (pose == "Seated") then
  752. playAnimation("sit", 0.5, Humanoid)
  753. return
  754. elseif (pose == "Running") then
  755. playAnimation("walk", 0.1, Humanoid)
  756. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  757. -- print("Wha " .. pose)
  758. stopAllAnimations()
  759. amplitude = 0.1
  760. frequency = 1
  761. setAngles = true
  762. end
  763.  
  764. if (setAngles) then
  765. local desiredAngle = amplitude * math.sin(time * frequency)
  766.  
  767. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  768. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  769. RightHip:SetDesiredAngle(-desiredAngle)
  770. LeftHip:SetDesiredAngle(-desiredAngle)
  771. end
  772.  
  773. -- Tool Animation handling
  774. local tool = getTool()
  775. if tool and tool:FindFirstChild("Handle") then
  776.  
  777. local animStringValueObject = getToolAnim(tool)
  778.  
  779. if animStringValueObject then
  780. toolAnim = animStringValueObject.Value
  781. -- message recieved, delete StringValue
  782. animStringValueObject.Parent = nil
  783. toolAnimTime = time + .3
  784. end
  785.  
  786. if time > toolAnimTime then
  787. toolAnimTime = 0
  788. toolAnim = "None"
  789. end
  790.  
  791. animateTool()
  792. else
  793. stopToolAnimations()
  794. toolAnim = "None"
  795. toolAnimInstance = nil
  796. toolAnimTime = 0
  797. end
  798. end
  799.  
  800. -- connect events
  801. Humanoid.Died:connect(onDied)
  802. Humanoid.Running:connect(onRunning)
  803. Humanoid.Jumping:connect(onJumping)
  804. Humanoid.Climbing:connect(onClimbing)
  805. Humanoid.GettingUp:connect(onGettingUp)
  806. Humanoid.FreeFalling:connect(onFreeFall)
  807. Humanoid.FallingDown:connect(onFallingDown)
  808. Humanoid.Seated:connect(onSeated)
  809. Humanoid.PlatformStanding:connect(onPlatformStanding)
  810. Humanoid.Swimming:connect(onSwimming)
  811.  
  812. -- setup emote chat hook
  813. game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  814. local emote = ""
  815. if msg == "/e dance" then
  816. emote = dances[math.random(1, #dances)]
  817. elseif (string.sub(msg, 1, 3) == "/e ") then
  818. emote = string.sub(msg, 4)
  819. elseif (string.sub(msg, 1, 7) == "/emote ") then
  820. emote = string.sub(msg, 8)
  821. end
  822.  
  823. if (pose == "Standing" and emoteNames[emote] ~= nil) then
  824. playAnimation(emote, 0.1, Humanoid)
  825. end
  826.  
  827. end)
  828.  
  829.  
  830. -- main program
  831.  
  832. -- initialize to idle
  833. playAnimation("idle", 0.1, Humanoid)
  834. pose = "Standing"
  835.  
  836. while Figure.Parent ~= nil do
  837. local _, time = wait(0.1)
  838. move(time)
  839. end
  840.  
  841.  
  842.  
  843. end))
  844. StringValue30.Name = "idle"
  845. StringValue30.Parent = LocalScript29
  846. Animation31.Name = "Animation1"
  847. Animation31.Parent = StringValue30
  848. Animation31.AnimationId = "rbxassetid://2912268301"
  849. NumberValue32.Name = "Weight"
  850. NumberValue32.Parent = Animation31
  851. NumberValue32.Value = 9
  852. Animation33.Name = "Animation2"
  853. Animation33.Parent = StringValue30
  854. Animation33.AnimationId = "rbxassetid://2912268301"
  855. NumberValue34.Name = "Weight"
  856. NumberValue34.Parent = Animation33
  857. NumberValue34.Value = 1
  858. StringValue35.Name = "walk"
  859. StringValue35.Parent = LocalScript29
  860. Animation36.Name = "WalkAnim"
  861. Animation36.Parent = StringValue35
  862. Animation36.AnimationId = "rbxassetid://2912266963"
  863. StringValue37.Name = "run"
  864. StringValue37.Parent = LocalScript29
  865. Animation38.Name = "RunAnim"
  866. Animation38.Parent = StringValue37
  867. Animation38.AnimationId = "rbxassetid://2912266963"
  868. StringValue39.Name = "jump"
  869. StringValue39.Parent = LocalScript29
  870. Animation40.Name = "JumpAnim"
  871. Animation40.Parent = StringValue39
  872. Animation40.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  873. StringValue41.Name = "climb"
  874. StringValue41.Parent = LocalScript29
  875. Animation42.Name = "ClimbAnim"
  876. Animation42.Parent = StringValue41
  877. Animation42.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  878. StringValue43.Name = "toolnone"
  879. StringValue43.Parent = LocalScript29
  880. Animation44.Name = "ToolNoneAnim"
  881. Animation44.Parent = StringValue43
  882. Animation44.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  883. StringValue45.Name = "fall"
  884. StringValue45.Parent = LocalScript29
  885. Animation46.Name = "FallAnim"
  886. Animation46.Parent = StringValue45
  887. Animation46.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  888. StringValue47.Name = "sit"
  889. StringValue47.Parent = LocalScript29
  890. Animation48.Name = "SitAnim"
  891. Animation48.Parent = StringValue47
  892. Animation48.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  893. NumberValue49.Name = "ScaleDampeningPercent"
  894. NumberValue49.Parent = LocalScript29
  895. NumberValue49.Value = 0.40000000596046
  896. for i,v in pairs(mas:GetChildren()) do
  897. v.Parent = workspace
  898. pcall(function() v:MakeJoints() end)
  899. end
  900. mas:Destroy()
  901. for i,v in pairs(cors) do
  902. spawn(function()
  903. pcall(v)
  904. end)
  905. end
  906.  
  907. local Torso = game.workspace.Tabby_Cxt.Torso
  908.  
  909. local weld = Instance.new("Weld",Torso)
  910. weld.C0 = Torso.CFrame:Inverse() * workspace.a.Torso.CFrame
  911. weld.Part0 = Torso
  912. weld.Part1 = workspace.a.Torso
  913. local a = Torso.Parent
  914. c = a:GetChildren()
  915. for i=1, #c do
  916. if (c[i].className == "Accessory") then
  917. c[i]:remove()
  918. end
  919. end
  920.  
  921. Torso.Transparency = 1
  922. a.Head.Transparency = 1
  923. a["Left Arm"].Transparency = 1
  924. a["Right Arm"].Transparency = 1
  925. a["Left Leg"].Transparency = 1
  926. a["Right Leg"].Transparency = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement