Advertisement
Marcsosa

Untitled

Mar 8th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local oldtick = tick()
  2. warn("Animation rig - By Mewy23")
  3. local plr = game:GetService("Players").LocalPlayer
  4. local char, mouse = plr.Character, plr:GetMouse()
  5. local hitTab = {}
  6. local fadeTab = {}
  7. local spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
  8. local sound1 = Instance.new("Sound", char.HumanoidRootPart)
  9. local sound2 = Instance.new("Sound", char.HumanoidRootPart)
  10. local sound3 = Instance.new("Sound")
  11. sound1.SoundId = "rbxassetid://130767866"
  12. sound1.Volume = 10
  13. sound2.SoundId = "rbxassetid://142684400"
  14. sound2.Volume = 10
  15. sound3.SoundId = "rbxassetid://985132972"
  16. sound3.Volume = 10
  17. local particle = Instance.new("ParticleEmitter")
  18. particle.LightEmission = 0.2
  19. particle.Texture = "rbxassetid://50263573"
  20. particle.Size = NumberSequence.new({
  21. NumberSequenceKeypoint.new(0, 0),
  22. NumberSequenceKeypoint.new(0.5, 1),
  23. NumberSequenceKeypoint.new(1, 0)
  24. })
  25. particle.Acceleration = Vector3.new(0, 0, 0)
  26. particle.Lifetime = NumberRange.new(0.15, 0.3)
  27. particle.Rate = 50
  28. particle.Rotation = NumberRange.new(0, 360)
  29. particle.RotSpeed = NumberRange.new(0, 0)
  30. particle.Speed = NumberRange.new(0, 0)
  31. local dfj = {}
  32. char:WaitForChild("Animate"):Destroy()
  33. char:WaitForChild("Humanoid"):WaitForChild("Animator"):Destroy()
  34. for i, v in pairs(char:FindFirstChild("Torso"):GetChildren()) do
  35. if v:IsA("Motor6D") and v.Name ~= "Neck" then
  36. table.insert(dfj, v:Clone())
  37. v:Destroy()
  38. char.Humanoid.MaxHealth = math.huge
  39. wait()
  40. char.Humanoid.Health = math.huge
  41. end
  42. end
  43. local state = "idle"
  44. local rootpart = char:FindFirstChild("HumanoidRootPart")
  45. local rootjoint = rootpart:FindFirstChild("RootJoint")
  46. rootjoint.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))
  47. local rarm = Instance.new("Weld", char:FindFirstChild("Right Arm") or nil)
  48. rarm.Part0 = char:FindFirstChild("Torso") or nil
  49. rarm.Part1 = char:FindFirstChild("Right Arm") or nil
  50. rarm.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  51. rarm.C1 = CFrame.new(-0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  52. local larm = Instance.new("Weld", char:FindFirstChild("Left Arm") or nil)
  53. larm.Part0 = char:FindFirstChild("Torso") or nil
  54. larm.Part1 = char:FindFirstChild("Left Arm") or nil
  55. larm.C0 = CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  56. larm.C1 = CFrame.new(0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  57. local rleg = Instance.new("Weld", char:FindFirstChild("Right Leg") or nil)
  58. rleg.Part0 = char:FindFirstChild("Torso") or nil
  59. rleg.Part1 = char:FindFirstChild("Right Leg") or nil
  60. rleg.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  61. rleg.C1 = CFrame.new(0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  62. local lleg = Instance.new("Weld", char:FindFirstChild("Left Leg") or nil)
  63. lleg.Part0 = char:FindFirstChild("Torso") or nil
  64. lleg.Part1 = char:FindFirstChild("Left Leg") or nil
  65. lleg.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  66. lleg.C1 = CFrame.new(-0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  67. local neck = char:FindFirstChild("Torso"):FindFirstChild("Neck") or nil
  68. neck.Part0 = char:FindFirstChild("Torso") or nil
  69. neck.Part1 = char:FindFirstChild("Head") or nil
  70. neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  71. neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  72. function hitSphere()
  73. local function recSearch(par)
  74. local tab = {}
  75. local function rec(parent)
  76. if parent:IsA("Humanoid") and parent ~= char:FindFirstChildOfClass("Humanoid") then
  77. table.insert(tab, parent)
  78. end
  79. for i, v in pairs(parent:GetChildren()) do
  80. rec(v)
  81. end
  82. end
  83. rec(par)
  84. return tab
  85. end
  86. local humsFound = {}
  87. for i, v in pairs(recSearch(workspace)) do
  88. table.insert(humsFound, v)
  89. end
  90. return humsFound
  91. end
  92. mouse.Button1Down:connect(function()
  93. if state ~= "busy" then
  94. state = "busy"
  95. do
  96. local foundHums = {}
  97. local prtcls = {}
  98. local sounds = {}
  99. local parts = {}
  100. sound1:Play()
  101. local hit = false
  102. local toggle = false
  103. local frmcon
  104. local frame = 0
  105. frmcon = game:service("RunService").RenderStepped:connect(function()
  106. frame = frame + 1
  107. if frame / 4 == math.floor(frame / 4) then
  108. if toggle == false then
  109. toggle = true
  110. else
  111. toggle = false
  112. end
  113. end
  114. if toggle == true then
  115. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  116. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  117. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(45)), spd * 1.5)
  118. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(90)), spd * 1.5)
  119. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(225)), spd * 1.5)
  120. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(-45), math.rad(0)), spd * 1.5)
  121. else
  122. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  123. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  124. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), spd * 1.5)
  125. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-45)), spd * 1.5)
  126. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(135)), spd * 1.5)
  127. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)), spd * 1.5)
  128. end
  129. if frame % 5 == 0 then
  130. for i, v in pairs(hitSphere()) do
  131. for o, b in pairs(v.Parent:GetChildren()) do
  132. if b:IsA("BasePart") and 4 >= (b.Position - rootjoint.Parent.CFrame * CFrame.new(0, 0, -2.25).p).Magnitude then
  133. hit = true
  134. if foundHums[v] then
  135. foundHums[v] = foundHums[v] + 1
  136. else
  137. foundHums[v] = 1
  138. local ns = sound3:Clone()
  139. ns.Parent = b
  140. table.insert(sounds, ns)
  141. end
  142. if not prtcls[b] then
  143. partClone = particle:Clone()
  144. partClone.Enabled = false
  145. partClone.Parent = b
  146. prtcls[b] = partClone
  147. end
  148. local p = Instance.new("Part")
  149. p.Size = Vector3.new(0.2, 0.2, 0.2)
  150. p.Color = Color3.new(1, 1, 1)
  151. p.TopSurface = "Smooth"
  152. p.BottomSurface = "Smooth"
  153. p.Anchored = true
  154. p.CanCollide = false
  155. p.Shape = "Ball"
  156. p.CFrame = CFrame.new(b.CFrame.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10))
  157. p.Parent = workspace
  158. table.insert(fadeTab, p)
  159. parts[b] = b
  160. end
  161. end
  162. end
  163. end
  164. end)
  165. local bucon
  166. bucon = mouse.Button1Up:connect(function()
  167. frmcon:disconnect()
  168. sound1:Stop()
  169. state = "idle"
  170. if hit == true then
  171. sound2:Play()
  172. wait(2.7)
  173. for i, v in pairs(sounds) do
  174. spawn(function()
  175. wait(math.random(0, 100) / 600)
  176. v.TimePosition = 2.5
  177. v:Play()
  178. end)
  179. end
  180. wait(1.2)
  181. for i, v in pairs(prtcls) do
  182. v.Enabled = true
  183.  
  184. shirt = Instance.new("Shirt", char)
  185. shirt.Name = "Shirt"
  186. pants = Instance.new("Pants", char)
  187. pants.Name = "Pants"
  188. char.Shirt:Remove()
  189. char.Pants:Remove()
  190. for i,v in pairs(char:GetChildren()) do if v:IsA("Accessory") then v.Handle:Remove() end end
  191. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1033632130"
  192. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=736491162"
  193. char.Head.face.Texture = "rbxassetid://340355951"
  194. end
  195. wait(1.3)
  196. spawn(function()
  197. local rcon
  198. local frame = 0
  199. rcon = game:service("RunService").RenderStepped:connect(function()
  200. frame = frame + 1
  201. for i, v in pairs(sounds) do
  202. v.Volume = 10 - frame / 5
  203. if v.Volume <= 0 then
  204. v.Volume = 0
  205. v:Destroy()
  206. end
  207. end
  208. if frame >= 200 then
  209. for i, v in pairs(sounds) do
  210. v:Destroy()
  211. end
  212. end
  213. end)
  214. end)
  215. for i, v in pairs(parts) do
  216. v.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  217. v.Velocity = v.Velocity + Vector3.new(0, 20, 0)
  218. local bvel = Instance.new("BodyVelocity", v)
  219. bvel.MaxForce = Vector3.new(1000000, 1000000, 1000000)
  220. bvel.Velocity = Vector3.new(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  221. game:service("Debris"):AddItem(bvel, 0.5)
  222. end
  223. for i, v in pairs(foundHums) do
  224. if i.MaxHealth >= math.huge then
  225. i.MaxHealth = 100
  226. end
  227. i.Health = 0
  228. end
  229. wait(0.7)
  230. for i, v in pairs(prtcls) do
  231. v.Enabled = false
  232. end
  233. end
  234. bucon:disconnect()
  235. end)
  236. end
  237. end
  238. end)
  239. game:GetService("RunService").Heartbeat:connect(function()
  240. for i, v in pairs(fadeTab) do
  241. v.Transparency = v.Transparency + 0.1
  242. local savecf = v.CFrame
  243. v.Size = v.Size + Vector3.new(0.3, 0.3, 0.3)
  244. v.CFrame = savecf
  245. end
  246. local isub = 0
  247. for i = 1, #fadeTab do
  248. if fadeTab[i - isub].Transparency >= 1 then
  249. fadeTab[i - isub]:Destroy()
  250. table.remove(fadeTab, i - isub)
  251. isub = isub + 1
  252. end
  253. end
  254. char:FindFirstChild("Humanoid").WalkSpeed = 26
  255. spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
  256. if state ~= "busy" then
  257. local ray = Ray.new(rootpart.Position, Vector3.new(0, -4, 0))
  258. local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, char:GetChildren(), false, true)
  259. if rootpart.Velocity.Magnitude > 0.5 and part ~= nil then
  260. state = "running"
  261. elseif rootpart.Velocity.Magnitude <= 0.5 and part ~= nil then
  262. state = "idle"
  263. elseif 0 < rootpart.Velocity.Y and part == nil then
  264. state = "jumping"
  265. elseif 0 >= rootpart.Velocity.Y and part == nil then
  266. state = "falling"
  267. end
  268. if state == "idle" then
  269. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  270. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  271. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad((math.cos(tick()) + 1) / 16) * 20), spd)
  272. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-(math.cos(tick()) + 1) / 16) * 20), spd)
  273. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  274. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  275. elseif state == "running" then
  276. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - -math.sin(tick() * 8 + 90) / 8, math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd)
  277. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.sin(tick() * 8 + 90) / 8, -math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd)
  278. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd)
  279. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd)
  280. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-110), math.rad(0), math.rad(180)), spd)
  281. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), spd)
  282. elseif state == "jumping" then
  283. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  284. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  285. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  286. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  287. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  288. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  289. elseif state == "falling" then
  290. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  291. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  292. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  293. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  294. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  295. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  296. end
  297. mesh=Instance.new('SpecialMesh',part)
  298. mesh.MeshId='http://www.roblox.com/asset/?id=20329976'
  299. mesh.Scale=Vector3.new(10,5,10)
  300. end
  301. end)
  302. warn("Loaded! Time elapsed: " .. tick() - oldtick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement