Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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
- local plr = owner
- local sine = 0
- local change = 1
- local bool = Instance.new("BoolValue")
- bool.Parent = owner.Character
- bool.Value = true
- bool.Name = "isdodge"
- local dodgevar = owner.Character:WaitForChild("isdodge")
- local val = 0
- local idle = 0
- local donum = 0
- local donum2 = 0
- local char = plr.Character
- local mouse = plr:GetMouse()
- local torso = char.Torso
- local rs = torso["Right Shoulder"]
- local ls = torso["Left Shoulder"]
- local rh = torso["Right Hip"]
- local lh = torso["Left Hip"]
- local rj = char.HumanoidRootPart.RootJoint
- local neck = torso.Neck
- local animpose = "Idle"
- local attacking = false
- local cananim = true
- local rage = false
- local shield = nil
- local deb = false
- local sprint = false
- local RAC = char.Torso:WaitForChild("Right Shoulder")
- local LAC = char.Torso:WaitForChild("Left Shoulder")
- local RA = char:FindFirstChild("Right Arm")
- local LA = char:FindFirstChild("Left Arm")
- local Torso = char.Torso
- local Head = char.Head
- local RL = char:FindFirstChild("Right Leg")
- local LL = char:FindFirstChild("Left Leg")
- local Root = char.HumanoidRootPart
- local Humanoid = char.Humanoid
- local canrage = true
- local legs = false
- local powers = false
- local bc = char:WaitForChild("Body Colors")
- local multiplier = 1
- local lac = char["Body Colors"].LeftArmColor
- local rac = char["Body Colors"].RightArmColor
- local rlc = char["Body Colors"].RightArmColor
- local llc = char["Body Colors"].LeftLegColor
- local hc = char["Body Colors"].HeadColor
- local tc = char["Body Colors"].TorsoColor
- local humanoid = char:FindFirstChildOfClass("Humanoid")
- local huge = Vector3.new(math.huge,math.huge,math.huge)
- local mobs = Instance.new("Sound", Torso)
- mobs.SoundId = "rbxassetid://1879077055"
- mobs.Looped = true
- mobs.Volume = 2
- mobs:Play()
- local naeeym2 = Instance.new("BillboardGui",char)
- naeeym2.AlwaysOnTop = true
- naeeym2.Size = UDim2.new(5,35,2,35)
- naeeym2.StudsOffset = Vector3.new(0,3,0)
- naeeym2.Adornee = char.Head
- naeeym2.Name = "Name"
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.TextScaled = true
- tecks2.BorderSizePixel = 0
- tecks2.Text = "HeyYa"
- tecks2.Font = "Code"
- tecks2.TextSize = 35
- tecks2.TextTransparency = 0
- tecks2.TextStrokeTransparency = 1
- tecks2.TextColor3 = Color3.new(22,29,50)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- tecks2.Parent = naeeym2
- Player = owner
- Character = Player.Character
- PlayerGui = Player.PlayerGui
- Backpack = Player.Backpack
- Torso = Character.Torso
- Head = Character.Head
- Humanoid = Character.Humanoid
- LeftArm = Character["Left Arm"]
- LeftLeg = Character["Left Leg"]
- RightArm = Character["Right Arm"]
- RightLeg = Character["Right Leg"]
- Character = Player.Character
- PlayerGui = Player.PlayerGui
- Backpack = Player.Backpack
- Torso = Character.Torso
- Head = Character.Head
- Humanoid = Character.Humanoid
- Neck = Torso.Neck
- attacktype = 1
- RootPart = Character.HumanoidRootPart
- RootJoint = RootPart.RootJoint
- attack = false
- equipped = true
- mouse = Player:GetMouse()
- local skill = false
- local stand = false
- mouse.KeyDown:connect(function(key)
- if key == "q" and stand == false then
- stand = true
- local SongDriver = Instance.new("Sound")
- SongDriver.Parent = char.Torso
- SongDriver.SoundId = "rbxassetid://463010917"
- SongDriver.Volume = 2
- SongDriver:Play()
- local ll3part2 = Instance.new("Part")
- ll3part2.Parent = Torso
- ll3part2.Name = "Stand"
- ll3part2.BrickColor = BrickColor.new("Pearl")
- ll3part2.CanCollide = false
- ll3part2.Size = Vector3.new(0.05, 0.05, 0.05)
- ll3part2.Anchored = false
- ll3part2.Locked = true
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = "rbxassetid://3675687419"
- mesh.Parent = ll3part2
- local weld = Instance.new("Weld")
- weld.Part0 = ll3part2
- weld.Part1 = Torso
- weld.C0 = CFrame.new(0.7,-0.9,-0.2)
- weld.Parent = Root
- end
- end)
- local Player = owner
- local Mouse = Player:GetMouse()
- repeat
- wait()
- until Player.Character
- local Character = Player.Character
- local Camera = workspace.CurrentCamera
- local PlayerGui = Player:WaitForChild("PlayerGui")
- local allmult = 1
- local Humanoid = Character:WaitForChild("Humanoid")
- table.foreach(Humanoid:GetPlayingAnimationTracks(), function(_, v)
- v:Stop()
- end)
- if Character:FindFirstChild("Animate") then
- Character:FindFirstChild("Animate"):Destroy()
- end
- local InputService = game:GetService("UserInputService")
- local intextbox = false
- local Joints = {
- Character.HumanoidRootPart.RootJoint,
- Character.Torso.Neck,
- Character.Torso["Left Shoulder"],
- Character.Torso["Right Shoulder"],
- Character.Torso["Left Hip"],
- Character.Torso["Right Hip"],
- }
- local specialtable = {}
- local specialvar, random1, random2, random3, random4, random5
- local ishamon = false
- local charginghamon = false
- local hamonpower = 0
- local glow, light
- local orig1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- local orig2 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- local orig3 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local orig4 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local orig5 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local orig6 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local timer = 0
- local speed = 0.02
- local effecttimer = 0
- local hit = false
- local punching = false
- local animation = 0
- local keyframe = 0
- local attacking = false
- local jointtimer = 0
- local accelmult = 1
- local summoned = false
- local prevhealth = Humanoid.Health
- local keepmoving = false
- local moveframe = 0
- local movetimer = 0
- local movespeed = 0
- local falling = false
- local canfall = true
- local running = false
- local cooled1 = true
- local cooled2 = true
- local cooledh = true
- function randomangle(restrict)
- local angle
- if not restrict then
- angle = math.random(math.rad(-360), math.rad(360))
- else
- angle = math.random(math.rad(-restrict), math.rad(restrict))
- end
- return angle
- end
- function GetAxis(c1, c2)
- local axis = {}
- axis[1] = c1[2] - c1[1].unit
- axis[2] = c1[3] - c1[1].unit
- axis[3] = c1[5] - c1[1].unit
- axis[4] = c2[2] - c2[1].unit
- axis[5] = c2[3] - c2[1].unit
- axis[6] = c2[5] - c2[1].unit
- axis[7] = axis[1]:Cross(axis[4]).unit
- axis[8] = axis[1]:Cross(axis[5]).unit
- axis[9] = axis[1]:Cross(axis[6]).unit
- axis[10] = axis[2]:Cross(axis[4]).unit
- axis[11] = axis[2]:Cross(axis[5]).unit
- axis[12] = axis[2]:Cross(axis[6]).unit
- axis[13] = axis[3]:Cross(axis[4]).unit
- axis[14] = axis[3]:Cross(axis[5]).unit
- axis[15] = axis[3]:Cross(axis[6]).unit
- return axis
- end
- function TestAxis(corners1, corners2, axis, surface)
- if axis.Magnitude == 0 or tostring(axis) == "NAN, NAN, NAN" then
- return true
- end
- local adists, bdists = {}, {}
- for i = 1, 8 do
- table.insert(adists, corners1[i]:Dot(axis))
- table.insert(bdists, corners2[i]:Dot(axis))
- end
- local amax, amin = math.max(unpack(adists)), math.min(unpack(adists))
- local bmax, bmin = math.max(unpack(bdists)), math.min(unpack(bdists))
- local longspan = math.max(amax, bmax) - math.min(amin, bmin)
- local sumspan = amax - amin + bmax - bmin
- local pass, mtv
- if surface then
- pass = longspan <= sumspan
- else
- pass = longspan < sumspan
- end
- if pass then
- local overlap = amax > bmax and -(bmax - amin) or amax - bmin
- mtv = axis * overlap
- end
- return pass, mtv
- end
- function GetCorners(framepos, size)
- local size, corners = size / 2, {}
- for x = -1, 1, 2 do
- for y = -1, 1, 2 do
- for z = -1, 1, 2 do
- table.insert(corners, framepos * CFrame.new(size * Vector3.new(x, y, z)).p)
- end
- end
- end
- return corners
- end
- function NewRegion(framepos, size)
- local region = setmetatable({}, {
- __index = {}
- })
- region.surfaceCountsAsCollision = true
- region.cframe = framepos
- region.size = size
- region.planes = {}
- region.corners = GetCorners(region.cframe, region.size)
- for _, enum in next, Enum.NormalId:GetEnumItems() do
- local lnormal = Vector3.FromNormalId(enum)
- local wnormal = region.cframe:vectorToWorldSpace(lnormal)
- local distance = (lnormal*region.size/2).magnitude
- local point = region.cframe.p + wnormal * distance
- table.insert(region.planes, {normal = wnormal, point = point})
- end
- return region
- end
- function ShallowCopy(t)
- local nt = {}
- for k, v in next, t, nil do
- nt[k] = v
- end
- return nt
- end
- function CastPart(part, region)
- local corners1 = region.corners
- local corners2 = GetCorners(part.CFrame, part.Size)
- local axis, mtvs = GetAxis(corners1, corners2), {}
- for i = 1, #axis do
- local intersect, mtv = TestAxis(corners1, corners2, axis[i], region.surfaceCountsAsCollision)
- if not intersect then
- return false, Vector3.new()
- end
- if mtv then
- table.insert(mtvs, mtv)
- end
- end
- table.sort(mtvs, function(a, b)
- return a.magnitude < b.magnitude
- end)
- return true, mtvs[1]
- end
- function CastRegion(ignore, maxParts, region)
- local ignore = type(ignore) == "table" and ignore or {ignore}
- local maxParts = maxParts or 20
- local rmin, rmax = {}, {}
- local copy = ShallowCopy(region.corners)
- for _, enum in next, {
- Enum.NormalId.Right,
- Enum.NormalId.Top,
- Enum.NormalId.Back
- }, nil do
- do
- local lnormal = Vector3.FromNormalId(enum)
- table.sort(copy, function(a, b)
- return a:Dot(lnormal) > b:Dot(lnormal)
- end)
- table.insert(rmin, copy[#copy])
- table.insert(rmax, copy[1])
- end
- end
- rmin, rmax = Vector3.new(rmin[1].x, rmin[2].y, rmin[3].z), Vector3.new(rmax[1].x, rmax[2].y, rmax[3].z)
- local realRegion3 = Region3.new(rmin, rmax)
- local parts = game.Workspace:FindPartsInRegion3WithIgnoreList(realRegion3, ignore, maxParts)
- local inRegion = {}
- for _, part in next, parts, nil do
- if CastPart(part, region) then
- table.insert(inRegion, part)
- end
- end
- return inRegion
- end
- local replicationtimer = 0
- game:GetService("RunService").RenderStepped:connect(function()
- local Joints1 = Character.HumanoidRootPart.RootJoint
- local Joints2 = Character.Torso.Neck
- local Joints3 = Character.Torso["Left Shoulder"]
- local Joints4 = Character.Torso["Right Shoulder"]
- local Joints5 = Character.Torso["Left Hip"]
- local Joints6 = Character.Torso["Right Hip"]
- if keepmoving then
- movetimer = movetimer + movespeed * accelmult
- if moveframe == 0 then
- if movetimer >= 0.8 then
- movetimer = 0
- moveframe = 1
- end
- if not running then
- 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)
- 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)
- else
- 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)
- 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)
- end
- elseif moveframe == 1 then
- if movetimer >= 0.8 then
- movetimer = 0
- moveframe = 0
- end
- if not running then
- 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)
- 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)
- else
- 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)
- 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)
- end
- end
- end
- timer = timer + speed * accelmult
- if 5 < Character.HumanoidRootPart.Velocity.Y and not attacking and not falling and canfall then
- falling = true
- keepmoving = false
- speed = 0.02
- canfall = false
- animation = 2
- keyframe = 0
- if timer >= 0.5 then
- timer = 0
- end
- end
- if Character.HumanoidRootPart.Velocity.Y < -5 and not attacking and not falling and canfall then
- falling = true
- keepmoving = false
- speed = 0.02
- canfall = false
- animation = 2
- keyframe = 1
- if timer >= 1 then
- timer = 0
- end
- end
- if not falling then
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) and not attacking and animation ~= 0 then
- animation = 0
- speed = 0.02
- keepmoving = false
- if keyframe > 1 then
- keyframe = 0
- end
- if timer >= 1.5 then
- timer = 0
- end
- end
- if Humanoid.MoveDirection ~= Vector3.new(0, 0, 0) and not attacking and animation ~= 1 then
- animation = 1
- keepmoving = false
- timer = movetimer
- if running then
- speed = 0.04
- else
- speed = 0.03
- end
- if keyframe > 1 then
- keyframe = 0
- end
- if timer >= 0.8 then
- timer = 0
- end
- end
- elseif falling then
- local region = NewRegion(Character.HumanoidRootPart.CFrame * CFrame.new(0, -4.1, 0), Vector3.new(2, 1, 1))
- for _, part in pairs(CastRegion(Character, math.huge, region)) do
- if part and part.CanCollide then
- local waiter = coroutine.wrap(function()
- falling = false
- wait(0.15)
- canfall = true
- end)
- waiter()
- break
- end
- end
- end
- if animation == 0 then
- if keyframe == 0 then
- if timer >= 1.5 then
- timer = 0
- keyframe = 1
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(0, 0, 0.1) * CFrame.Angles(0, 0, math.rad(2)), speed * 1.2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- 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)
- elseif keyframe == 1 then
- if timer >= 1.5 then
- timer = 0
- keyframe = 0
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4), 0, math.rad(2)), speed * 1.2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-8), math.rad(13), math.rad(-8)), speed * 1.2)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(7), math.rad(6)), speed * 1.2)
- end
- elseif animation == 1 then
- if keyframe == 0 then
- if timer >= 0.8 then
- timer = 0
- keyframe = 1
- end
- if not running then
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- 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)
- else
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- 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)
- end
- elseif keyframe == 1 then
- if timer >= 0.8 then
- timer = 0
- keyframe = 0
- end
- if not running then
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- 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)
- else
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- 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)
- end
- end
- elseif animation == 2 then
- if keyframe == 0 then
- if timer >= 0.5 then
- timer = 0
- keyframe = 1
- end
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-52)), speed * 2)
- elseif keyframe == 1 then
- if timer >= 1 then
- keyframe = 2
- end
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 1.2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 1.5)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 1.5)
- 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)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(0, 0, math.rad(-59)), speed * 2)
- end
- elseif animation == 3 then
- if keyframe == 0 then
- if timer >= 0.75 then
- keyframe = 1
- timer = 0
- speed = 0.05
- 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))
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-80)), speed * 2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
- Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(80)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
- Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
- end
- elseif keyframe == 1 then
- if timer >= 0.75 then
- timer = 0
- keyframe = 0
- attacking = false
- animation = -1
- keyframe = 0
- speed = 0.02
- local waiter = coroutine.wrap(function()
- wait(0.2)
- cooled1 = true
- end)
- waiter()
- end
- if not hit then
- local region = NewRegion(Character["Right Arm"].CFrame, Character["Right Arm"].Size)
- local hum
- for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
- if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
- hum = v.Parent:FindFirstChildOfClass("Humanoid")
- end
- end
- if hum and hum.Health > 0 then
- hit = true
- end
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(40)), speed * 4)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30)), speed * 4)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
- Joints4.C0 = Joints4.C0:lerp(random4, speed * 2)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- 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)
- Joints[2].C0 = Joints[2].C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(-30)), speed * 4)
- Joints[3].C0 = Joints[3].C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
- Joints[4].C0 = Joints[4].C0:lerp(random4, speed * 2)
- end
- end
- elseif animation == 4 then
- if keyframe == 0 then
- if timer >= 0.75 then
- keyframe = 1
- timer = 0
- speed = 0.05
- 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))
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(80)), speed * 2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-7), 0), speed * 2)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-80)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-14), math.rad(-7), 0), speed * 2)
- end
- elseif keyframe == 1 then
- if timer >= 0.75 then
- timer = 0
- keyframe = 0
- attacking = false
- animation = -1
- keyframe = 0
- speed = 0.02
- local waiter = coroutine.wrap(function()
- wait(0.2)
- cooled1 = true
- end)
- waiter()
- end
- if not hit then
- local region = NewRegion(Character["Left Arm"].CFrame, Character["Left Arm"].Size)
- local hum
- for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
- if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
- hum = v.Parent:FindFirstChildOfClass("Humanoid")
- end
- end
- if hum and hum.Health > 0 then
- hit = true
- end
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(-40)), speed * 4)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30)), speed * 4)
- Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-5), 0), speed * 2)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- 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)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(0, 0, math.rad(30)), speed * 4)
- Joints3.C0 = Joints3.C0:lerp(random3, speed * 2)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-12), math.rad(-5), 0), speed * 2)
- end
- end
- elseif animation == 5 then
- if keyframe == 0 then
- if timer >= 0.75 then
- timer = 0
- attacking = false
- animation = -1
- keyframe = 0
- speed = 0.02
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(-44)), speed * 3)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(-99)), speed * 3)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(89)), speed * 3)
- Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(22), math.rad(-2)), speed * 3)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(-22), math.rad(2)), speed * 3)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(-44)), speed * 3)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(-99)), speed * 3)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(89)), speed * 3)
- end
- elseif keyframe == 1 then
- if timer >= 0.75 then
- timer = 0
- attacking = false
- animation = -1
- keyframe = 0
- speed = 0.02
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(-2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(44)), speed * 3)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 3)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 3)
- Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(22), math.rad(-2)), speed * 3)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-4), math.rad(-22), math.rad(2)), speed * 3)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.new(-2, 0, 0) * CFrame.Angles(math.rad(-7), 0, math.rad(44)), speed * 3)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(32), 0, 0), speed * 3)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(2), math.rad(72), math.rad(-89)), speed * 3)
- Joints4.C0 = Joints4.C0:lerp(orig4 * CFrame.Angles(math.rad(-2), math.rad(72), math.rad(99)), speed * 3)
- end
- end
- elseif animation == 6 then
- if keyframe == 0 then
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(4), 0, math.rad(-2)), speed * 3)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(42), 0, 0), speed * 3)
- 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)
- 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)
- Joints5.C0 = Joints5.C0:lerp(orig5 * CFrame.Angles(math.rad(-4), math.rad(7), math.rad(-6)), speed * 3)
- Joints6.C0 = Joints6.C0:lerp(orig6 * CFrame.Angles(math.rad(-8), math.rad(13), math.rad(8)), speed * 3)
- end
- elseif animation == 7 then
- if keyframe == 0 then
- if timer >= 0.75 then
- keyframe = 1
- timer = 0
- speed = 0.085
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-99)), speed * 2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(99)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
- 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)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(math.rad(-2), 0, math.rad(-99)), speed * 2)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(99)), speed * 2)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-14), math.rad(7), 0), speed * 2)
- 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)
- end
- elseif keyframe == 1 then
- if timer >= 1.5 then
- timer = 0
- keyframe = 0
- attacking = false
- animation = -1
- keyframe = 0
- speed = 0.02
- local waiter = coroutine.wrap(function()
- wait(3)
- cooled2 = true
- end)
- waiter()
- end
- if not hit then
- local region = NewRegion(Character["Right Arm"].CFrame, Character["Right Arm"].Size)
- local hum
- for _, v in pairs(CastRegion(Player.Character, math.huge, region)) do
- if not hum and v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") and (v.Parent:FindFirstChild("Torso") or v.Parent:FindFirstChild("UpperTorso")) then
- hum = v.Parent:FindFirstChildOfClass("Humanoid")
- end
- end
- if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
- keepmoving = false
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(20)), speed * 4)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-20)), speed * 4)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
- 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)
- 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)
- 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)
- else
- if not keepmoving then
- keepmoving = true
- if running then
- movespeed = 0.04
- else
- movespeed = 0.03
- end
- if moveframe > 1 then
- moveframe = 0
- end
- if movetimer >= 0.8 then
- movetimer = 0
- end
- end
- Joints1.C0 = Joints1.C0:lerp(orig1 * CFrame.Angles(0, 0, math.rad(20)), speed * 4)
- Joints2.C0 = Joints2.C0:lerp(orig2 * CFrame.Angles(math.rad(2), 0, math.rad(-20)), speed * 4)
- Joints3.C0 = Joints3.C0:lerp(orig3 * CFrame.Angles(math.rad(-12), math.rad(5), 0), speed * 2)
- 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)
- end
- end
- end
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "z" then
- attacking = true
- cooled2 = false
- animation = 7
- keyframe = 0
- timer = 0
- effecttimer = 0
- movetimer = timer
- speed = 0.01
- hit = false
- local Clom = RightArm:Clone()
- Clom.Parent = RightArm
- Clom.Transparency = 1
- Clom.CanCollide = false
- Clom.Name = "Damage"
- local weld2 = Instance.new("Weld")
- weld2.Part0 = Clom
- weld2.Part1 = RightArm
- weld2.Parent = Clom
- local canattack = true
- Clom.Touched:Connect(function(user) --event
- local humanoid2 = user.Parent:FindFirstChild("Humanoid")--checks if there is a humanoid in p
- if canattack == true and humanoid2 then --if canattack is false and there is a humanoid
- canattack = false--sets canattack to false
- humanoid2:TakeDamage(42)
- canattack = true
- end
- end)
- wait(1)
- skill = false
- Clom:Destroy()
- end
- end)
- InputService.TextBoxFocused:connect(function()
- intextbox = true
- end)
- InputService.TextBoxFocusReleased:connect(function()
- intextbox = false
- end)
- local cooleddodge = true
- Humanoid.HealthChanged:connect(function(value)
- if dodgevar.Value == true then
- if dodgevar.Value == true then
- prevhealth = Humanoid.Health
- end
- Humanoid.Health = 100
- attacking = true
- cooleddodge = false
- local waiter = coroutine.wrap(function()
- wait(0.2)
- cooleddodge = true
- end)
- waiter()
- animation = 5
- Humanoid.Health = 100
- keyframe = math.random(0, 1)
- timer = 0
- movetimer = timer
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "x" and stand == true then
- PointLight0 = Instance.new("PointLight")
- Sparkles1 = Instance.new("Sparkles")
- PointLight0.Parent = Torso
- PointLight0.Color = Color3.new(0.541176, 1, 0.458824)
- PointLight0.Range = 20
- Sparkles1.Parent = Torso
- Sparkles1.Color = Color3.new(1.77083, 10.2, 1)
- Sparkles1.SparkleColor = Color3.new(1, 1, 1)
- Humanoid.WalkSpeed = 25
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == "x" and stand == true then
- Torso.PointLight:Destroy()
- Torso.Sparkles:Destroy()
- PointLight0.Parent = Torso
- Humanoid.WalkSpeed = 16
- end
- end)
Add Comment
Please, Sign In to add comment