Advertisement
pakin2549

Untitled

Mar 25th, 2021
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.29 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  5.  
  6. local plr = owner
  7. local sine = 0
  8. local change = 1
  9. local bool = Instance.new("BoolValue")
  10. bool.Parent = owner.Character
  11. bool.Value = true
  12. bool.Name = "isdodge"
  13. local dodgevar = owner.Character:WaitForChild("isdodge")
  14. local val = 0
  15. local idle = 0
  16. local donum = 0
  17. local donum2 = 0
  18. local char = plr.Character
  19. local mouse = plr:GetMouse()
  20. local torso = char.Torso
  21. local rs = torso["Right Shoulder"]
  22. local ls = torso["Left Shoulder"]
  23. local rh = torso["Right Hip"]
  24. local lh = torso["Left Hip"]
  25. local rj = char.HumanoidRootPart.RootJoint
  26. local neck = torso.Neck
  27. local animpose = "Idle"
  28. local attacking = false
  29. local cananim = true
  30. local rage = false
  31. local shield = nil
  32. local deb = false
  33. local sprint = false
  34. local RAC = char.Torso:WaitForChild("Right Shoulder")
  35. local LAC = char.Torso:WaitForChild("Left Shoulder")
  36. local RA = char:FindFirstChild("Right Arm")
  37. local LA = char:FindFirstChild("Left Arm")
  38. local Torso = char.Torso
  39. local Head = char.Head
  40. local RL = char:FindFirstChild("Right Leg")
  41. local LL = char:FindFirstChild("Left Leg")
  42. local Root = char.HumanoidRootPart
  43. local Humanoid = char.Humanoid
  44. local canrage = true
  45. local legs = false
  46. local powers = false
  47. local bc = char:WaitForChild("Body Colors")
  48. local multiplier = 1
  49. local lac = char["Body Colors"].LeftArmColor
  50. local rac = char["Body Colors"].RightArmColor
  51. local rlc = char["Body Colors"].RightArmColor
  52. local llc = char["Body Colors"].LeftLegColor
  53. local hc = char["Body Colors"].HeadColor
  54. local tc = char["Body Colors"].TorsoColor
  55. local humanoid = char:FindFirstChildOfClass("Humanoid")
  56. local huge = Vector3.new(math.huge,math.huge,math.huge)
  57. local mobs = Instance.new("Sound", Torso)
  58. mobs.SoundId = "rbxassetid://1879077055"
  59. mobs.Looped = true
  60. mobs.Volume = 2
  61. mobs:Play()
  62. local naeeym2 = Instance.new("BillboardGui",char)
  63. naeeym2.AlwaysOnTop = true
  64. naeeym2.Size = UDim2.new(5,35,2,35)
  65. naeeym2.StudsOffset = Vector3.new(0,3,0)
  66. naeeym2.Adornee = char.Head
  67. naeeym2.Name = "Name"
  68. local tecks2 = Instance.new("TextLabel",naeeym2)
  69. tecks2.BackgroundTransparency = 1
  70. tecks2.TextScaled = true
  71. tecks2.BorderSizePixel = 0
  72. tecks2.Text = "HeyYa"
  73. tecks2.Font = "Code"
  74. tecks2.TextSize = 35
  75. tecks2.TextTransparency = 0
  76. tecks2.TextStrokeTransparency = 1
  77. tecks2.TextColor3 = Color3.new(22,29,50)
  78. tecks2.Size = UDim2.new(1,0,0.5,0)
  79. tecks2.Parent = naeeym2
  80. Player = owner
  81. Character = Player.Character
  82. PlayerGui = Player.PlayerGui
  83. Backpack = Player.Backpack
  84. Torso = Character.Torso
  85. Head = Character.Head
  86. Humanoid = Character.Humanoid
  87. LeftArm = Character["Left Arm"]
  88. LeftLeg = Character["Left Leg"]
  89. RightArm = Character["Right Arm"]
  90. RightLeg = Character["Right Leg"]
  91. Character = Player.Character
  92. PlayerGui = Player.PlayerGui
  93. Backpack = Player.Backpack
  94. Torso = Character.Torso
  95. Head = Character.Head
  96. Humanoid = Character.Humanoid
  97. Neck = Torso.Neck
  98. attacktype = 1
  99. RootPart = Character.HumanoidRootPart
  100. RootJoint = RootPart.RootJoint
  101. attack = false
  102. equipped = true
  103. mouse = Player:GetMouse()
  104.  
  105.  
  106. local skill = false
  107. local stand = false
  108. mouse.KeyDown:connect(function(key)
  109. if key == "q" and stand == false then
  110. stand = true
  111. local SongDriver = Instance.new("Sound")
  112. SongDriver.Parent = char.Torso
  113. SongDriver.SoundId = "rbxassetid://463010917"
  114. SongDriver.Volume = 2
  115. SongDriver:Play()
  116. local ll3part2 = Instance.new("Part")
  117. ll3part2.Parent = Torso
  118. ll3part2.Name = "Stand"
  119. ll3part2.BrickColor = BrickColor.new("Pearl")
  120. ll3part2.CanCollide = false
  121. ll3part2.Size = Vector3.new(0.05, 0.05, 0.05)
  122. ll3part2.Anchored = false
  123. ll3part2.Locked = true
  124. local mesh = Instance.new("SpecialMesh")
  125. mesh.MeshId = "rbxassetid://3675687419"
  126. mesh.Parent = ll3part2
  127. local weld = Instance.new("Weld")
  128. weld.Part0 = ll3part2
  129. weld.Part1 = Torso
  130. weld.C0 = CFrame.new(0.7,-0.9,-0.2)
  131. weld.Parent = Root
  132. end
  133. end)
  134.  
  135.  
  136. local Player = owner
  137. local Mouse = Player:GetMouse()
  138. repeat
  139. wait()
  140. until Player.Character
  141. local Character = Player.Character
  142. local Camera = workspace.CurrentCamera
  143. local PlayerGui = Player:WaitForChild("PlayerGui")
  144. local allmult = 1
  145. local Humanoid = Character:WaitForChild("Humanoid")
  146. table.foreach(Humanoid:GetPlayingAnimationTracks(), function(_, v)
  147. v:Stop()
  148. end)
  149. if Character:FindFirstChild("Animate") then
  150. Character:FindFirstChild("Animate"):Destroy()
  151. end
  152. local InputService = game:GetService("UserInputService")
  153. local intextbox = false
  154. local Joints = {
  155. Character.HumanoidRootPart.RootJoint,
  156. Character.Torso.Neck,
  157. Character.Torso["Left Shoulder"],
  158. Character.Torso["Right Shoulder"],
  159. Character.Torso["Left Hip"],
  160. Character.Torso["Right Hip"],
  161. }
  162. local specialtable = {}
  163. local specialvar, random1, random2, random3, random4, random5
  164. local ishamon = false
  165. local charginghamon = false
  166. local hamonpower = 0
  167. local glow, light
  168. local orig1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  169. local orig2 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  170. local orig3 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  171. local orig4 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  172. local orig5 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  173. local orig6 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  174. local timer = 0
  175. local speed = 0.02
  176. local effecttimer = 0
  177. local hit = false
  178. local punching = false
  179. local animation = 0
  180. local keyframe = 0
  181. local attacking = false
  182. local jointtimer = 0
  183. local accelmult = 1
  184. local summoned = false
  185. local prevhealth = Humanoid.Health
  186. local keepmoving = false
  187. local moveframe = 0
  188. local movetimer = 0
  189. local movespeed = 0
  190. local falling = false
  191. local canfall = true
  192. local running = false
  193. local cooled1 = true
  194. local cooled2 = true
  195. local cooledh = true
  196. function randomangle(restrict)
  197. local angle
  198. if not restrict then
  199. angle = math.random(math.rad(-360), math.rad(360))
  200. else
  201. angle = math.random(math.rad(-restrict), math.rad(restrict))
  202. end
  203. return angle
  204. end
  205. function GetAxis(c1, c2)
  206. local axis = {}
  207. axis[1] = c1[2] - c1[1].unit
  208. axis[2] = c1[3] - c1[1].unit
  209. axis[3] = c1[5] - c1[1].unit
  210. axis[4] = c2[2] - c2[1].unit
  211. axis[5] = c2[3] - c2[1].unit
  212. axis[6] = c2[5] - c2[1].unit
  213. axis[7] = axis[1]:Cross(axis[4]).unit
  214. axis[8] = axis[1]:Cross(axis[5]).unit
  215. axis[9] = axis[1]:Cross(axis[6]).unit
  216. axis[10] = axis[2]:Cross(axis[4]).unit
  217. axis[11] = axis[2]:Cross(axis[5]).unit
  218. axis[12] = axis[2]:Cross(axis[6]).unit
  219. axis[13] = axis[3]:Cross(axis[4]).unit
  220. axis[14] = axis[3]:Cross(axis[5]).unit
  221. axis[15] = axis[3]:Cross(axis[6]).unit
  222. return axis
  223. end
  224. function TestAxis(corners1, corners2, axis, surface)
  225. if axis.Magnitude == 0 or tostring(axis) == "NAN, NAN, NAN" then
  226. return true
  227. end
  228. local adists, bdists = {}, {}
  229. for i = 1, 8 do
  230. table.insert(adists, corners1[i]:Dot(axis))
  231. table.insert(bdists, corners2[i]:Dot(axis))
  232. end
  233. local amax, amin = math.max(unpack(adists)), math.min(unpack(adists))
  234. local bmax, bmin = math.max(unpack(bdists)), math.min(unpack(bdists))
  235. local longspan = math.max(amax, bmax) - math.min(amin, bmin)
  236. local sumspan = amax - amin + bmax - bmin
  237. local pass, mtv
  238. if surface then
  239. pass = longspan <= sumspan
  240. else
  241. pass = longspan < sumspan
  242. end
  243. if pass then
  244. local overlap = amax > bmax and -(bmax - amin) or amax - bmin
  245. mtv = axis * overlap
  246. end
  247. return pass, mtv
  248. end
  249. function GetCorners(framepos, size)
  250. local size, corners = size / 2, {}
  251. for x = -1, 1, 2 do
  252. for y = -1, 1, 2 do
  253. for z = -1, 1, 2 do
  254. table.insert(corners, framepos * CFrame.new(size * Vector3.new(x, y, z)).p)
  255. end
  256. end
  257. end
  258. return corners
  259. end
  260. function NewRegion(framepos, size)
  261. local region = setmetatable({}, {
  262. __index = {}
  263. })
  264. region.surfaceCountsAsCollision = true
  265. region.cframe = framepos
  266. region.size = size
  267. region.planes = {}
  268. region.corners = GetCorners(region.cframe, region.size)
  269. for _, enum in next, Enum.NormalId:GetEnumItems() do
  270. local lnormal = Vector3.FromNormalId(enum)
  271. local wnormal = region.cframe:vectorToWorldSpace(lnormal)
  272. local distance = (lnormal*region.size/2).magnitude
  273. local point = region.cframe.p + wnormal * distance
  274. table.insert(region.planes, {normal = wnormal, point = point})
  275. end
  276. return region
  277. end
  278. function ShallowCopy(t)
  279. local nt = {}
  280. for k, v in next, t, nil do
  281. nt[k] = v
  282. end
  283. return nt
  284. end
  285. function CastPart(part, region)
  286. local corners1 = region.corners
  287. local corners2 = GetCorners(part.CFrame, part.Size)
  288. local axis, mtvs = GetAxis(corners1, corners2), {}
  289. for i = 1, #axis do
  290. local intersect, mtv = TestAxis(corners1, corners2, axis[i], region.surfaceCountsAsCollision)
  291. if not intersect then
  292. return false, Vector3.new()
  293. end
  294. if mtv then
  295. table.insert(mtvs, mtv)
  296. end
  297. end
  298. table.sort(mtvs, function(a, b)
  299. return a.magnitude < b.magnitude
  300. end)
  301. return true, mtvs[1]
  302. end
  303. function CastRegion(ignore, maxParts, region)
  304. local ignore = type(ignore) == "table" and ignore or {ignore}
  305. local maxParts = maxParts or 20
  306. local rmin, rmax = {}, {}
  307. local copy = ShallowCopy(region.corners)
  308. for _, enum in next, {
  309. Enum.NormalId.Right,
  310. Enum.NormalId.Top,
  311. Enum.NormalId.Back
  312. }, nil do
  313. do
  314. local lnormal = Vector3.FromNormalId(enum)
  315. table.sort(copy, function(a, b)
  316. return a:Dot(lnormal) > b:Dot(lnormal)
  317. end)
  318. table.insert(rmin, copy[#copy])
  319. table.insert(rmax, copy[1])
  320. end
  321. end
  322. rmin, rmax = Vector3.new(rmin[1].x, rmin[2].y, rmin[3].z), Vector3.new(rmax[1].x, rmax[2].y, rmax[3].z)
  323. local realRegion3 = Region3.new(rmin, rmax)
  324. local parts = game.Workspace:FindPartsInRegion3WithIgnoreList(realRegion3, ignore, maxParts)
  325. local inRegion = {}
  326. for _, part in next, parts, nil do
  327. if CastPart(part, region) then
  328. table.insert(inRegion, part)
  329. end
  330. end
  331. return inRegion
  332. end
  333. local replicationtimer = 0
  334. game:GetService("RunService").RenderStepped:connect(function()
  335.  
  336. local Joints1 = Character.HumanoidRootPart.RootJoint
  337. local Joints2 = Character.Torso.Neck
  338. local Joints3 = Character.Torso["Left Shoulder"]
  339. local Joints4 = Character.Torso["Right Shoulder"]
  340. local Joints5 = Character.Torso["Left Hip"]
  341. local Joints6 = Character.Torso["Right Hip"]
  342. if keepmoving then
  343. movetimer = movetimer + movespeed * accelmult
  344. if moveframe == 0 then
  345. if movetimer >= 0.8 then
  346. movetimer = 0
  347. moveframe = 1
  348. end
  349. if not running then
  350. Joints5.C0 = Joints5.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)
  351. Joints6.C0 = Joints6.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)
  352. else
  353. Joints5.C0 = Joints5.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)
  354. Joints6.C0 = Joints6.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)
  355. end
  356. elseif moveframe == 1 then
  357. if movetimer >= 0.8 then
  358. movetimer = 0
  359. moveframe = 0
  360. end
  361. if not running then
  362. Joints5.C0 = Joints5.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)
  363. Joints6.C0 = Joints6.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)
  364. else
  365. Joints5.C0 = Joints5.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)
  366. Joints6.C0 = Joints6.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)
  367. end
  368. end
  369. end
  370. timer = timer + speed * accelmult
  371. if 5 < Character.HumanoidRootPart.Velocity.Y and not attacking and not falling and canfall then
  372. falling = true
  373. keepmoving = false
  374. speed = 0.02
  375. canfall = false
  376. animation = 2
  377. keyframe = 0
  378. if timer >= 0.5 then
  379. timer = 0
  380. end
  381. end
  382. if Character.HumanoidRootPart.Velocity.Y < -5 and not attacking and not falling and canfall then
  383. falling = true
  384. keepmoving = false
  385. speed = 0.02
  386. canfall = false
  387. animation = 2
  388. keyframe = 1
  389. if timer >= 1 then
  390. timer = 0
  391. end
  392. end
  393. if not falling then
  394. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) and not attacking and animation ~= 0 then
  395. animation = 0
  396. speed = 0.02
  397. keepmoving = false
  398. if keyframe > 1 then
  399. keyframe = 0
  400. end
  401. if timer >= 1.5 then
  402. timer = 0
  403. end
  404. end
  405. if Humanoid.MoveDirection ~= Vector3.new(0, 0, 0) and not attacking and animation ~= 1 then
  406. animation = 1
  407. keepmoving = false
  408. timer = movetimer
  409. if running then
  410. speed = 0.04
  411. else
  412. speed = 0.03
  413. end
  414. if keyframe > 1 then
  415. keyframe = 0
  416. end
  417. if timer >= 0.8 then
  418. timer = 0
  419. end
  420. end
  421. elseif falling then
  422. local region = NewRegion(Character.HumanoidRootPart.CFrame * CFrame.new(0, -4.1, 0), Vector3.new(2, 1, 1))
  423. for _, part in pairs(CastRegion(Character, math.huge, region)) do
  424. if part and part.CanCollide then
  425. local waiter = coroutine.wrap(function()
  426. falling = false
  427. wait(0.15)
  428. canfall = true
  429. end)
  430. waiter()
  431. break
  432. end
  433. end
  434. end
  435. if animation == 0 then
  436. if keyframe == 0 then
  437. if timer >= 1.5 then
  438. timer = 0
  439. keyframe = 1
  440. end
  441. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.1) * CFrame.Angles(0, 0, math.rad(2)), speed * 1.2)
  442. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  443. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  444. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  445. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.09, 0) * CFrame.Angles(math.rad(-7), math.rad(12), math.rad(-3)), speed * 1.2)
  446. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.09, 0) * CFrame.Angles(math.rad(-5), math.rad(8), math.rad(4)), speed * 1.2)
  447. elseif keyframe == 1 then
  448. if timer >= 1.5 then
  449. timer = 0
  450. keyframe = 0
  451. end
  452. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4), 0, math.rad(2)), speed * 1.2)
  453. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  454. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  455. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  456. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-8), math.rad(13), math.rad(-8)), speed * 1.2)
  457. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(7), math.rad(6)), speed * 1.2)
  458. end
  459. elseif animation == 1 then
  460. if keyframe == 0 then
  461. if timer >= 0.8 then
  462. timer = 0
  463. keyframe = 1
  464. end
  465. if not running then
  466. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.5) * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * 3), 0), speed * 1.75)
  467. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  468. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  469. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  470. Joints5.C0 = Joints5.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 * 2) / 1.5, (0.1 + math.sin(timer * 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)), speed * 1.95)
  471. Joints6.C0 = Joints6.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 * 2) / 1.5, (0.1 + math.sin(timer * 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)), speed * 1.95)
  472. else
  473. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.15) * CFrame.Angles(math.rad(12 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * 7), 0), speed * 1.75)
  474. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  475. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  476. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  477. Joints5.C0 = Joints5.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 * 2) / 1.15, (0.1 + math.sin(timer * 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)), speed * 1.95)
  478. Joints6.C0 = Joints6.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 * 2) / 1.15, (0.1 + math.sin(timer * 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)), speed * 1.95)
  479. end
  480. elseif keyframe == 1 then
  481. if timer >= 0.8 then
  482. timer = 0
  483. keyframe = 0
  484. end
  485. if not running then
  486. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.5) * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * 3), 0), speed * 1.75)
  487. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  488. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  489. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  490. Joints5.C0 = Joints5.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 * 2) / 1.5, (0.1 - math.sin(timer * 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)), speed * 1.95)
  491. Joints6.C0 = Joints6.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 * 2) / 1.5, (0.1 - math.sin(timer * 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)), speed * 1.95)
  492. else
  493. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-timer * 1.5) / 1.15) * CFrame.Angles(math.rad(12 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(-Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X * 7), 0), speed * 1.75)
  494. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  495. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  496. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  497. Joints5.C0 = Joints5.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 * 2) / 1.15, (0.1 - math.sin(timer * 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)), speed * 1.95)
  498. Joints6.C0 = Joints6.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 * 2) / 1.15, (0.1 - math.sin(timer * 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)), speed * 1.95)
  499. end
  500. end
  501. elseif animation == 2 then
  502. if keyframe == 0 then
  503. if timer >= 0.5 then
  504. timer = 0
  505. keyframe = 1
  506. end
  507. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(3 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), 0), speed * 1.75)
  508. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  509. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  510. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  511. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(-0.5, 0.2, 0) * CFrame.Angles(math.rad(-1.5), 0, math.rad(-2)), speed * 2)
  512. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-52)), speed * 2)
  513. elseif keyframe == 1 then
  514. if timer >= 1 then
  515. keyframe = 2
  516. end
  517. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).Z), math.rad(3 * -Character.HumanoidRootPart.CFrame:vectorToObjectSpace(Humanoid.MoveDirection).X), 0), speed * 1.75)
  518. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
  519. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
  520. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
  521. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(-0.5, 0.2, 0) * CFrame.Angles(math.rad(-1.5), 0, math.rad(-11)), speed * 2)
  522. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-59)), speed * 2)
  523. end
  524. elseif animation == 3 then
  525. if keyframe == 0 then
  526. if timer >= 0.75 then
  527. keyframe = 1
  528. timer = 0
  529. speed = 0.05
  530. 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, 9400) / 100))
  531. end
  532. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  533. keepmoving = false
  534. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-80)), speed * 2)
  535. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80)), speed * 2)
  536. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
  537. Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
  538. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-8), math.rad(7), math.rad(-4)), speed * 2)
  539. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-3), math.rad(3), math.rad(3)), speed * 2)
  540. else
  541. if not keepmoving then
  542. keepmoving = true
  543. if running then
  544. movespeed = 0.04
  545. else
  546. movespeed = 0.03
  547. end
  548. if moveframe > 1 then
  549. moveframe = 0
  550. end
  551. if movetimer >= 0.8 then
  552. movetimer = 0
  553. end
  554. end
  555. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.5) * CFrame.Angles(math.rad(-2), 0, math.rad(-80)), speed * 2)
  556. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80)), speed * 2)
  557. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
  558. Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
  559. end
  560. elseif keyframe == 1 then
  561. if timer >= 0.75 then
  562. timer = 0
  563. keyframe = 0
  564. attacking = false
  565. animation = -1
  566. keyframe = 0
  567. speed = 0.02
  568. local waiter = coroutine.wrap(function()
  569. wait(0.2)
  570. cooled1 = true
  571. end)
  572. waiter()
  573. end
  574. if not hit then
  575. local region = NewRegion(Character["Right Arm"].CFrame, Character["Right Arm"].Size)
  576. local hum
  577. for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
  578. if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
  579. hum = v.Parent:FindFirstChildOfClass("Humanoid")
  580. end
  581. end
  582. if hum and hum.Health > 0 then
  583. hit = true
  584. end
  585. end
  586. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  587. keepmoving = false
  588. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(40)), speed * 4)
  589. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30)), speed * 4)
  590. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
  591. Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
  592. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-8), math.rad(7), math.rad(-4)), speed * 2)
  593. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-3), math.rad(3), math.rad(3)), speed * 2)
  594. else
  595. if not keepmoving then
  596. keepmoving = true
  597. if running then
  598. movespeed = 0.04
  599. else
  600. movespeed = 0.03
  601. end
  602. if moveframe > 1 then
  603. moveframe = 0
  604. end
  605. if movetimer >= 0.8 then
  606. movetimer = 0
  607. end
  608. end
  609. Joints[1].C0 = Joints[1].C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.5) * CFrame.Angles(0, 0, math.rad(40)), speed * 4)
  610. Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30)), speed * 4)
  611. Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
  612. Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
  613. end
  614. end
  615. elseif animation == 4 then
  616. if keyframe == 0 then
  617. if timer >= 0.75 then
  618. keyframe = 1
  619. timer = 0
  620. speed = 0.05
  621. 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, -8600) / 100))
  622. end
  623. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  624. keepmoving = false
  625. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(80)), speed * 2)
  626. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80)), speed * 2)
  627. Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
  628. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-7), 0), speed * 2)
  629. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-8), math.rad(7), math.rad(-4)), speed * 2)
  630. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-3), math.rad(3), math.rad(3)), speed * 2)
  631. else
  632. if not keepmoving then
  633. keepmoving = true
  634. if running then
  635. movespeed = 0.04
  636. else
  637. movespeed = 0.03
  638. end
  639. if moveframe > 1 then
  640. moveframe = 0
  641. end
  642. if movetimer >= 0.8 then
  643. movetimer = 0
  644. end
  645. end
  646. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.5) * CFrame.Angles(math.rad(-2), 0, math.rad(80)), speed * 2)
  647. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80)), speed * 2)
  648. Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
  649. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-7), 0), speed * 2)
  650. end
  651. elseif keyframe == 1 then
  652. if timer >= 0.75 then
  653. timer = 0
  654. keyframe = 0
  655. attacking = false
  656. animation = -1
  657. keyframe = 0
  658. speed = 0.02
  659. local waiter = coroutine.wrap(function()
  660. wait(0.2)
  661. cooled1 = true
  662. end)
  663. waiter()
  664. end
  665. if not hit then
  666. local region = NewRegion(Character["Left Arm"].CFrame, Character["Left Arm"].Size)
  667. local hum
  668. for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
  669. if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
  670. hum = v.Parent:FindFirstChildOfClass("Humanoid")
  671. end
  672. end
  673. if hum and hum.Health > 0 then
  674. hit = true
  675. end
  676. end
  677. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  678. keepmoving = false
  679. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(-40)), speed * 4)
  680. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30)), speed * 4)
  681. Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
  682. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-5), 0), speed * 2)
  683. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.09, 0) * CFrame.Angles(math.rad(-7), math.rad(12), math.rad(-3)), speed * 2)
  684. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.09, 0) * CFrame.Angles(math.rad(-5), math.rad(8), math.rad(4)), speed * 2)
  685. else
  686. if not keepmoving then
  687. keepmoving = true
  688. if running then
  689. movespeed = 0.04
  690. else
  691. movespeed = 0.03
  692. end
  693. if moveframe > 1 then
  694. moveframe = 0
  695. end
  696. if movetimer >= 0.8 then
  697. movetimer = 0
  698. end
  699. end
  700. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.4 - math.cos(-movetimer * 1.5) / 1.5) * CFrame.Angles(0, 0, math.rad(-40)), speed * 4)
  701. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30)), speed * 4)
  702. Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
  703. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-5), 0), speed * 2)
  704. end
  705. end
  706. elseif animation == 5 then
  707. if keyframe == 0 then
  708. if timer >= 0.75 then
  709. timer = 0
  710. attacking = false
  711. animation = -1
  712. keyframe = 0
  713. speed = 0.02
  714. end
  715. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  716. keepmoving = false
  717. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(-44)), speed * 3)
  718. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
  719. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(-99)), speed * 3)
  720. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(89)), speed * 3)
  721. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(22), math.rad(-2)), speed * 3)
  722. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(-22), math.rad(2)), speed * 3)
  723. else
  724. if not keepmoving then
  725. keepmoving = true
  726. if running then
  727. movespeed = 0.04
  728. else
  729. movespeed = 0.03
  730. end
  731. if moveframe > 1 then
  732. moveframe = 0
  733. end
  734. if movetimer >= 0.8 then
  735. movetimer = 0
  736. end
  737. end
  738. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(-44)), speed * 3)
  739. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
  740. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(-99)), speed * 3)
  741. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(89)), speed * 3)
  742. end
  743. elseif keyframe == 1 then
  744. if timer >= 0.75 then
  745. timer = 0
  746. attacking = false
  747. animation = -1
  748. keyframe = 0
  749. speed = 0.02
  750. end
  751. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  752. keepmoving = false
  753. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(-2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(44)), speed * 3)
  754. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
  755. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 3)
  756. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 3)
  757. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(22), math.rad(-2)), speed * 3)
  758. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(-22), math.rad(2)), speed * 3)
  759. else
  760. if not keepmoving then
  761. keepmoving = true
  762. if running then
  763. movespeed = 0.04
  764. else
  765. movespeed = 0.03
  766. end
  767. if moveframe > 1 then
  768. moveframe = 0
  769. end
  770. if movetimer >= 0.8 then
  771. movetimer = 0
  772. end
  773. end
  774. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(-2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(44)), speed * 3)
  775. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
  776. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 3)
  777. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 3)
  778. end
  779. end
  780. elseif animation == 6 then
  781. if keyframe == 0 then
  782. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4), 0, math.rad(-2)), speed * 3)
  783. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(42), 0, 0), speed * 3)
  784. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.new(-0.1, 0.1, 0) * CFrame.Angles(math.rad(-2), math.rad(-72), math.rad(-99)), speed * 3)
  785. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.new(0.1, 0.1, 0) * CFrame.Angles(math.rad(2), math.rad(72), math.rad(99)), speed * 3)
  786. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(7), math.rad(-6)), speed * 3)
  787. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-8), math.rad(13), math.rad(8)), speed * 3)
  788. end
  789. elseif animation == 7 then
  790. if keyframe == 0 then
  791. if timer >= 0.75 then
  792. keyframe = 1
  793. timer = 0
  794. speed = 0.085
  795. end
  796. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  797. keepmoving = false
  798. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-99)), speed * 2)
  799. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(99)), speed * 2)
  800. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
  801. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.new(0, 0, -0.2) * CFrame.Angles(math.rad(3), math.rad(-88), math.rad(-22)), speed * 2)
  802. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-8), math.rad(7), math.rad(-4)), speed * 2)
  803. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-3), math.rad(3), math.rad(3)), speed * 2)
  804. else
  805. if not keepmoving then
  806. keepmoving = true
  807. if running then
  808. movespeed = 0.04
  809. else
  810. movespeed = 0.03
  811. end
  812. if moveframe > 1 then
  813. moveframe = 0
  814. end
  815. if movetimer >= 0.8 then
  816. movetimer = 0
  817. end
  818. end
  819. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-99)), speed * 2)
  820. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(99)), speed * 2)
  821. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
  822. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.new(0, 0, -0.2) * CFrame.Angles(math.rad(3), math.rad(-88), math.rad(-22)), speed * 2)
  823. end
  824. elseif keyframe == 1 then
  825. if timer >= 1.5 then
  826. timer = 0
  827. keyframe = 0
  828. attacking = false
  829. animation = -1
  830. keyframe = 0
  831. speed = 0.02
  832. local waiter = coroutine.wrap(function()
  833. wait(3)
  834. cooled2 = true
  835. end)
  836. waiter()
  837. end
  838. if not hit then
  839. local region = NewRegion(Character["Right Arm"].CFrame, Character["Right Arm"].Size)
  840. local hum
  841. for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
  842. if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
  843. hum = v.Parent:FindFirstChildOfClass("Humanoid")
  844. end
  845. end
  846. if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  847. keepmoving = false
  848. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(20)), speed * 4)
  849. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-20)), speed * 4)
  850. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
  851. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.new(0, 0, 0.5) * CFrame.Angles(math.rad(7), math.rad(32), math.rad(129)), speed * 2)
  852. Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-8), math.rad(7), math.rad(-4)), speed * 2)
  853. Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.new(0, -0.07, 0) * CFrame.Angles(math.rad(-3), math.rad(3), math.rad(3)), speed * 2)
  854. else
  855. if not keepmoving then
  856. keepmoving = true
  857. if running then
  858. movespeed = 0.04
  859. else
  860. movespeed = 0.03
  861. end
  862. if moveframe > 1 then
  863. moveframe = 0
  864. end
  865. if movetimer >= 0.8 then
  866. movetimer = 0
  867. end
  868. end
  869. Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(20)), speed * 4)
  870. Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-20)), speed * 4)
  871. Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
  872. Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.new(0, 0, 0.2) * CFrame.Angles(math.rad(7), math.rad(32), math.rad(179)), speed * 2)
  873. end
  874. end
  875. end
  876. end
  877. end)
  878. mouse.KeyDown:connect(function(key)
  879. if key == "z" then
  880. attacking = true
  881. cooled2 = false
  882. animation = 7
  883. keyframe = 0
  884. timer = 0
  885. effecttimer = 0
  886. movetimer = timer
  887. speed = 0.01
  888. hit = false
  889. local Clom = RightArm:Clone()
  890. Clom.Parent = RightArm
  891. Clom.Transparency = 1
  892. Clom.CanCollide = false
  893. Clom.Name = "Damage"
  894. local weld2 = Instance.new("Weld")
  895. weld2.Part0 = Clom
  896. weld2.Part1 = RightArm
  897. weld2.Parent = Clom
  898. local canattack = true
  899. Clom.Touched:Connect(function(user) --event
  900. local humanoid2 = user.Parent:FindFirstChild("Humanoid")--checks if there is a humanoid in p
  901. if canattack == true and humanoid2 then --if canattack is false and there is a humanoid
  902.  
  903. canattack = false--sets canattack to false
  904.  
  905. humanoid2:TakeDamage(42)
  906. canattack = true
  907.  
  908. end
  909.  
  910. end)
  911. wait(1)
  912. skill = false
  913. Clom:Destroy()
  914. end
  915. end)
  916. InputService.TextBoxFocused:connect(function()
  917. intextbox = true
  918. end)
  919. InputService.TextBoxFocusReleased:connect(function()
  920. intextbox = false
  921. end)
  922.  
  923. local cooleddodge = true
  924. Humanoid.HealthChanged:connect(function(value)
  925. if dodgevar.Value == true then
  926. if dodgevar.Value == true then
  927. prevhealth = Humanoid.Health
  928. end
  929. Humanoid.Health = 100
  930. attacking = true
  931. cooleddodge = false
  932. local waiter = coroutine.wrap(function()
  933. wait(0.2)
  934. cooleddodge = true
  935.  
  936.  
  937. end)
  938. waiter()
  939. animation = 5
  940. Humanoid.Health = 100
  941. keyframe = math.random(0, 1)
  942. timer = 0
  943. movetimer = timer
  944. end
  945. end)
  946.  
  947.  
  948. mouse.KeyDown:connect(function(key)
  949. if key == "x" and stand == true then
  950. PointLight0 = Instance.new("PointLight")
  951. Sparkles1 = Instance.new("Sparkles")
  952. PointLight0.Parent = Torso
  953. PointLight0.Color = Color3.new(0.541176, 1, 0.458824)
  954. PointLight0.Range = 20
  955. Sparkles1.Parent = Torso
  956. Sparkles1.Color = Color3.new(1.77083, 10.2, 1)
  957. Sparkles1.SparkleColor = Color3.new(1, 1, 1)
  958. Humanoid.WalkSpeed = 25
  959. end
  960.  
  961.  
  962. end)
  963. mouse.KeyUp:connect(function(key)
  964. if key == "x" and stand == true then
  965. Torso.PointLight:Destroy()
  966. Torso.Sparkles:Destroy()
  967. PointLight0.Parent = Torso
  968. Humanoid.WalkSpeed = 16
  969. end
  970. end)
  971.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement