Advertisement
iiFlamez

Untitled

Dec 4th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.09 KB | None | 0 0
  1. -- params : ...
  2.  
  3. local Player = script.Parent.Parent
  4. local Mouse = Player:GetMouse()
  5. repeat
  6. wait()
  7. until Player.Character
  8. local Character = Player.Character
  9. local Camera = workspace.CurrentCamera
  10. local PlayerGui = Player:WaitForChild("PlayerGui")
  11. local allmult = 1
  12. local Humanoid = Character:WaitForChild("Humanoid")
  13. table.foreach(Humanoid:GetPlayingAnimationTracks(), function(_, v)
  14. v:Stop()
  15. end)
  16. if Character:FindFirstChild("Animate) then
  17. Character:FindFirstChild("Animate):Destroy()
  18. end
  19. local Container = Character.Head:WaitForChild("Container)
  20. local woosh = Character.Torso:WaitForChild("woosh")
  21. local voiceline = Character.Torso:WaitForChild("voiceline")
  22. local menacing = Character.Torso:WaitForChild("Menacing")
  23. local InputService = game:GetService("UserInputService")
  24. local intextbox = false
  25. local changestatevent = game:GetService("ReplicatedStorage").Data.changestat
  26. local jointevent = game:GetService("ReplicatedStorage").Logic.sendjoints
  27. local updatejointevent = game:GetService("ReplicatedStorage").Logic.receivejoints
  28. local hitevent = game:GetService("ReplicatedStorage").Logic.hitbox
  29. local miscevent = game:GetService("ReplicatedStorage").Logic.misc
  30. miscevent:FireServer(5, Humanoid, 16)
  31. addexp = function(amount)
  32. if amount > 0 and Player:FindFirstChild("Experience").Value + amount < Player:FindFirstChild("Level").Value * 200 then
  33. changestatevent:FireServer("Experience", Player:FindFirstChild("Experience").Value + amount)
  34. else
  35. if amount > 0 and Player:FindFirstChild("Level").Value * 200 <= Player:FindFirstChild("Experience").Value + amount then
  36. changestatevent:FireServer("Level", Player:FindFirstChild("Level").Value + 1)
  37. changestatevent:FireServer("Experience", 0)
  38. changestatevent:FireServer("Points", Player:FindFirstChild("Points").Value + 3)
  39. end
  40. end
  41. end
  42.  
  43. local Joints = {Character.HumanoidRootPart.RootJoint, Character.Torso.Neck, Character.Torso["Left Shoulder"], Character.Torso["Right Shoulder"], Character.Torso["Left Hip"], Character.Torso["Right Hip"]}
  44. local specialsound = Character.Torso:WaitForChild("specialsound")
  45. local specialsound2 = Character.Torso:WaitForChild("specialsound2")
  46. local specialtable = {}
  47. local specialvar, random1, random2, random3, random4, random5 = nil, nil, nil, nil, nil, nil
  48. local orig1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  49. local orig2 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  50. local orig3 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  51. local orig4 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  52. local orig5 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  53. local orig6 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  54. local timer = 0
  55. local speed = 0.02
  56. local effecttimer = 0
  57. local hit = false
  58. local punching = false
  59. local animation = 0
  60. local keyframe = 0
  61. local attacking = false
  62. local jointtimer = 0
  63. local keepmoving = false
  64. local moveframe = 0
  65. local movetimer = 0
  66. local movespeed = 0
  67. local falling = false
  68. local canfall = true
  69. local running = false
  70. local cooled1 = true
  71. local cooled2 = true
  72. randomangle = function(restrict)
  73. local angle = nil
  74. if not restrict then
  75. angle = math.random(math.rad(-360), math.rad(360))
  76. else
  77. angle = math.random(math.rad(-restrict), math.rad(restrict))
  78. end
  79. return angle
  80. end
  81.  
  82. if workspace.timestopped.Value == true and workspace.timerstopper.Value ~= Player.Name then
  83. Character.Torso.Anchored = true
  84. end
  85. GetAxis = function(c1, c2)
  86. local axis = {}
  87. axis[1] = c1[2] - c1[1].unit
  88. axis[2] = c1[3] - c1[1].unit
  89. axis[3] = c1[5] - c1[1].unit
  90. axis[4] = c2[2] - c2[1].unit
  91. axis[5] = c2[3] - c2[1].unit
  92. axis[6] = c2[5] - c2[1].unit
  93. axis[7] = axis[1]:Cross(axis[4]).unit
  94. axis[8] = axis[1]:Cross(axis[5]).unit
  95. axis[9] = axis[1]:Cross(axis[6]).unit
  96. axis[10] = axis[2]:Cross(axis[4]).unit
  97. axis[11] = axis[2]:Cross(axis[5]).unit
  98. axis[12] = axis[2]:Cross(axis[6]).unit
  99. axis[13] = axis[3]:Cross(axis[4]).unit
  100. axis[14] = axis[3]:Cross(axis[5]).unit
  101. axis[15] = axis[3]:Cross(axis[6]).unit
  102. return axis
  103. end
  104.  
  105. TestAxis = function(corners1, corners2, axis, surface)
  106. if axis.Magnitude == 0 or tostring(axis) == "NAN, NAN, NAN" then
  107. return true
  108. end
  109. local adists, bdists = {}, {}
  110. for i = 1, 8 do
  111. table.insert(adists, corners1[i]:Dot(axis))
  112. table.insert(bdists, corners2[i]:Dot(axis))
  113. end
  114. local amax, amin = math.max(unpack(adists)), math.min(unpack(adists))
  115. local bmax, bmin = math.max(unpack(bdists)), math.min(unpack(bdists))
  116. local longspan = math.max(amax, bmax) - math.min(amin, bmin)
  117. local sumspan = amax - amin + bmax - bmin
  118. local pass, mtv = nil, nil
  119. if longspan > sumspan then
  120. pass = not surface
  121. pass = longspan < sumspan
  122. do
  123. do
  124. if pass and (bmax >= amax or not -(bmax - amin)) then
  125. local overlap = amax - bmin
  126. end
  127. mtv = axis * overlap
  128. do return pass, mtv end
  129. -- DECOMPILER ERROR: 7 unprocessed JMP targets
  130. end
  131. end
  132. end
  133. end
  134.  
  135. GetCorners = function(framepos, size)
  136. local size, corners = size / 2, {}
  137. for x = -1, 1, 2 do
  138. for y = -1, 1, 2 do
  139. for z = -1, 1, 2 do
  140. table.insert(corners, framepos * CFrame.new(size * Vector3.new(x, y, z)).p)
  141. end
  142. end
  143. end
  144. return corners
  145. end
  146.  
  147. NewRegion = function(framepos, size)
  148. local region = setmetatable({}, {
  149. __index = {}
  150. })
  151. region.surfaceCountsAsCollision = true
  152. region.cframe = framepos
  153. region.size = size
  154. region.planes = {}
  155. region.corners = GetCorners(region.cframe, region.size)
  156. for _,enum in next do
  157. local lnormal = Vector3.FromNormalId(enum)
  158. local wnormal = region.cframe:vectorToWorldSpace(lnormal)
  159. local distance = lnormal * region.size / 2.magnitude
  160. local point = region.cframe.p + wnormal * distance
  161. table.insert(region.planes, {normal = wnormal, point = point})
  162. end
  163. return region
  164. end
  165.  
  166. ShallowCopy = function(t)
  167. local nt = {}
  168. for k,v in next do
  169. nt[k] = v
  170. end
  171. return nt
  172. end
  173.  
  174. CastPart = function(part, region)
  175. local corners1 = region.corners
  176. local corners2 = GetCorners(part.CFrame, part.Size)
  177. local axis, mtvs = GetAxis(corners1, corners2), {}
  178. for i = 1, #axis do
  179. local intersect, mtv = TestAxis(corners1, corners2, axis[i], region.surfaceCountsAsCollision)
  180. if not intersect then
  181. return false, Vector3.new()
  182. end
  183. if mtv then
  184. table.insert(mtvs, mtv)
  185. end
  186. end
  187. table.sort(mtvs, function(a, b)
  188. do return a.magnitude < b.magnitude end
  189. -- DECOMPILER ERROR: 1 unprocessed JMP targets
  190. end)
  191. return true, mtvs[1]
  192. end
  193.  
  194. CastRegion = function(ignore, maxParts, region)
  195. if type(ignore) ~= "table" or not ignore then
  196. local ignore = {ignore}
  197. end
  198. local maxParts = maxParts or 20
  199. local rmin, rmax = {}, {}
  200. local copy = ShallowCopy(region.corners)
  201. for _,enum in next do
  202. local lnormal = Vector3.FromNormalId(enum)
  203. do
  204. table.sort(copy, function(a, b)
  205. do return b:Dot(lnormal) < a:Dot(lnormal) end
  206. -- DECOMPILER ERROR: 1 unprocessed JMP targets
  207. end)
  208. table.insert(rmin, copy[#copy)
  209. table.insert(rmax, copy[1)
  210. end
  211. end
  212. rmin = Vector3.new(rmin[1].x, rmin[2].y, rmin[3].z)
  213. local realRegion3 = Region3.new(rmin, rmax)
  214. local parts = game.Workspace:FindPartsInRegion3WithIgnoreList(realRegion3, ignore, maxParts)
  215. local inRegion = {}
  216. for _,part in next do
  217. if CastPart(part, region) then
  218. table.insert(inRegion, part)
  219. end
  220. end
  221. return inRegion
  222. end
  223.  
  224. game:GetService("ReplicatedStorage").Specials.receiveheartattack.OnClientEvent:connect(function(player, part, frame)
  225. if part then
  226. part.CFrame = frame
  227. end
  228. end)
  229. updatejointevent.OnClientEvent:connect(function(player, characterjoints, standjoints, standtorso)
  230. if player and player ~= Player and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("HumanoidRootPart"):FindFirstChild("RootJoint") then
  231. player.Character.HumanoidRootPart.RootJoint.C0 = characterjoints[1]
  232. player.Character.Torso.Neck.C0 = characterjoints[2]
  233. player.Character.Torso["Left Shoulder"].C0 = characterjoints[3]
  234. player.Character.Torso["Right Shoulder"].C0 = characterjoints[4]
  235. player.Character.Torso["Left Hip"].C0 = characterjoints[5]
  236. player.Character.Torso["Right Hip"].C0 = characterjoints[6]
  237. if player.Character.Head:FindFirstChild("Container") and player.Character.Head.Container:FindFirstChild("fakearm") and characterjoints[7] then
  238. player.Character.Head.Container:FindFirstChild("fakearm").CFrame = characterjoints[7]
  239. player.Character.Head.Container:FindFirstChild("fakearm").Size = characterjoints[8]
  240. end
  241. if standjoints and standtorso then
  242. standtorso.CFrame = standjoints[1]
  243. standtorso.Neck.C0 = standjoints[2]
  244. standtorso["Left Shoulder"].C0 = standjoints[3]
  245. standtorso["Right Shoulder"].C0 = standjoints[4]
  246. standtorso["Left Hip"].C0 = standjoints[5]
  247. standtorso["Right Hip"].C0 = standjoints[6]
  248. if player.Character.Head.Container:FindFirstChild("fakearm") and standjoints[7] then
  249. player.Character.Head.Container:FindFirstChild("fakearm").CFrame = standjoints[7]
  250. player.Character.Head.Container:FindFirstChild("fakearm").Size = standjoints[8]
  251. player.Character.Head.Container:FindFirstChild("fakearmpart").CFrame = standjoints[9]
  252. player.Character.Head.Container:FindFirstChild("fakearmpart").Size = standjoints[10]
  253. end
  254. end
  255. end
  256. end)
  257. local replicationtimer = 0
  258. game:GetService("RunService").RenderStepped:connect(function()
  259. if (workspace.timestopped.Value == false or workspace.timestopper.Value == Player.Name) and Humanoid.Health > 0 then
  260. replicationtimer = replicationtimer + 1
  261. if replicationtimer % 3 == 0 then
  262. jointevent:FireServer({Character.HumanoidRootPart.RootJoint.C0, Character.Torso.Neck.C0, Character.Torso["Left Shoulder"].C0, Character.Torso["Right Shoulder"].C0, Character.Torso["Left Hip"].C0, Character.Torso["Right Hip"].C0})
  263. end
  264. if keepmoving then
  265. movetimer = movetimer + movespeed
  266. if moveframe == 0 then
  267. if movetimer >= 0.8 then
  268. movetimer = 0
  269. moveframe = 1
  270. end
  271. if not running then
  272. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 - math.sin(movetimer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(movetimer * 2) / 1.5, (0.1 + math.sin(movetimer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  273. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 - math.sin(movetimer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(movetimer * 2) / 1.5, (0.1 + math.sin(movetimer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  274. else
  275. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 - math.sin(movetimer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(movetimer * 2) / 1.15, (0.1 + math.sin(movetimer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  276. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 - math.sin(movetimer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(movetimer * 2) / 1.15, (0.1 + math.sin(movetimer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  277. end
  278. else
  279. if moveframe == 1 then
  280. if movetimer >= 0.8 then
  281. movetimer = 0
  282. moveframe = 0
  283. end
  284. if not running then
  285. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 + math.sin(movetimer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(movetimer * 2) / 1.5, (0.1 - math.sin(movetimer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  286. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 + math.sin(movetimer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(movetimer * 2) / 1.5, (0.1 - math.sin(movetimer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  287. else
  288. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 + math.sin(movetimer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(movetimer * 2) / 1.15, (0.1 - math.sin(movetimer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  289. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 + math.sin(movetimer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(movetimer * 2) / 1.15, (0.1 - math.sin(movetimer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-3), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X)), movespeed * 1.95)
  290. end
  291. end
  292. end
  293. end
  294. timer = timer + speed
  295. if Character.HumanoidRootPart.Velocity.Y > 5 and not attacking and not falling and canfall then
  296. falling = true
  297. keepmoving = false
  298. speed = 0.02
  299. canfall = false
  300. animation = 2
  301. keyframe = 0
  302. if timer >= 0.5 then
  303. timer = 0
  304. end
  305. end
  306. if Character.HumanoidRootPart.Velocity.Y < -5 and not attacking and not falling and canfall then
  307. falling = true
  308. keepmoving = false
  309. speed = 0.02
  310. canfall = false
  311. animation = 2
  312. keyframe = 1
  313. if timer >= 1 then
  314. timer = 0
  315. end
  316. end
  317. if not falling then
  318. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) and not attacking and animation ~= 0 then
  319. animation = 0
  320. speed = 0.02
  321. keepmoving = false
  322. if keyframe > 1 then
  323. keyframe = 0
  324. end
  325. if timer >= 1.5 then
  326. timer = 0
  327. end
  328. else
  329. if Humanoid.MoveDirection ~= Vector3.new(0, 0, 0) and not attacking and animation ~= 1 then
  330. animation = 1
  331. keepmoving = false
  332. timer = movetimer
  333. if running then
  334. speed = 0.04
  335. else
  336. speed = 0.03
  337. end
  338. if keyframe > 1 then
  339. keyframe = 0
  340. end
  341. if timer >= 0.8 then
  342. timer = 0
  343. end
  344. end
  345. end
  346. else
  347. if falling then
  348. local region = NewRegion(Character.HumanoidRootPart.CFrame * CFrame.new(0, -4.1, 0), Vector3.new(2, 1, 1))
  349. for _,part in pairs(CastRegion(Character, math.huge, region)) do
  350. if part and part.CanCollide then
  351. local waiter = coroutine.wrap(function()
  352. falling = false
  353. wait(0.15)
  354. canfall = true
  355. end)
  356. waiter()
  357. break
  358. end
  359. end
  360. end
  361. end
  362. do
  363. if animation == 0 then
  364. if keyframe == 0 then
  365. if timer >= 1.5 then
  366. timer = 0
  367. keyframe = 1
  368. end
  369. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.) * CFrame.Angles(0, 0, math.rad(-8), speed * 1.2)
  370. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(8), 0, math.rad(8), speed * 1.2)
  371. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-2), math.rad(), math.rad(-3), speed * 1.5)
  372. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(-), math.rad(5), speed * 1.5)
  373. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(0, -0.09, ) * CFrame.Angles(math.rad(-7), math.rad(1), math.rad(-3), speed * 1.2)
  374. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new(0, -0.09, ) * CFrame.Angles(math.rad(-5), math.rad(), math.rad(4), speed * 1.2)
  375. else
  376. if keyframe == 1 then
  377. if timer >= 1.5 then
  378. timer = 0
  379. keyframe = 0
  380. end
  381. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(math.rad(4), 0, math.rad(-7), speed * 1.2)
  382. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(7), speed * 1.2)
  383. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-4), math.rad(), math.rad(-5), speed * 1.5)
  384. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-4), math.rad(-), math.rad(3), speed * 1.5)
  385. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.Angles(math.rad(-8), math.rad(1), math.rad(-8), speed * 1.2)
  386. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(), math.rad(6), speed * 1.2)
  387. end
  388. end
  389. else
  390. if animation == 1 then
  391. if keyframe == 0 then
  392. if timer >= 0.8 then
  393. timer = 0
  394. keyframe = 1
  395. end
  396. if not running then
  397. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.) * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * ), ), speed * 1.75)
  398. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(-4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  399. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-7), 0, math.rad(53 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  400. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-7), 0, math.rad(53 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  401. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 - math.sin(timer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(timer * ) / 1.5, (0.1 + math.sin(timer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  402. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 - math.sin(timer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(timer * ) / 1.5, (0.1 + math.sin(timer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  403. else
  404. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.1) * CFrame.Angles(math.rad(12 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * ), ), speed * 1.75)
  405. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(-4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  406. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-9), 0, math.rad(57 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  407. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-9), 0, math.rad(57 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  408. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 - math.sin(timer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(timer * ) / 1.15, (0.1 + math.sin(timer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  409. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 - math.sin(timer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(timer * ) / 1.15, (0.1 + math.sin(timer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(-23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(-43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z - 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  410. end
  411. else
  412. if keyframe == 1 then
  413. if timer >= 0.8 then
  414. timer = 0
  415. keyframe = 0
  416. end
  417. if not running then
  418. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.) * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * ), ), speed * 1.75)
  419. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(-4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  420. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-7), 0, math.rad(-53 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  421. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-7), 0, math.rad(-53 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  422. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 + math.sin(timer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(timer * ) / 1.5, (0.1 - math.sin(timer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  423. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 + math.sin(timer * 2) / 1.5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(timer * ) / 1.5, (0.1 - math.sin(timer * 2) / 5) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  424. else
  425. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.1) * CFrame.Angles(math.rad(12 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * ), ), speed * 1.75)
  426. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(-4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  427. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-9), 0, math.rad(-57 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  428. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-9), 0, math.rad(-57 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), speed * 1.75)
  429. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new((0.1 + math.sin(timer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 - math.cos(timer * ) / 1.15, (0.1 - math.sin(timer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  430. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new((0.1 + math.sin(timer * 2) / 1.15) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z, 0.1 + math.cos(timer * ) / 1.15, (0.1 - math.sin(timer * 2) / 4.65) * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).) * CFrame.Angles(math.rad(23 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), math.rad(-), math.rad(43 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z + 14 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), speed * 1.95)
  431. end
  432. end
  433. end
  434. else
  435. if animation == 2 then
  436. if keyframe == 0 then
  437. if timer >= 0.5 then
  438. timer = 0
  439. keyframe = 1
  440. end
  441. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(3 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).), ), speed * 1.75)
  442. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(-5 + -4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  443. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-11), math.rad(), ), speed * 1.75)
  444. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-11), math.rad(), ), speed * 1.75)
  445. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(-0.5, 0.2, ) * CFrame.Angles(math.rad(-1.5), 0, math.rad(-2), speed * 2)
  446. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-52), speed * 2)
  447. else
  448. if keyframe == 1 then
  449. if timer >= 1 then
  450. keyframe = 2
  451. end
  452. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(3 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).), ), speed * 1.75)
  453. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(12 + -4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), 0, ), speed * 1.75)
  454. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-11), math.rad(), ), speed * 1.75)
  455. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-11), math.rad(), ), speed * 1.75)
  456. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(-0.5, 0.2, ) * CFrame.Angles(math.rad(-1.5), 0, math.rad(-11), speed * 2)
  457. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-59), speed * 2)
  458. end
  459. end
  460. else
  461. if animation == 3 then
  462. if keyframe == 0 then
  463. if timer >= 0.75 then
  464. keyframe = 1
  465. timer = 0
  466. speed = 0.05 * Player:WaitForChild("Speed").Value * allmult
  467. miscevent:FireServer(2, woosh, math.random(110, 120) / 100)
  468. miscevent:FireServer(1, woosh, 0)
  469. random4 = orig4 * CFrame.new(math.random(15, 35) / 40, 0, 0) * CFrame.Angles(math.rad(math.random(-500, -100) / 100), math.rad(math.random(-1200, 2500) / 100), math.rad(math.random(8600, 940) / 100))
  470. end
  471. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  472. keepmoving = false
  473. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-80), speed * 2)
  474. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80), speed * 2)
  475. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(), ), speed * 2)
  476. Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
  477. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-8), math.rad(), math.rad(-4), speed * 2)
  478. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-3), math.rad(), math.rad(3), speed * 2)
  479. else
  480. if not keepmoving then
  481. keepmoving = true
  482. if running then
  483. movespeed = 0.04
  484. else
  485. movespeed = 0.03
  486. end
  487. if moveframe > 1 then
  488. moveframe = 0
  489. end
  490. if movetimer >= 0.8 then
  491. movetimer = 0
  492. end
  493. end
  494. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.) * CFrame.Angles(math.rad(-2), 0, math.rad(-80), speed * 2)
  495. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80), speed * 2)
  496. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(), ), speed * 2)
  497. Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
  498. end
  499. else
  500. if keyframe == 1 then
  501. if timer >= 0.75 then
  502. timer = 0
  503. keyframe = 0
  504. attacking = false
  505. animation = -1
  506. keyframe = 0
  507. speed = 0.02
  508. miscevent:FireServer(7, Humanoid, 50)
  509. local waiter = coroutine.wrap(function()
  510. wait(0.2)
  511. cooled1 = true
  512. end)
  513. waiter()
  514. end
  515. do
  516. if not hit then
  517. local region = (NewRegion(Character["Right Arm"].CFram, Character["Right Arm"].Size))
  518. local hum = nil
  519. for _,v in pairs(CastRegion(Player.Character, math.huge, region)) do
  520. if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
  521. hum = v.Parent:FindFirstChildOfClass("Humanoid")
  522. end
  523. end
  524. if hum and hum.Health > 0 then
  525. hit = true
  526. local results = hitevent:InvokeServer(0, Character["Right Arm"], Character["Right Arm"].CFrame, 2 * Player:WaitForChild("Power").Value * allmul, voiceline, hum)
  527. if results then
  528. addexp(results)
  529. else
  530. hit = false
  531. end
  532. end
  533. end
  534. do
  535. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  536. keepmoving = false
  537. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(40), speed * 4)
  538. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30), speed * 4)
  539. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(), ), speed * 2)
  540. Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
  541. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-8), math.rad(), math.rad(-4), speed * 2)
  542. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-3), math.rad(), math.rad(3), speed * 2)
  543. else
  544. if not keepmoving then
  545. keepmoving = true
  546. if running then
  547. movespeed = 0.04
  548. else
  549. movespeed = 0.03
  550. end
  551. if moveframe > 1 then
  552. moveframe = 0
  553. end
  554. if movetimer >= 0.8 then
  555. movetimer = 0
  556. end
  557. end
  558. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.) * CFrame.Angles(0, 0, math.rad(40), speed * 4)
  559. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30), speed * 4)
  560. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(), ), speed * 2)
  561. Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
  562. end
  563. if animation == 4 then
  564. if keyframe == 0 then
  565. if timer >= 0.75 then
  566. keyframe = 1
  567. timer = 0
  568. speed = 0.05 * Player:WaitForChild("Speed").Value * allmult
  569. miscevent:FireServer(2, woosh, math.random(110, 120) / 100)
  570. miscevent:FireServer(1, woosh, 0)
  571. random3 = orig3 * CFrame.new(math.random(-35, -15) / 40, 0, 0) * CFrame.Angles(math.rad(math.random(-500, -100) / 100), math.rad(math.random(-1200, 2500) / 100), math.rad(math.random(-9400, -860) / 100))
  572. end
  573. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  574. keepmoving = false
  575. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(80), speed * 2)
  576. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80), speed * 2)
  577. Joints[3].C0 = Joints[3].C0:lerp(random3, speed * 2)
  578. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-), ), speed * 2)
  579. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-8), math.rad(), math.rad(-4), speed * 2)
  580. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new(0, -0.07, ) * CFrame.Angles(math.rad(-3), math.rad(), math.rad(3), speed * 2)
  581. else
  582. if not keepmoving then
  583. keepmoving = true
  584. if running then
  585. movespeed = 0.04
  586. else
  587. movespeed = 0.03
  588. end
  589. if moveframe > 1 then
  590. moveframe = 0
  591. end
  592. if movetimer >= 0.8 then
  593. movetimer = 0
  594. end
  595. end
  596. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.) * CFrame.Angles(math.rad(-2), 0, math.rad(80), speed * 2)
  597. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80), speed * 2)
  598. Joints[3].C0 = Joints[3].C0:lerp(random3, speed * 2)
  599. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-), ), speed * 2)
  600. end
  601. else
  602. if keyframe == 1 then
  603. if timer >= 0.75 then
  604. timer = 0
  605. keyframe = 0
  606. attacking = false
  607. animation = -1
  608. keyframe = 0
  609. speed = 0.02
  610. miscevent:FireServer(7, Humanoid, 50)
  611. local waiter = coroutine.wrap(function()
  612. wait(0.2)
  613. cooled1 = true
  614. end)
  615. waiter()
  616. end
  617. do
  618. if not hit then
  619. local region = (NewRegion(Character["Left Arm"].CFram, Character["Left Arm"].Size))
  620. local hum = nil
  621. for _,v in pairs(CastRegion(Player.Character, math.huge, region)) do
  622. if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
  623. hum = v.Parent:FindFirstChildOfClass("Humanoid")
  624. end
  625. end
  626. if hum and hum.Health > 0 then
  627. hit = true
  628. local results = hitevent:InvokeServer(0, Character["Left Arm"], Character["Left Arm"].CFrame, 2 * Player:WaitForChild("Power").Value * allmul, voiceline, hum)
  629. if results then
  630. addexp(results)
  631. else
  632. hit = false
  633. end
  634. end
  635. end
  636. do
  637. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  638. keepmoving = false
  639. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(-40), speed * 4)
  640. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30), speed * 4)
  641. Joints[3].C0 = Joints[3].C0:lerp(random3, speed * 2)
  642. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-), ), speed * 2)
  643. Joints[5].C0 = Joints[5].C0:lerp(orig5 * CFrame.new(0, -0.09, ) * CFrame.Angles(math.rad(-7), math.rad(1), math.rad(-3), speed * 2)
  644. Joints[6].C0 = Joints[6].C0:lerp(orig6 * CFrame.new(0, -0.09, ) * CFrame.Angles(math.rad(-5), math.rad(), math.rad(4), speed * 2)
  645. else
  646. if not keepmoving then
  647. keepmoving = true
  648. if running then
  649. movespeed = 0.04
  650. else
  651. movespeed = 0.03
  652. end
  653. if moveframe > 1 then
  654. moveframe = 0
  655. end
  656. if movetimer >= 0.8 then
  657. movetimer = 0
  658. end
  659. end
  660. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.) * CFrame.Angles(0, 0, math.rad(-40), speed * 4)
  661. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30), speed * 4)
  662. Joints[3].C0 = Joints[3].C0:lerp(random3, speed * 2)
  663. Joints[4].C0 = Joints[4].C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-), ), speed * 2)
  664. end
  665. end
  666. end
  667. end
  668. end
  669. end
  670. end
  671. end
  672. end
  673. end
  674. end
  675. end
  676. end
  677. end
  678. end
  679. end
  680. end)
  681. InputService.TextBoxFocused:connect(function()
  682. intextbox = true
  683. end)
  684. InputService.TextBoxFocusReleased:connect(function()
  685. intextbox = false
  686. end)
  687. InputService.InputBegan:connect(function(input)
  688. do
  689. -- DECOMPILER ERROR at PC36: Unhandled construct in 'MakeBoolean' P1
  690.  
  691. if (workspace.timestopped.Value == false or workspace.timestopper.Value == Player.Name) and input.UserInputType == Enum.UserInputType.MouseButton1 and not intextbox and cooled1 and not attacking and Humanoid.Health > 0 then
  692. local either = math.random(0, 1)
  693. if either == 0 then
  694. attacking = true
  695. cooled1 = false
  696. animation = 3
  697. keyframe = 0
  698. timer = 0
  699. miscevent:FireServer(7, Humanoid, 0)
  700. effecttimer = 0
  701. movetimer = timer
  702. speed = 0.025 * Player:WaitForChild("Speed").Value * allmult
  703. hit = false
  704. random4 = orig4 * CFrame.new(math.random(15, 35) / 70, 0, 0) * CFrame.Angles(math.rad(math.random(-500, -100) / 100), math.rad(math.random(-3100, 1200) / 100), math.rad(math.random(8600, 9400) / 100))
  705. else
  706. if either == 1 then
  707. attacking = true
  708. cooled1 = false
  709. animation = 4
  710. keyframe = 0
  711. timer = 0
  712. miscevent:FireServer(7, Humanoid, 0)
  713. effecttimer = 0
  714. movetimer = timer
  715. speed = 0.025 * Player:WaitForChild("Speed").Value * allmult
  716. hit = false
  717. random3 = orig3 * CFrame.new(math.random(-35, -15) / 70, 0, 0) * CFrame.Angles(math.rad(math.random(-500, -100) / 100), math.rad(math.random(1200, 3100) / 100), math.rad(math.random(-9400, -8600) / 100))
  718. end
  719. end
  720. end
  721. if input.UserInputType == Enum.UserInputType.Keyboard and not intextbox and input.KeyCode == Enum.KeyCode.LeftControl and not attacking and Humanoid.Health > 0 then
  722. if running then
  723. running = false
  724. miscevent:FireServer(5, Humanoid, 16)
  725. if animation == 1 then
  726. speed = 0.03
  727. end
  728. else
  729. running = true
  730. miscevent:FireServer(5, Humanoid, 20)
  731. if animation == 1 then
  732. speed = 0.04
  733. end
  734. end
  735. end
  736. end
  737. end)
  738. workspace.timestopped.Changed:connect(function(value)
  739. wait()
  740. if workspace.timestopper.Value ~= Player.Name then
  741. if value == true then
  742. Character.Torso.Anchored = true
  743. if woosh.IsPlaying then
  744. miscevent:FireServer(1, woosh, 2)
  745. end
  746. if voiceline.IsPlaying then
  747. miscevent:FireServer(1, voiceline, 2)
  748. end
  749. else
  750. if value == false then
  751. Character.Torso.Anchored = false
  752. if woosh.IsPaused and woosh.TimePosition > 0 then
  753. miscevent:FireServer(1, woosh, 3)
  754. end
  755. if voiceline.IsPaused and voiceline.TimePosition > 0 then
  756. miscevent:FireServer(1, voiceline, 3)
  757. end
  758. end
  759. end
  760. end
  761. end)
  762. Player:WaitForChild("Endurance).Changed:connect(function(value)
  763. miscevent:FireServer(8, Humanoid, 50 * value * allmult)
  764. end)
  765. Character:WaitForChild("weakened).Changed:connect(function(value)
  766. if value == true then
  767. allmult = 0.5
  768. else
  769. if value == false then
  770. if Player:WaitForChild("Requiem").Value == true then
  771. allmult = 1.25
  772. else
  773. allmult = 1
  774. end
  775. end
  776. end
  777. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement