Advertisement
Guest User

SPVERISI

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