Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local larm,rarm,lleg,rleg,head = char:FindFirstChild("Left Arm"),char:FindFirstChild("Right Arm"),char:FindFirstChild("Left Leg"),char:FindFirstChild("Right Leg"),char:FindFirstChild("Head")
- if larm and rarm and lleg and rleg and head--[[hum.RigType ~= Enum.HumanoidRigType.R6]] then else warn('Character must be R6.'); return; end;
- ls,rs,lh,rh,neck,rj = torso:FindFirstChild("Left Shoulder"),torso:FindFirstChild("Right Shoulder"),torso:FindFirstChild("Left Hip"),torso:FindFirstChild("Right Hip"),torso:FindFirstChild("Neck"),rootpart:FindFirstChild("RootJoint")
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((1 - t) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((t - 1) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function lerp(a,b,t)
- a:lerp(b,t)
- end
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = (1/60)
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//=================================\\
- --\\=================================//
- local motors = {}
- local welds = {}
- if ls then
- table.insert(motors,1,{ls,ls.Parent})
- ls.Parent = nil
- ls = Instance.new("Weld")
- ls.Name = 'Left Shoulder'
- ls.Part0 = torso
- ls.Part1 = larm
- ls.Parent = torso
- table.insert(welds,1,{ls,ls.Parent})
- end
- if rs then
- table.insert(motors,1,{rs,rs.Parent})
- rs.Parent = nil
- rs = Instance.new("Weld")
- rs.Name = 'Right Shoulder'
- rs.Part0 = torso
- rs.Part1 = rarm
- rs.Parent = torso
- table.insert(welds,1,{rs,rs.Parent})
- end
- if lh then
- table.insert(motors,1,{lh,lh.Parent})
- lh.Parent = nil
- lh = Instance.new("Weld")
- lh.Name = 'Left Hip'
- lh.Part0 = torso
- lh.Part1 = lleg
- lh.Parent = torso
- table.insert(welds,1,{lh,lh.Parent})
- end
- if rh then
- table.insert(motors,1,{rh,rh.Parent})
- rh.Parent = nil
- rh = Instance.new("Weld")
- rh.Name = 'Right Hip'
- rh.Part0 = torso
- rh.Part1 = rleg
- rh.Parent = torso
- table.insert(welds,1,{rh,rh.Parent})
- end
- if neck then
- table.insert(motors,1,{neck,neck.Parent})
- neck.Parent = nil
- neck = Instance.new("Weld")
- neck.Name = 'Neck'
- neck.Part0 = torso
- neck.Part1 = head
- neck.Parent = torso
- table.insert(welds,1,{neck,neck.Parent})
- end
- if rj then
- table.insert(motors,1,{rj,rj.Parent})
- rj.Parent = nil
- rj = Instance.new("Weld")
- rj.Name = 'RootJoint'
- rj.Part0 = rootpart
- rj.Part1 = torso
- rj.Parent = torso
- table.insert(welds,1,{rj,rj.Parent})
- end
- local remote = Instance.new("RemoteEvent")
- remote.Parent = plr['PlayerGui']
- local blocking,blocking2 = false,false
- local sprinting,sprinting2 = false,false
- local crouching = false
- local attacking = false
- local finishing = false
- local dancing = false
- local jumping = false
- local falling = false
- local toggling_dance = false
- local changing_stun_type = false
- local fists = false
- local equipped = false
- local pa,hka,ka,sa,lka = 1,2,1,1,1
- local screen,healthbar,healthstat,staminabar,staminastat,blockbar,blockstat
- local blockhealth,blockhealthmax = 100,100
- local stamina,staminamax = 100,100
- local block_counter,stamina_counter = 0,0
- local last_health = hum.Health
- local anim_speed = 0.6
- local sine = 0
- local dmg = 20
- local hit_id = 0
- local stun_type = math.random(1,2)
- local stun_duration = 0.25
- local anim_wait = 0.02*100
- local anim = 'idle'
- local last_mpos = Vector3.new()
- local animator = hum:FindFirstChildOfClass("Animator")
- local animate = char:FindFirstChild("Animate")
- local dance_anim = Instance.new("Animation")
- dance_anim.AnimationId = 'rbxassetid://35654637'
- dance_anim.Parent = hum
- local enabled = {}
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- local punches = {3932504231,3932505023,3932506183,3932506625,4306980885}
- local finishes = {3847883680,3847884467,3847885772,3929462677}
- local bonecracks = {3848986758,3848987400}
- local swing_s = Instance.new("Sound")
- swing_s.SoundId = 'rbxassetid://138097048'
- swing_s.Volume = 1
- swing_s.Parent = torso
- local punch = Instance.new("Sound")
- punch.SoundId = 'rbxassetid://138097048'
- punch.Volume = 0.7
- punch.Parent = torso
- local finish = Instance.new("Sound")
- finish.SoundId = 'rbxassetid://3847883680'
- finish.Volume = 0.4
- finish.Parent = torso
- local mash = Instance.new("Sound")
- mash.SoundId = 'rbxassetid://2517519047'
- mash.Looped = true
- mash.Volume = 1
- mash.Parent = torso
- local bone_crack = Instance.new("Sound")
- bone_crack.SoundId = 'rbxassetid://138097048'
- bone_crack.Volume = 0.4
- bone_crack.Parent = torso
- local dodge_s = Instance.new("Sound")
- dodge_s.SoundId = 'rbxassetid://4458055429'
- dodge_s.Volume = 0.35
- dodge_s.Parent = torso
- local _blockingval = Instance.new("ObjectValue")
- _blockingval.Name = 'blocking'
- _blockingval.Parent = nil
- local larm_trail = Instance.new("Trail")
- local att1,att2 = Instance.new("Attachment",larm),Instance.new("Attachment",larm)
- att1.Position = Vector3.new(0,-(larm.Size.Y/2),0)
- att2.Position = Vector3.new(0,(larm.Size.Y/2),0)
- larm_trail.Attachment0 = att1
- larm_trail.Attachment1 = att2
- larm_trail.LightInfluence = 1
- larm_trail.Transparency = NumberSequence.new(0,1)
- larm_trail.MinLength = 0
- larm_trail.Lifetime = 0.5
- larm_trail.Enabled = false
- larm_trail.Parent = larm
- local rarm_trail = Instance.new("Trail")
- local att1,att2 = Instance.new("Attachment",rarm),Instance.new("Attachment",rarm)
- att1.Position = Vector3.new(0,-(rarm.Size.Y/2),0)
- att2.Position = Vector3.new(0,(rarm.Size.Y/2),0)
- rarm_trail.Attachment0 = att1
- rarm_trail.Attachment1 = att2
- rarm_trail.LightInfluence = 1
- rarm_trail.Transparency = NumberSequence.new(0,1)
- rarm_trail.MinLength = 0
- rarm_trail.Lifetime = 0.5
- rarm_trail.Enabled = false
- rarm_trail.Parent = rarm
- local lleg_trail = Instance.new("Trail")
- local att1,att2 = Instance.new("Attachment",lleg),Instance.new("Attachment",lleg)
- att1.Position = Vector3.new(0,-(lleg.Size.Y/2),0)
- att2.Position = Vector3.new(0,(lleg.Size.Y/2),0)
- lleg_trail.Attachment0 = att1
- lleg_trail.Attachment1 = att2
- lleg_trail.LightInfluence = 1
- lleg_trail.Transparency = NumberSequence.new(0,1)
- lleg_trail.MinLength = 0
- lleg_trail.Lifetime = 0.5
- lleg_trail.Enabled = false
- lleg_trail.Parent = lleg
- local rleg_trail = Instance.new("Trail")
- local att1,att2 = Instance.new("Attachment",rleg),Instance.new("Attachment",rleg)
- att1.Position = Vector3.new(0,-(rleg.Size.Y/2),0)
- att2.Position = Vector3.new(0,(rleg.Size.Y/2),0)
- rleg_trail.Attachment0 = att1
- rleg_trail.Attachment1 = att2
- rleg_trail.LightInfluence = 1
- rleg_trail.Transparency = NumberSequence.new(0,1)
- rleg_trail.MinLength = 0
- rleg_trail.Lifetime = 0.5
- rleg_trail.Enabled = false
- rleg_trail.Parent = rleg
- local idle_anim = Instance.new("Animation")
- idle_anim.AnimationId = 'rbxassetid://125750544'
- idle_anim.Parent = hum
- function reset_anims(mode)
- if mode == false then
- for i,v in pairs(motors) do v[1].Parent = v[2]; end;
- for i,v in pairs(welds) do v[1].Parent = nil; end;
- elseif mode == true then
- for i,v in pairs(welds) do v[1].Parent = v[2]; end;
- for i,v in pairs(motors) do v[1].Parent = nil; end;
- end
- if mode == true then
- if animator then
- animator.Parent = hum
- end
- local T = hum:GetPlayingAnimationTracks()
- for i = 1,#T do
- T[i]:Stop()
- end
- local i = hum:LoadAnimation(idle_anim)
- i.Priority = Enum.AnimationPriority.Action
- i:AdjustSpeed(0)
- i:Play()
- i.TimePosition = ((50/100)*i.Length)
- elseif mode == false then
- if animate then
- animate.Parent = char
- end
- if animator then
- animator.Parent = hum
- end
- end
- --Swait(10)
- if mode == true then
- if animator then
- animator.Parent = nil
- end
- ls.C0 = CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- ls.C1 = CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- rs.C0 = CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- rs.C1 = CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))
- neck.C1 = CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))
- rh.C0 = CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- rh.C1 = CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- lh.C0 = CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- lh.C1 = CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- rj.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))
- rj.C1 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))
- end
- end
- reset_anims(true)
- equipped = true
- --[[
- local tool = Instance.new("Tool")
- tool.Name = 'Combat V2'
- tool.CanBeDropped = false
- tool.RequiresHandle = false
- tool.Parent = plr['Backpack']
- tool.Equipped:Connect(function()
- equipped = true
- reset_anims(true)
- end)
- tool.Unequipped:Connect(function()
- equipped = false
- dance(false)
- reset_anims(false)
- end)
- ]]
- function change_stun_type()
- spawn(function()
- if not changing_stun_type then else return end
- changing_stun_type = true
- for i,v in pairs(char:GetChildren()) do
- if (v:IsA("BasePart") or v:IsA("UnionOperation")) and (v.Name ~= 'HumanoidRootPart') then
- local s = v:FindFirstChild('stun_s')
- if not s then
- s = Instance.new("SelectionBox")
- s.Visible = false
- s.Parent = v
- s.Color3 = Color3.new(1, 0.333333, 0)
- s.Adornee = v
- s.LineThickness = 0
- s.SurfaceColor = BrickColor.new("New Yeller")
- s.SurfaceColor3 = Color3.new(1, 1, 0)
- s.SurfaceTransparency = 0.8
- end
- spawn(function()
- s.Visible = true
- wait(stun_duration)
- s.Visible = false
- end)
- end
- end
- wait(stun_duration)
- stun_type = stun_type + 1
- if stun_type > 2 then
- stun_type = 1
- end
- changing_stun_type = false
- end)
- end
- function limb_collide(obj)
- if (obj:IsA("UnionOperation") or obj:IsA("BasePart")) then else return end
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- --
- local t = {}
- --
- local cb = Instance.new("Part")
- cb.Name = 'limb'
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.Locked = true
- game:GetService("PhysicsService"):SetPartCollisionGroup(cb,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = cb
- weld.Part1 = obj
- weld.Parent = cb
- obj.Massless = true
- obj.Anchored = false
- cb.Parent = script
- table.insert(t,1,cb)
- --
- if not string.match(obj.Name:lower(),'torso') and not string.match(obj.Name:lower(),'rootpart') and not string.match(obj.Name:lower(),'head') then
- local lv = Vector3.new() -- Vector3.new(cb.Size.X,0,cb.Size.Z)
- local cb2 = Instance.new("Part")
- cb2.Name = 'limb'
- cb2.Transparency = 1
- cb2.CanCollide = true
- cb2.Anchored = false
- cb2.CFrame = obj.CFrame
- cb2.Size = lv
- cb2.Massless = true
- cb2.Locked = true
- local weld2 = Instance.new("Weld")
- weld2.Part0 = cb
- weld2.Part1 = cb2
- weld2.C1 = CFrame.new(0,(cb.Size.Y/2),0)
- weld2.Parent = cb2
- cb2.Parent = script
- table.insert(t,1,cb2)
- end
- --
- return t
- end
- function Ragdoll(targchar,headless,insta,kill)
- local pc = targchar
- local targhum = pc:FindFirstChild("Humanoid")
- local js,js2 = {},{}
- for _,obj in pairs(pc:GetDescendants()) do
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- end
- end
- if kill == true then
- pc.Archivable = true
- local old_pc = pc
- pc = pc:Clone()
- for i,v in pairs(pc:GetDescendants()) do
- limb_collide(v)
- if v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- if v:IsA("BodyVelocity") or v:IsA("BodyPosition") or v:IsA("BodyAngularVelocity") or v:IsA("BodyForce") or v:IsA("BodyGyro") or v:IsA("BodyThrust") or v:IsA("BodyMover") then
- v:Destroy()
- end
- if (v:IsA("Script") and v.Name == 'Health') or (v:IsA("LocalScript") and v.Name == 'Animate') then
- v:Destroy()
- end
- if v:IsA("Humanoid") then
- v.BreakJointsOnDeath = false
- v.Health = 0
- v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- v.PlatformStand = true
- end
- end
- for i,v in pairs(old_pc:GetDescendants()) do
- if v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA("ForceField") or v:IsA("Accessory") or v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceGui") then
- v:destroy()
- end
- if v:IsA("Humanoid") then
- v.BreakJointsOnDeath = true
- v.Health = 0
- v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- v.PlatformStand = true
- end
- end
- pc.Parent = workspace
- end
- --if kill and targhum:FindFirstChild("Ragdolled") then return; end;
- if pc ~= nil then
- local hum = pc:FindFirstChild'Humanoid'
- local LArm = pc:FindFirstChild'Left Arm'
- local RArm = pc:FindFirstChild'Right Arm'
- local LLeg = pc:FindFirstChild'Left Leg'
- local RLeg = pc:FindFirstChild'Right Leg'
- local torso = pc:FindFirstChild'Torso'
- local head = pc:FindFirstChild'Head'
- local LUA = pc:FindFirstChild'LeftUpperArm'
- local LLA = pc:FindFirstChild'LeftLowerArm'
- local LH = pc:FindFirstChild'LeftHand'
- local RUA = pc:FindFirstChild'RightUpperArm'
- local RLA = pc:FindFirstChild'RightLowerArm'
- local RH = pc:FindFirstChild'RightHand'
- local LUL = pc:FindFirstChild'LeftUpperLeg'
- local LLL = pc:FindFirstChild'LeftLowerLeg'
- local LF = pc:FindFirstChild'LeftFoot'
- local RUL = pc:FindFirstChild'RightUpperLeg'
- local RLL = pc:FindFirstChild'RightLowerLeg'
- local RF = pc:FindFirstChild'RightFoot'
- local UT = pc:FindFirstChild'UpperTorso'
- local LT = pc:FindFirstChild'LowerTorso'
- if hum and LArm and RArm and LLeg and RLeg and head then
- hum.BreakJointsOnDeath = false
- if insta then
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if not LArm:FindFirstChild('Dismembered') then
- local at1 = Instance.new("Attachment")
- at1.Parent = torso
- at1.Visible = vis
- at1.Orientation = torso.Orientation + Vector3.new(0,180,0)
- at1.Position = Vector3.new(-1,1,0)
- local at1p2 = Instance.new("Attachment")
- at1p2.Parent = LArm
- at1p2.Visible = vis
- at1p2.Orientation = LArm.Orientation + Vector3.new(0,180,0)
- at1p2.Position = Vector3.new(.5,1,0)
- local bis = Instance.new("BallSocketConstraint")
- bis.Parent = LArm
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- table.insert(js,1,bis)
- end
- if not RArm:FindFirstChild('Dismembered') then
- local at2 = Instance.new("Attachment")
- at2.Parent = torso
- at2.Visible = vis
- at2.Orientation = torso.Orientation + Vector3.new(0,0,0)
- at2.Position = Vector3.new(1,1,0)
- local at2p2 = Instance.new("Attachment")
- at2p2.Parent = RArm
- at2p2.Visible = vis
- at2p2.Orientation = RArm.Orientation + Vector3.new(0,0,0)
- at2p2.Position = Vector3.new(-.5,1,0)
- local bis2 = Instance.new("BallSocketConstraint")
- bis2.Parent = RArm
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- table.insert(js,1,bis2)
- end
- if not RLeg:FindFirstChild('Dismembered') then
- local at3 = Instance.new("Attachment")
- at3.Parent = torso
- at3.Visible = vis
- at3.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at3.Position = Vector3.new(.5,-1,0)
- local at3p2 = Instance.new("Attachment")
- at3p2.Parent = RLeg
- at3p2.Visible = vis
- at3p2.Orientation = RLeg.Orientation + Vector3.new(90,0,-90)
- at3p2.Position = Vector3.new(0,1,0)
- local bis3 = Instance.new("BallSocketConstraint")
- bis3.Parent = RLeg
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- table.insert(js,1,bis3)
- end
- if not LLeg:FindFirstChild('Dismembered') then
- local at4 = Instance.new("Attachment")
- at4.Parent = torso
- at4.Visible = vis
- at4.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at4.Position = Vector3.new(-.5,-1,0)
- local at4p2 = Instance.new("Attachment")
- at4p2.Parent = LLeg
- at4p2.Visible = vis
- at4p2.Orientation = LLeg.Orientation + Vector3.new(90,0,-90)
- at4p2.Position = Vector3.new(0,1,0)
- local bis4 = Instance.new("BallSocketConstraint")
- bis4.Parent = LLeg
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- table.insert(js,1,bis4)
- end
- if not headless and not head:FindFirstChild('Dismembered') then
- local at5 = Instance.new("Attachment")
- at5.Parent = torso
- at5.Visible = vis
- at5.Orientation = torso.Orientation + Vector3.new(180,90,0)
- at5.Position = Vector3.new(0,1,0)
- local at5p2 = Instance.new("Attachment")
- at5p2.Parent = head
- at5p2.Visible = vis
- at5p2.Orientation = head.Orientation + Vector3.new(180,90,0)
- at5p2.Position = Vector3.new(0,-.5,0)
- local bis5 = Instance.new("BallSocketConstraint")
- bis5.Parent = head
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- table.insert(js,1,bis5)
- else
- --head:BreakJoints()
- end
- end
- else
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if not LArm:FindFirstChild('Dismembered') then
- local at1 = Instance.new("Attachment")
- at1.Parent = torso
- at1.Visible = vis
- at1.Orientation = torso.Orientation + Vector3.new(0,180,0)
- at1.Position = Vector3.new(-1,1,0)
- local at1p2 = Instance.new("Attachment")
- at1p2.Parent = LArm
- at1p2.Visible = vis
- at1p2.Orientation = LArm.Orientation + Vector3.new(0,180,0)
- at1p2.Position = Vector3.new(.5,1,0)
- local bis = Instance.new("BallSocketConstraint")
- bis.Parent = LArm
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- table.insert(js,1,bis)
- end
- if not RArm:FindFirstChild('Dismembered') then
- local at2 = Instance.new("Attachment")
- at2.Parent = torso
- at2.Visible = vis
- at2.Orientation = torso.Orientation + Vector3.new(0,0,0)
- at2.Position = Vector3.new(1,1,0)
- local at2p2 = Instance.new("Attachment")
- at2p2.Parent = RArm
- at2p2.Visible = vis
- at2p2.Orientation = RArm.Orientation + Vector3.new(0,0,0)
- at2p2.Position = Vector3.new(-.5,1,0)
- local bis2 = Instance.new("BallSocketConstraint")
- bis2.Parent = RArm
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- table.insert(js,1,bis2)
- end
- if not RLeg:FindFirstChild('Dismembered') then
- local at3 = Instance.new("Attachment")
- at3.Parent = torso
- at3.Visible = vis
- at3.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at3.Position = Vector3.new(.5,-1,0)
- local at3p2 = Instance.new("Attachment")
- at3p2.Parent = RLeg
- at3p2.Visible = vis
- at3p2.Orientation = RLeg.Orientation + Vector3.new(90,0,-90)
- at3p2.Position = Vector3.new(0,1,0)
- local bis3 = Instance.new("BallSocketConstraint")
- bis3.Parent = RLeg
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- table.insert(js,1,bis3)
- end
- if not LLeg:FindFirstChild('Dismembered') then
- local at4 = Instance.new("Attachment")
- at4.Parent = torso
- at4.Visible = vis
- at4.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at4.Position = Vector3.new(-.5,-1,0)
- local at4p2 = Instance.new("Attachment")
- at4p2.Parent = LLeg
- at4p2.Visible = vis
- at4p2.Orientation = LLeg.Orientation + Vector3.new(90,0,-90)
- at4p2.Position = Vector3.new(0,1,0)
- local bis4 = Instance.new("BallSocketConstraint")
- bis4.Parent = LLeg
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- table.insert(js,1,bis4)
- end
- if not headless and not head:FindFirstChild('Dismembered') then
- local at5 = Instance.new("Attachment")
- at5.Parent = torso
- at5.Visible = vis
- at5.Orientation = torso.Orientation + Vector3.new(180,90,0)
- at5.Position = Vector3.new(0,1,0)
- local at5p2 = Instance.new("Attachment")
- at5p2.Parent = head
- at5p2.Visible = vis
- at5p2.Orientation = head.Orientation + Vector3.new(180,90,0)
- at5p2.Position = Vector3.new(0,-.5,0)
- local bis5 = Instance.new("BallSocketConstraint")
- bis5.Parent = head
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- table.insert(js,1,bis5)
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- if insta then
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- table.insert(js,1,bsc1)
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- table.insert(js,1,bsc2)
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- table.insert(js,1,bsc3)
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- table.insert(js,1,bsc4)
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- table.insert(js,1,bsc5)
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- table.insert(js,1,bsc6)
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- table.insert(js,1,bsc7)
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- table.insert(js,1,bsc8)
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- table.insert(js,1,bsc9)
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- table.insert(js,1,bsc10)
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- table.insert(js,1,bsc11)
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- table.insert(js,1,bsc12)
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- table.insert(js,1,bsc13)
- end
- if not headless and not head:FindFirstChild('Dismembered') then
- local bsc14 = Instance.new("BallSocketConstraint",head)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- table.insert(js,1,bsc14)
- else
- --head:BreakJoints()
- end
- end
- else
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- table.insert(js,1,bsc1)
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- table.insert(js,1,bsc2)
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- table.insert(js,1,bsc3)
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- table.insert(js,1,bsc4)
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- table.insert(js,1,bsc5)
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- table.insert(js,1,bsc6)
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- table.insert(js,1,bsc7)
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- table.insert(js,1,bsc8)
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- table.insert(js,1,bsc9)
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- table.insert(js,1,bsc10)
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- table.insert(js,1,bsc11)
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- table.insert(js,1,bsc12)
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- table.insert(js,1,bsc13)
- end
- if not headless and not head:FindFirstChild('Dismembered') then
- local bsc14 = Instance.new("BallSocketConstraint",head)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- table.insert(js,1,bsc14)
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return js,js2
- end
- local blood_images = {931617584,1663434319,1391189545,4533673847,3236192667,2565888666,612591729,120362139,116830967,122022304,131339257,247766282,121678640,176677800,120361912,176678070,176678086,176677869} --305296807,256293532,148713503,176678030
- local e_s = 1
- function add_decal(f,t,obj,d)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- game:GetService("Debris"):AddItem(texture,d)
- if f == 'Left' or f == 'Right' then
- texture.StudsPerTileV = obj.Size.Y + e_s
- if (obj.Size.X > obj.Size.Z) then
- texture.StudsPerTileV = obj.Size.Z + e_s
- elseif (obj.Size.Z > obj.Size.X) then
- texture.StudsPerTileU = obj.Size.X + e_s
- else
- texture.StudsPerTileU = obj.Size.X + e_s
- end
- elseif f == 'Front' or f == 'Back' then
- texture.StudsPerTileV = obj.Size.Y + e_s
- if (obj.Size.X > obj.Size.Z) then
- texture.StudsPerTileV = obj.Size.X + e_s
- elseif (obj.Size.Z > obj.Size.X) then
- texture.StudsPerTileU = obj.Size.Z + e_s
- else
- texture.StudsPerTileU = obj.Size.X + e_s
- end
- elseif f == 'Top' or f == 'Bottom' then
- texture.StudsPerTileV = obj.Size.X + e_s
- texture.StudsPerTileU = obj.Size.Z + e_s
- end
- end)
- end
- function add_blood(obj)
- local t1,t2,t3,t4,t5,t6 = blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)]
- add_decal('Top',t1,obj,5)
- add_decal('Bottom',t2,obj,5)
- add_decal('Left',t3,obj,5)
- add_decal('Right',t4,obj,5)
- add_decal('Front',t5,obj,5)
- add_decal('Back',t6,obj,5)
- end
- function add_blood2(obj)
- local blood_particle = Instance.new("ParticleEmitter")
- blood_particle.Parent = obj
- blood_particle.Speed = NumberRange.new(5, 14)
- blood_particle.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- blood_particle.LightEmission = 0.20000000298023
- blood_particle.LightInfluence = 1
- blood_particle.Texture = "http://www.roblox.com/asset/?id=134531274"
- blood_particle.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- blood_particle.ZOffset = 1
- blood_particle.Size = NumberSequence.new(0.12499988079071,0)
- blood_particle.Acceleration = Vector3.new(0, -20, 0)
- blood_particle.EmissionDirection = Enum.NormalId.Front
- blood_particle.Lifetime = NumberRange.new(0.5, 1.5)
- blood_particle.Rate = 100000
- blood_particle.SpreadAngle = Vector2.new(360, 360)
- blood_particle.VelocitySpread = 360
- blood_particle.Enabled = true
- spawn(function()
- wait(0.3)
- blood_particle.Enabled = false
- game:GetService("Debris"):AddItem(blood_particle,2)
- end)
- end
- function touch_dmg(p,t,current_hit_id,mode,_kb)
- local hb = Instance.new("Part")
- hb.Size = p.Size
- hb.Transparency = 1
- hb.Shape = p.Shape
- hb.CanCollide = false
- hb.Anchored = false
- hb.Massless = true
- hb.Parent = p.Parent
- local weld = Instance.new("Weld")
- weld.Part0 = p
- weld.Part1 = hb
- weld.Parent = p
- local knock = nil
- hb.Touched:Connect(function(obj)
- if not obj:IsDescendantOf(script) then else return end
- local targchar,targhum,targtorso,hitval,killval,knockval,blockval
- pcall(function()
- if not obj.Parent:IsA("Accessory") then
- targchar = obj.Parent
- elseif obj.Parent:IsA("Accessory") then
- targchar = obj.Parent.Parent
- end
- end)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.Character and obj:IsDescendantOf(v.Character) then
- targchar = v.Character
- end
- end
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("Hit by " .. plr.Name .. current_hit_id)
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- knockval = targhum:FindFirstChild("knocked")
- end)
- pcall(function()
- blockval = targhum:FindFirstChild("blocking")
- end)
- pcall(function()
- finishingval = targhum:FindFirstChild("finishing")
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("UpperTorso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- if targchar and targhum and targtorso --[[and targhum.Health > 0]] and not hitval --[[and not killval]] and not finishingval and ((mode ~= 2) or (mode == 2 and (targhum.PlatformStand or targhum.Sit or 0 >= targhum.Health))) then
- local temphitval = Instance.new("ObjectValue")
- temphitval.Name = ("Hit by " .. plr.Name .. current_hit_id)
- temphitval.Parent = targhum
- game:GetService("Debris"):AddItem(temphitval,t)
- local ch = targhum.Health
- local tempdamage = dmg
- if tempdamage >= targhum.Health and targhum.Health > 1 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > dmg then
- targhum:TakeDamage(tempdamage)
- end
- if not knockval and not killval and not blockval then
- local tempstunval = Instance.new("ObjectValue")
- tempstunval.Name = 'Stunned'
- tempstunval.Parent = targhum
- game:GetService("Debris"):AddItem(tempstunval,stun_duration)
- if mode == 3 then
- knock = Instance.new("ObjectValue")
- knock.Name = 'knocked'
- knock.Parent = targhum
- game:GetService("Debris"):AddItem(knock,t)
- end
- end
- if ((ch > targhum.Health) or (0 >= targhum.Health)) then
- if obj.Name ~= 'HumanoidRootPart' then
- add_blood(obj)
- add_blood2(obj)
- end
- punch.SoundId = 'rbxassetid://' .. punches[math.random(1,#punches)]
- punch:Play()
- end
- if 0 >= targhum.Health then
- if not killval and not targhum:FindFirstChild("Ragdolled") then
- local tempkillval = Instance.new("ObjectValue")
- tempkillval.Name = 'killer'
- tempkillval.Value = plr
- tempkillval.Parent = targhum
- targhum:TakeDamage(1/0)
- targhum.AutoRotate = false
- Ragdoll(targchar,false,true,true)
- end
- if mode == 2 then
- finish.SoundId = 'rbxassetid://' .. finishes[math.random(1,#finishes)]
- finish:Play()
- end
- end
- if targchar and targhum and targhum ~= hum and hum and not killval then
- spawn(function()
- if (15 >= targhum.Health or (knock and knock.Parent)) and targhum.Health > 0 and not targhum:FindFirstChild("Ragdolled") then
- local ragval = Instance.new("ObjectValue")
- ragval.Name = 'Ragdolled'
- ragval.Parent = targhum
- spawn(function()
- local kb = _kb or 15
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)
- local collision_limbs = {}
- for i,v in pairs(targchar:GetChildren()) do
- local limbs = limb_collide(v)
- if limbs then
- for i,limb in pairs(limbs) do
- table.insert(collision_limbs,1,limb)
- end
- end
- end
- local js,js2 = Ragdoll(targchar,false,true)
- local ar = targhum.AutoRotate
- targhum.AutoRotate = false
- while (15 >= targhum.Health or (knock and knock.Parent)) and targhum.Health > 0 do
- targhum.PlatformStand = true
- wait(0.1)
- end
- for i,v in pairs(js) do v:Destroy(); end;
- for i,v in pairs(js2) do v.obj.Parent = v.par; end;
- for i,v in pairs(collision_limbs) do v:Destroy(); end;
- if targhum and 0 >= targhum.Health then
- Ragdoll(targchar,false,true,true)
- return;
- end;
- for i,v in pairs(targchar:GetChildren()) do
- if v:IsA("BasePart") or v:IsA("UnionOperation") then
- v:SetPartCollisionGroup(v, "Default")
- end
- end
- if ar then
- targhum.AutoRotate = true
- end
- ragval:Destroy()
- targhum.Sit = false
- targhum.PlatformStand = false
- targhum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- targhum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- targtorso.Velocity = Vector3.new()
- end
- end)
- end
- end
- end)
- spawn(function()
- repeat wait() until not attacking
- hb:Destroy()
- end)
- end
- function left_punch(speed,current_hit_id)
- stamina = stamina - 7
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- dmg = 10
- touch_dmg(larm,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- larm_trail.Enabled = true
- for i = 1,2 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(120))*CFrame.new(0,0.5,0),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(-150))*CFrame.new(0,0.7,0),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(1),math.rad(1)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- for i = 1,3 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-60),math.rad(0),math.rad(110))*CFrame.new(0.7,0,0.8),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(-130))*CFrame.new(-0.1,0.5,0),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(1),math.rad(-1)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- larm_trail.Enabled = false
- end
- function right_punch(speed,current_hit_id)
- stamina = stamina - 7
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- dmg = 10
- touch_dmg(rarm,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- rarm_trail.Enabled = true
- for i = 1,2 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(150))*CFrame.new(0,0.7,0),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(-120))*CFrame.new(0,0.5,0),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(1),math.rad(-1)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- for i = 1,3 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(130))*CFrame.new(-0.1,0.5,0),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-60),math.rad(0),math.rad(-110))*CFrame.new(-0.7,0,0.8),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(1),math.rad(1)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- rarm_trail.Enabled = false
- end
- function air_punch(speed,current_hit_id)
- stamina = stamina - 10
- dmg = 15
- touch_dmg(larm,2,current_hit_id)
- touch_dmg(rarm,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[rh] = false
- enabled[lh] = false
- enabled[rj] = false
- rarm_trail.Enabled = true
- larm_trail.Enabled = true
- for i = 1,5 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(140))*CFrame.new(0,0,0.5),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(-140))*CFrame.new(0,0,0.5),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(45)),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-25)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- enabled[neck] = false
- for i = 1,5 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(75))*CFrame.new(0,0,0.5),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-45),math.rad(0),math.rad(-75))*CFrame.new(0,0,0.5),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(25)),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- enabled[neck] = true
- rarm_trail.Enabled = false
- larm_trail.Enabled = false
- end
- function left_kick(speed,current_hit_id)
- stamina = stamina - 13
- dmg = 16
- touch_dmg(lleg,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rj] = false
- enabled[neck] = false
- lleg_trail.Enabled = true
- for i = 1,3 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(-15)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-5)),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(-5),math.rad(-45)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(15)),speed)
- Swait(anim_wait)
- end
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(15)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(5)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(5)),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(5),math.rad(75)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-10)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- enabled[neck] = true
- lleg_trail.Enabled = false
- end
- function right_kick(speed,current_hit_id)
- stamina = stamina - 13
- dmg = 16
- touch_dmg(rleg,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- rleg_trail.Enabled = true
- for i = 1,3 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(5)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(15)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(5)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(5),math.rad(45)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15)),speed)
- Swait(anim_wait)
- end
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-15)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(-5),math.rad(-75)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(10)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- enabled[neck] = true
- rleg_trail.Enabled = false
- end
- function air_kick(speed)
- end
- function right_round_house(speed,current_hit_id)
- stamina = stamina - 20
- dmg = 25
- touch_dmg(rleg,2,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- rleg_trail.Enabled = true
- for i = 1,3 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(5)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(15)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(5)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(5),math.rad(45)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15)),speed)
- Swait(anim_wait)
- end
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,4 do
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- enabled[neck] = true
- rleg_trail.Enabled = true
- end
- function left_sweep(speed,current_hit_id)
- stamina = stamina - 10
- dmg = 12
- hum.WalkSpeed = 0
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- lleg_trail.Enabled = true
- local kb = 25
- local b = Instance.new("BodyVelocity")
- b.Parent = rootpart
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb
- game:GetService("Debris"):AddItem(b,0.15)
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(35),math.rad(0))*CFrame.new(0,-0.5,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(-45))*CFrame.new(0.5,0,0.2),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(60))*CFrame.new(0,0,-0.5),speed)
- Swait(anim_wait)
- end
- touch_dmg(lleg,1,current_hit_id,3,25)
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(-25)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-45)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(35),math.rad(-25))*CFrame.new(0,-1,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(-45))*CFrame.new(0.1,0.1,-0.1),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(45*i))*CFrame.new(0,0,-1),speed)
- Swait(anim_wait)
- end
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(-45)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(45),math.rad(-35)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(35),math.rad(-25))*CFrame.new(0,-1,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(-45))*CFrame.new(0.1,0.1,-0.1),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(180+(45*i)))*CFrame.new(0,0,-1.2),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- lleg_trail.Enabled = false
- end
- function right_sweep(speed,current_hit_id)
- stamina = stamina - 10
- dmg = 12
- hum.WalkSpeed = 0
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- rleg_trail.Enabled = true
- local kb = 25
- local b = Instance.new("BodyVelocity")
- b.Parent = rootpart
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb
- game:GetService("Debris"):AddItem(b,0.15)
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-5)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(35),math.rad(0))*CFrame.new(0,-0.5,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(-45))*CFrame.new(0.5,0,0.2),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(60))*CFrame.new(0,0,-0.5),speed)
- Swait(anim_wait)
- end
- touch_dmg(rleg,1,current_hit_id,3,25)
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(25)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(45)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(45))*CFrame.new(-0.1,0.1,-0.1),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(-35),math.rad(25))*CFrame.new(0,-1,0),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(-45*i))*CFrame.new(0,0,-1),speed)
- Swait(anim_wait)
- end
- for i = 1,4 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(45)),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(25)),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(-35)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(45))*CFrame.new(-0.1,0.1,-0.1),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(-35),math.rad(25))*CFrame.new(0,-1,0),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(-180+(-45*i)))*CFrame.new(0,0,-1.2),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- rleg_trail.Enabled = false
- end
- function left_low_kick(speed,current_hit_id)
- stamina = stamina - 15
- dmg = 20
- hum.WalkSpeed = 8
- touch_dmg(lleg,1,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- lleg_trail.Enabled = true
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,6 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(80))*CFrame.new(0.5,0,0),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-150))*CFrame.new(0,0.5,0),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(25)),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(100))*CFrame.new(0.5,0,0),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(25),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- lleg_trail.Enabled = false
- end
- function right_low_kick(speed,current_hit_id)
- stamina = stamina - 15
- dmg = 20
- hum.WalkSpeed = 8
- touch_dmg(rleg,1,current_hit_id)
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- rleg_trail.Enabled = true
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,6 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(150))*CFrame.new(0,0.5,0),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-80))*CFrame.new(-0.5,0,0),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-100))*CFrame.new(-0.5,0,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-25)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(25),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- rleg_trail.Enabled = false
- end
- function left_high_kick(speed,current_hit_id)
- stamina = stamina - 20
- dmg = 25
- hum.WalkSpeed = 0
- touch_dmg(lleg,1,current_hit_id,3,30)
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- lleg_trail.Enabled = true
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- local kb = 30
- local b = Instance.new("BodyVelocity")
- b.Parent = rootpart
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb
- game:GetService("Debris"):AddItem(b,0.15)
- for i = 1,6 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(150),math.rad(0),math.rad(0))*CFrame.new(0,0,-0.5),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(75),math.rad(-10),math.rad(10))*CFrame.new(0,0,-0.2),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(45)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(60),math.rad(0),math.rad(0))*CFrame.new(-0.3,-1.3,0.7),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))*CFrame.new(0,-0.5,0),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(-60),math.rad(-90))*CFrame.new(0,0,-1),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- lleg_trail.Enabled = false
- end
- function right_high_kick(speed,current_hit_id)
- stamina = stamina - 20
- dmg = 25
- hum.WalkSpeed = 0
- touch_dmg(rleg,1,current_hit_id,3,30)
- enabled[ls] = false
- enabled[rs] = false
- enabled[lh] = false
- enabled[rh] = false
- enabled[rj] = false
- enabled[neck] = false
- rleg_trail.Enabled = true
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- local kb = 30
- local b = Instance.new("BodyVelocity")
- b.Parent = rootpart
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb
- game:GetService("Debris"):AddItem(b,0.15)
- for i = 1,6 do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(75),math.rad(10),math.rad(-10))*CFrame.new(0,0,-0.2),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(150),math.rad(0),math.rad(0))*CFrame.new(0,0,-0.6),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-45)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))*CFrame.new(0,-0.5,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(60),math.rad(0),math.rad(0))*CFrame.new(0.3,-1.3,0.7),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(60),math.rad(90))*CFrame.new(0,0,-1),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[lh] = true
- enabled[rh] = true
- enabled[rj] = true
- enabled[neck] = true
- rleg_trail.Enabled = false
- end
- function stomp(speed,current_hit_id)
- finishing = true
- local finishregion = Region3.new(rootpart.Position-(Vector3.new(3, 6, 3)/2),rootpart.Position+(Vector3.new(3, -6, 3)/2))
- local targchar,targtorso,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if not obj:IsDescendantOf(char) then
- local tempchar,temptorso,temphum
- pcall(function()
- if not obj.Parent:IsA("Accessory") then
- tempchar = obj.Parent
- elseif obj.Parent:IsA("Accessory") then
- tempchar = obj.Parent.Parent
- end
- end)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.Character and obj:IsDescendantOf(v.Character) then
- tempchar = v.Character
- end
- end
- pcall(function()
- temptorso = tempchar:FindFirstChild("Torso") or tempchar:FindFirstChild("UpperTorso") or tempchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temptorso and temphum and not temphum:FindFirstChild('killer') and temphum.Health > 0 and 15 > temphum.Health and (temphum.PlatformStand or temphum.Sit) then
- targchar = tempchar
- targtorso = temptorso
- targhum = temphum
- end
- end
- end
- if targchar and targtorso and targhum and not targhum:FindFirstChild('killer') and targhum.Health > 0 and 15 > targhum.Health and (targhum.PlatformStand or targhum.Sit) then
- local finishval = Instance.new("ObjectValue")
- finishval.Name = 'finishing'
- finishval.Parent = hum
- targtorso.Anchored = true
- torso.Position = targtorso.Position + Vector3.new(0,4,0)
- hum.WalkSpeed = 0
- --enabled[ls] = false
- --enabled[rs] = false
- enabled[neck] = false
- enabled[rh] = false
- enabled[lh] = false
- enabled[rj] = false
- rleg_trail.Enabled = true
- for i = 1,5 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.5,-0.9,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,2 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(0.7,-0.1,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- finish.SoundId = 'rbxassetid://' .. finishes[math.random(1,#finishes)]
- finish:Play()
- punch.SoundId = 'rbxassetid://' .. punches[math.random(1,#punches)]
- punch:Play()
- local tempkillval = Instance.new("ObjectValue")
- tempkillval.Name = 'killer'
- tempkillval.Value = plr
- tempkillval.Parent = targhum
- targhum:TakeDamage(1/0)
- targtorso.Anchored = false
- targhum.PlatformStand = false
- targhum.Sit = false
- --Ragdoll(targchar,false,true)
- add_blood2(targtorso)
- for i = 1,3 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.7,0.1,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- for i = 1,5 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.5,-0.9,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- rleg_trail.Enabled = false
- finishval:Destroy()
- elseif stamina >= 10 then
- stamina = stamina - 10
- dmg = 10
- hum.WalkSpeed = 0
- --enabled[ls] = false
- --enabled[rs] = false
- enabled[neck] = false
- enabled[rh] = false
- enabled[lh] = false
- enabled[rj] = false
- rleg_trail.Enabled = true
- for i = 1,5 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.5,-0.9,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- touch_dmg(rleg,2,current_hit_id,2)
- swing_s.PlaybackSpeed = math.random(90,110)/100
- swing_s:Play()
- for i = 1,5 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.7,0.1,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- for i = 1,5 do
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(-0.5,-0.9,0),speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-5)),speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),speed)
- Swait(anim_wait)
- end
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- rleg_trail.Enabled = false
- end
- finishing = false
- end
- function carry(speed)
- local finishregion = Region3.new(rootpart.Position-(Vector3.new(5, 6, 5)/2),rootpart.Position+(Vector3.new(5, -6, 5)/2))
- local targchar,targtorso,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if not obj:IsDescendantOf(char) then
- local tempchar,temptorso,temphum
- pcall(function()
- if not obj.Parent:IsA("Accessory") then
- tempchar = obj.Parent
- elseif obj.Parent:IsA("Accessory") then
- tempchar = obj.Parent.Parent
- end
- end)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.Character and obj:IsDescendantOf(v.Character) then
- tempchar = v.Character
- end
- end
- pcall(function()
- temptorso = tempchar:FindFirstChild("Torso") or tempchar:FindFirstChild("UpperTorso") or tempchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temptorso and temphum and not temphum:FindFirstChild("Being Carried") and (15 > temphum.Health) and (temphum.PlatformStand or temphum.Sit or (0 >= temphum.Health) or temphum:FindFirstChild('knocked')) then
- targchar = tempchar
- targtorso = temptorso
- targhum = temphum
- end
- end
- end
- if (targchar and targtorso and targhum and not targhum:FindFirstChild("Being Carried") and (15 > targhum.Health) and (targhum.PlatformStand or targhum.Sit or (0 >= targhum.Health) or targhum:FindFirstChild('knocked'))) then
- carrying = true
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- local cval = Instance.new("ObjectValue")
- cval.Name = 'Being Carried'
- cval.Parent = targhum
- local bp = Instance.new("BodyPosition")
- bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bp.P = 100000
- bp.Parent = targtorso
- while carrying and (targchar and targtorso and targhum and (15 > targhum.Health) and (targhum.PlatformStand or targhum.Sit or (0 >= targhum.Health) or targhum:FindFirstChild('knocked'))) do
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(45))*CFrame.new(0.8,0,0.6),speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(-45))*CFrame.new(-0.8,0,0.6),speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),speed)
- --targtorso.CFrame = torso.CFrame*CFrame.new(0,0,-4.5)
- bp.Position = (torso.CFrame*CFrame.new(0,0,-4.5)).p
- wait()
- end
- if bp then
- bp:Destroy()
- end
- if cval then
- cval:Destroy()
- end
- carrying = false
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- end
- end
- function dance(mode)
- if not toggling_dance then else return end
- toggling_dance = true
- if mode and not dancing then
- dancing = true
- blocking = false
- blocking2 = false
- enabled[ls] = false
- enabled[rs] = false
- enabled[neck] = false
- enabled[rh] = false
- enabled[lh] = false
- enabled[rj] = false
- reset_anims(false)
- local d = hum:LoadAnimation(dance_anim)
- d.Priority = Enum.AnimationPriority.Action
- d:Play()
- mash:Play()
- elseif not mode and dancing then
- mash:Stop()
- reset_anims(true)
- enabled[ls] = true
- enabled[rs] = true
- enabled[neck] = true
- enabled[rh] = true
- enabled[lh] = true
- enabled[rj] = true
- dancing = false
- end
- toggling_dance = false
- end
- function alive()
- local alive = false
- if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent) then
- alive = true
- end
- return alive
- end
- function create_gui(p)
- local screen = Instance.new("ScreenGui")
- local Frame1 = Instance.new("Frame")
- local Frame2 = Instance.new("Frame")
- local staminabar = Instance.new("Frame")
- local staminastat = Instance.new("TextBox")
- local TextLabel5 = Instance.new("TextLabel")
- local Frame6 = Instance.new("Frame")
- local healthbar = Instance.new("Frame")
- local TextLabel8 = Instance.new("TextLabel")
- local healthstat = Instance.new("TextBox")
- local Frame10 = Instance.new("Frame")
- local blockbar = Instance.new("Frame")
- local blockstat = Instance.new("TextBox")
- local TextLabel13 = Instance.new("TextLabel")
- screen.Parent = p
- screen.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame1.Parent = screen
- Frame1.Size = UDim2.new(1, 0, 1, 0)
- Frame1.BackgroundColor = BrickColor.new("Institutional white")
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.BackgroundTransparency = 1
- Frame2.Name = "Stamina"
- Frame2.Parent = Frame1
- Frame2.Position = UDim2.new(0.317999989, 0, 0.899393916, 0)
- Frame2.Size = UDim2.new(0.331917137, 0, 0.0316969417, 0)
- Frame2.BackgroundColor = BrickColor.new("Tr. Flu. Blue")
- Frame2.BackgroundColor3 = Color3.new(0.858824, 0.737255, 1)
- staminabar.Name = "bar"
- staminabar.Parent = Frame2
- staminabar.Size = UDim2.new(1, 0, 1, 0)
- staminabar.BackgroundColor = BrickColor.new("Fire Yellow")
- staminabar.BackgroundColor3 = Color3.new(1, 0.941177, 0.27451)
- staminastat.Name = "stat"
- staminastat.Parent = Frame2
- staminastat.Position = UDim2.new(0.325197548, 0, 0, 0)
- staminastat.Size = UDim2.new(0.5, 0, 1, 0)
- staminastat.BackgroundColor = BrickColor.new("Institutional white")
- staminastat.BackgroundColor3 = Color3.new(1, 1, 1)
- staminastat.BackgroundTransparency = 1
- staminastat.ZIndex = 3
- staminastat.Font = Enum.Font.SourceSans
- staminastat.FontSize = Enum.FontSize.Size24 staminastat.Text = tostring(math.floor(stamina)) .. "/" .. tostring(math.floor(staminamax))
- staminastat.TextColor = BrickColor.new("Institutional white")
- staminastat.TextColor3 = Color3.new(1, 1, 1)
- staminastat.TextSize = 20
- staminastat.TextStrokeTransparency = 0
- staminastat.TextWrap = true
- staminastat.TextWrapped = true
- TextLabel5.Name = "title"
- TextLabel5.Parent = Frame2
- TextLabel5.Position = UDim2.new(0.172155678, 0, 0, 0)
- TextLabel5.Size = UDim2.new(0.5, 0, 1, 0)
- TextLabel5.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel5.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel5.BackgroundTransparency = 1
- TextLabel5.ZIndex = 3
- TextLabel5.Font = Enum.Font.SourceSans
- TextLabel5.FontSize = Enum.FontSize.Size24
- TextLabel5.Text = "Stamina:"
- TextLabel5.TextColor = BrickColor.new("Institutional white")
- TextLabel5.TextColor3 = Color3.new(1, 1, 1)
- TextLabel5.TextSize = 20
- TextLabel5.TextStrokeTransparency = 0
- TextLabel5.TextWrap = true
- TextLabel5.TextWrapped = true
- Frame6.Name = "Health"
- Frame6.Parent = Frame1
- Frame6.Position = UDim2.new(0.317578763, 0, 0.859090745, 0)
- Frame6.Size = UDim2.new(0.332338333, 0, 0.0316969417, 0)
- Frame6.BackgroundColor = BrickColor.new("Persimmon")
- Frame6.BackgroundColor3 = Color3.new(1, 0.25098, 0.262745)
- healthbar.Name = "bar"
- healthbar.Parent = Frame6
- healthbar.Size = UDim2.new(1, 0, 1, 0)
- healthbar.BackgroundColor = BrickColor.new("Bright green")
- healthbar.BackgroundColor3 = Color3.new(0.286275, 1, 0.235294)
- TextLabel8.Name = "title"
- TextLabel8.Parent = Frame6
- TextLabel8.Position = UDim2.new(0.172155678, 0, 0, 0)
- TextLabel8.Size = UDim2.new(0.5, 0, 1, 0)
- TextLabel8.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel8.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel8.BackgroundTransparency = 1
- TextLabel8.ZIndex = 3
- TextLabel8.Font = Enum.Font.SourceSans
- TextLabel8.FontSize = Enum.FontSize.Size24
- TextLabel8.Text = "Health:"
- TextLabel8.TextColor = BrickColor.new("Institutional white")
- TextLabel8.TextColor3 = Color3.new(1, 1, 1)
- TextLabel8.TextSize = 20
- TextLabel8.TextStrokeTransparency = 0
- TextLabel8.TextWrap = true
- TextLabel8.TextWrapped = true
- healthstat.Name = "stat"
- healthstat.Parent = Frame6
- healthstat.Position = UDim2.new(0.325197548, 0, 0, 0)
- healthstat.Size = UDim2.new(0.5, 0, 1, 0)
- healthstat.BackgroundColor = BrickColor.new("Institutional white")
- healthstat.BackgroundColor3 = Color3.new(1, 1, 1)
- healthstat.BackgroundTransparency = 1
- healthstat.ZIndex = 3
- healthstat.Font = Enum.Font.SourceSans
- healthstat.FontSize = Enum.FontSize.Size24
- healthstat.Text = tostring(math.floor(hum.Health)) .. "/" .. tostring(math.floor(hum.MaxHealth))
- healthstat.TextColor = BrickColor.new("Institutional white")
- healthstat.TextColor3 = Color3.new(1, 1, 1)
- healthstat.TextSize = 20
- healthstat.TextStrokeTransparency = 0
- healthstat.TextWrap = true
- healthstat.TextWrapped = true
- Frame10.Name = "Block"
- Frame10.Parent = Frame1
- Frame10.Position = UDim2.new(0.317999989, 0, 0.940303028, 0)
- Frame10.Size = UDim2.new(0.331917137, 0, 0.0316969417, 0)
- Frame10.BackgroundColor = BrickColor.new("Salmon")
- Frame10.BackgroundColor3 = Color3.new(1, 0.647059, 0.619608)
- blockbar.Name = "bar"
- blockbar.Parent = Frame10
- blockbar.Size = UDim2.new(1, 0, 1, 0)
- blockbar.BackgroundColor = BrickColor.new("Carnation pink")
- blockbar.BackgroundColor3 = Color3.new(1, 0.545098, 0.827451)
- blockstat.Name = "stat"
- blockstat.Parent = Frame10
- blockstat.Position = UDim2.new(0.325197548, 0, 0, 0)
- blockstat.Size = UDim2.new(0.5, 0, 1, 0)
- blockstat.BackgroundColor = BrickColor.new("Institutional white")
- blockstat.BackgroundColor3 = Color3.new(1, 1, 1)
- blockstat.BackgroundTransparency = 1
- blockstat.ZIndex = 3
- blockstat.Font = Enum.Font.SourceSans
- blockstat.FontSize = Enum.FontSize.Size24
- blockstat.Text = tostring(math.floor(blockhealth)) .. "/" .. tostring(math.floor(blockhealthmax))
- blockstat.TextColor = BrickColor.new("Institutional white")
- blockstat.TextColor3 = Color3.new(1, 1, 1)
- blockstat.TextSize = 20
- blockstat.TextStrokeTransparency = 0
- blockstat.TextWrap = true
- blockstat.TextWrapped = true
- TextLabel13.Name = "title"
- TextLabel13.Parent = Frame10
- TextLabel13.Position = UDim2.new(0.172155678, 0, 0, 0)
- TextLabel13.Size = UDim2.new(0.5, 0, 1, 0)
- TextLabel13.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel13.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel13.BackgroundTransparency = 1
- TextLabel13.ZIndex = 3
- TextLabel13.Font = Enum.Font.SourceSans
- TextLabel13.FontSize = Enum.FontSize.Size24
- TextLabel13.Text = "Block:"
- TextLabel13.TextColor = BrickColor.new("Institutional white")
- TextLabel13.TextColor3 = Color3.new(1, 1, 1)
- TextLabel13.TextSize = 20
- TextLabel13.TextStrokeTransparency = 0
- TextLabel13.TextWrap = true
- TextLabel13.TextWrapped = true
- return screen,healthbar,healthstat,staminabar,staminastat,blockbar,blockstat
- end
- function raycast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- function knocked()
- local r = false
- if hum.PlatformStand and (15 > hum.Health or hum:FindFirstChild("knocked")) then
- r = true
- end
- return r
- end
- function update()
- healthstat.Text = tostring(math.floor(hum.Health)) .. "/" .. tostring(math.floor(hum.MaxHealth))
- game:GetService("TweenService"):Create(healthbar,TweenInfo.new(.25),{Size = UDim2.new((hum.Health/hum.MaxHealth), 0, 1, 0)}):Play()
- --
- staminastat.Text = tostring(math.floor(stamina)) .. "/" .. tostring(math.floor(staminamax))
- game:GetService("TweenService"):Create(staminabar,TweenInfo.new(.25),{Size = UDim2.new((stamina/staminamax), 0, 1, 0)}):Play()
- --
- blockstat.Text = tostring(math.floor(blockhealth)) .. "/" .. tostring(math.floor(blockhealthmax))
- game:GetService("TweenService"):Create(blockbar,TweenInfo.new(.25),{Size = UDim2.new((blockhealth/blockhealthmax), 0, 1, 0)}):Play()
- end
- hum.HealthChanged:Connect(function(new_health)
- if --[[alive() and]] (last_health > new_health) and blocking2 and not knocked() and (blockhealth >= 25) and not hum:FindFirstChild("Fall Damage") then
- blockhealth = blockhealth - 25
- block_counter = 1
- hum.Health = last_health
- spawn(function()
- local kb = 20
- local b = Instance.new("BodyVelocity")
- b.Parent = torso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*-1*kb + Vector3.new(0,1,0)
- game:GetService("Debris"):AddItem(b,0.1)
- end)
- if dodge_s then
- dodge_s:Play()
- end
- local bp = torso:FindFirstChild("block_p")
- if bp then bp = bp:FindFirstChild("block_p") end
- if not bp then
- local att = Instance.new("Attachment")
- att.Name = 'block_p'
- att.Parent = torso
- bp = Instance.new("ParticleEmitter")
- bp.Name = "block_p"
- bp.Parent = att
- bp.Speed = NumberRange.new(15, 15)
- bp.Color = ColorSequence.new(Color3.new(0.921569, 1, 0.192157),Color3.new(1, 0.972549, 0.666667))
- bp.LightEmission = 1
- bp.Texture = "http://www.roblox.com/asset/?id=271370648"
- bp.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0,1),
- NumberSequenceKeypoint.new(0.1,0.25),
- NumberSequenceKeypoint.new(0.2,0),
- NumberSequenceKeypoint.new(0.5,0),
- NumberSequenceKeypoint.new(0.75,0.35),
- NumberSequenceKeypoint.new(1,1),
- })
- bp.Size = NumberSequence.new({
- NumberSequenceKeypoint.new(0,0.3),
- NumberSequenceKeypoint.new(0.103,0.7),
- NumberSequenceKeypoint.new(1,0),
- })
- bp.Acceleration = Vector3.new(0, 0, 0)
- bp.Lifetime = NumberRange.new(0.35, 0.35)
- bp.Rate = 360
- bp.SpreadAngle = Vector2.new(360,360)
- bp.Speed = NumberRange.new(10,10)
- bp.Rotation = NumberRange.new(90,90)
- end
- spawn(function()
- bp.Enabled = true
- wait(0.1)
- bp.Enabled = false
- end)
- end
- last_health = hum.Health
- end)
- screen,healthbar,healthstat,staminabar,staminastat,blockbar,blockstat = create_gui(plr['PlayerGui'])
- hum.Died:Connect(function()
- if screen then
- screen:Destroy()
- end
- end)
- spawn(function()
- while wait(0.1) do
- if screen then
- update()
- end
- if stamina_counter > 0 then
- stamina_counter = stamina_counter - 0.1
- elseif 0 > stamina_counter then
- stamina_counter = 0
- end
- if block_counter > 0 then
- block_counter = block_counter - 0.1
- elseif 0 > block_counter then
- block_counter = 0
- end
- end
- end)
- spawn(function()
- while wait(0.5) do
- if (0 >= stamina_counter) and (staminamax > stamina) then
- if 0 > stamina then
- stamina = 0
- end
- stamina = stamina + 11
- if (stamina > staminamax) then
- stamina = staminamax
- end
- end
- if (0 >= block_counter) and (blockhealthmax > blockhealth) then
- if (0 > blockhealth) then
- blockhealth = 0
- end
- blockhealth = blockhealth + 15
- if (blockhealth > blockhealthmax) then
- blockhealth = blockhealthmax
- end
- end
- end
- end)
- local footsteps = {
- Fabric = {
- 4085884845,
- 4085885171
- },
- Concrete = {
- 4085860640,
- 4085860959
- },
- Grass = {
- 4085928076,
- 4085927377
- },
- Dirt = {
- 4085928076,
- 4085927377
- },
- Glass = {
- 4085888884,
- 4085889170
- },
- Metal = {
- 4085894561,
- 4085894913
- },
- Rubble = {
- 4085865543,
- 4085865926
- },
- Sand = {
- 4085867669,
- 4085868134
- },
- Snow = {
- 4085886274,
- 4085886651
- },
- Water = {
- 4085887687,
- 4085888023
- },
- Wood = {
- 4085869219,
- 4085869581
- },
- Stone = {
- 3744398825,
- 3744399210,
- 3744399642,
- 3744399949
- }
- };
- local referenceChart = {
- [Enum.Material.Plastic]="Fabric",
- [Enum.Material.Grass]="Grass",
- [Enum.Material.Pebble]="Rubble",
- [Enum.Material.Metal]="Metal",
- [Enum.Material.Ice]="Ice",
- [Enum.Material.Grass]="Grass",
- [Enum.Material.Concrete]="Concrete",
- [Enum.Material.Marble]="Concrete",
- [Enum.Material.Wood]="Wood",
- [Enum.Material.WoodPlanks]="Wood",
- [Enum.Material.Sand]="Sand",
- [Enum.Material.Glass]="Glass",
- [Enum.Material.ForceField]="Glass",
- [Enum.Material.Neon]="Glass",
- [Enum.Material.Fabric]="Fabric",
- [Enum.Material.DiamondPlate]="Metal",
- [Enum.Material.CorrodedMetal]="Metal",
- [Enum.Material.Slate]="Stone"
- };
- local step_s = Instance.new("Sound");
- step_s.Parent = rootpart;
- step_s.Volume = 1;
- step_s.Name = "FootSteps";
- local material = "Stone";
- local walking = false;
- local walkTick = tick();
- local function play()
- if (walking and footsteps[material]) then
- step_s.SoundId = "rbxassetid://" .. footsteps[material][math.random(1, #footsteps[material])];
- step_s:Play();
- else
- step_s:Stop();
- end
- end
- local falldamage = Instance.new("Sound")
- falldamage.SoundId = 'rbxassetid://535681058'
- falldamage.Volume = 2
- falldamage.Parent = torso
- local fallremote = Instance.new("RemoteEvent")
- fallremote.Name = 'fallremote'
- fallremote.Parent = char
- fallremote.OnServerEvent:Connect(function(player,mag,hum)
- local fallval = Instance.new("ObjectValue")
- fallval.Name = 'Fall Damage'
- fallval.Parent = hum
- local tempdmg = ((hum.MaxHealth/100)*mag)
- hum:TakeDamage(tempdmg)
- if not alive() and not hum:FindFirstChild("Ragdolled") then
- bone_crack.SoundId = 'rbxassetid://' .. bonecracks[math.random(1,#bonecracks)]
- bone_crack:Play()
- local tempkillval = Instance.new("ObjectValue")
- tempkillval.Name = 'killer'
- tempkillval.Value = nil -- plr
- tempkillval.Parent = hum
- hum:TakeDamage(1/0)
- local ragval = Instance.new("ObjectValue")
- ragval.Name = 'Ragdolled'
- ragval.Parent = hum
- hum.AutoRotate = false
- Ragdoll(char,false,true,true)
- end
- game:GetService("Debris"):AddItem(fallval,0.1)
- if mag < 14 then
- falldamage.SoundId = "rbxassetid://4057626616"
- falldamage:Play()
- elseif mag >= 14 then
- falldamage.SoundId = "rbxassetid://535681058"
- falldamage:Play()
- if not hum:FindFirstChild("knocked") then
- knock = Instance.new("ObjectValue")
- knock.Name = 'knocked'
- knock.Parent = hum
- game:GetService("Debris"):AddItem(knock,2)
- end
- --[[spawn(function()
- local kb = 15
- local b = Instance.new("BodyVelocity")
- b.Parent = torso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = rootpart.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)]]
- if alive() then
- spawn(function()
- if (knock and knock.Parent) and hum.Health > 0 and not hum:FindFirstChild("Ragdolled") then
- local ragval = Instance.new("ObjectValue")
- ragval.Name = 'Ragdolled'
- ragval.Parent = hum
- local collision_limbs = {}
- for i,v in pairs(char:GetChildren()) do
- local limbs = limb_collide(v)
- if limbs then
- for i,limb in pairs(limbs) do
- table.insert(collision_limbs,1,limb)
- end
- end
- end
- local js,js2 = Ragdoll(char,false,true)
- local ar = hum.AutoRotate
- hum.AutoRotate = false
- while (15 >= hum.Health or (knock and knock.Parent)) and hum.Health > 0 do
- hum.PlatformStand = true
- wait(0.1)
- end
- for i,v in pairs(js) do v:Destroy(); end;
- for i,v in pairs(js2) do v.obj.Parent = v.par; end;
- for i,v in pairs(collision_limbs) do v:Destroy(); end;
- if hum and 0 >= hum.Health then
- Ragdoll(char,false,true,true)
- return;
- end;
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("BasePart") or v:IsA("UnionOperation") then
- v:SetPartCollisionGroup(v, "Default")
- end
- end
- if ar then
- hum.AutoRotate = true
- end
- ragval:Destroy()
- hum.Sit = false
- hum.PlatformStand = false
- hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- torso.Velocity = Vector3.new()
- end
- end)
- end
- end
- end)
- NLS([[
- player = game:GetService("Players").LocalPlayer
- mouse = player:GetMouse()
- repeat wait() until player.Character
- char = player.Character
- repeat wait() until char:FindFirstChildOfClass("Humanoid")
- repeat wait() until char.Head.Anchored == false
- hum = char:FindFirstChildOfClass("Humanoid")
- fallremote = script.Parent
- pos = Vector3.new()
- isFalling = false
- hum.FreeFalling:Connect(function()
- if not char:FindFirstChild("fallblock") then
- local e = Instance.new("Part")
- e.Name = "fallblock"
- e.Anchored = true
- e.CanCollide = false
- e.Massless = true
- e.Size = Vector3.new()
- e.Transparency = 1
- e.Parent = char
- e.Position = char.Torso.Position
- pos = e.Position
- elseif char:FindFirstChild("fallblock") then
- pos = char.fallblock.Position
- end
- end)
- hum.Climbing:Connect(function()
- isFalling = false
- pos = Vector3.new()
- end)
- hum.StateChanged:Connect(function(state)
- if state == Enum.HumanoidStateType.Landed then
- if char:FindFirstChild("fallblock") then
- char.fallblock:Destroy()
- end
- local mag = math.abs(pos.Y - char.Torso.Position.Y)
- pos = Vector3.new()
- if mag >= 8 then
- fallremote:FireServer(mag,hum)
- end
- elseif state == Enum.HumanoidStateType.Climbing then
- pos = Vector3.new()
- isFalling = false
- end
- end)
- ]],fallremote)
- hum.Changed:Connect(function(prop)
- if (prop == "MoveDirection") and equipped then
- if (hum.Sit == false and hum.PlatformStand == false and hum.MoveDirection.Magnitude > 0) then
- if (walking == false) then
- walking = true;
- walkTick = tick();
- local walkTickN = walkTick;
- while (walking and walkTick == walkTickN) do
- local ray = Ray.new(rootpart.Position, Vector3.new(0, -5, 0));
- local part = workspace:FindPartOnRay(ray, char);
- if (part) then
- (function()
- if (part.Material == Enum.Material.Grass and part.Color.g < .5) then
- material = "Dirt";
- return;
- end
- if (part.Material == Enum.Material.Sand and part.Color.r > .5 and part.Color.g > .5 and part.Color.b > .5) then
- material = "Snow";
- return;
- end
- material = referenceChart[part.Material] or "Air";
- end)()
- else
- material = "Air";
- end
- play();
- if anim == 'crouch' and crouching then
- wait(0.6)
- elseif anim == 'run' and not crouching then
- wait(0.2);
- else
- wait(0.4);
- end
- end
- end
- else
- walking = false;
- end
- end
- if (prop == "Sit") and equipped then
- if (hum.Sit) then
- walking = false;
- end
- end
- end)
- remote.OnServerEvent:Connect(function(lplr,mode,mode2)
- if alive() and equipped and (plr == lplr) then else return end
- if mode == 1 and fists and not toggling_dance then
- blocking = mode2
- dance(false)
- if not knocked() and blocking and (blockhealth >= 25) then
- _blockingval.Parent = hum;
- else
- _blockingval.Parent = nil;
- end;
- elseif mode == 2 and not toggling_dance then
- sprinting = mode2
- elseif mode == 3 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and fists and not knocked() and not toggling_dance and not blocking2 and (anim ~= 'run') and (stamina >= 7) then else return end
- attacking = true
- dance(false)
- hit_id = hit_id + 1
- stamina_counter = 1
- if not jumping then
- if pa == 1 then
- left_punch(0.7,hit_id)
- elseif pa == 2 then
- right_punch(0.7,hit_id)
- end
- elseif jumping then
- if (stamina >= 10) then
- air_punch(0.7,hit_id)
- else
- if pa == 1 then
- left_punch(0.7,hit_id)
- elseif pa == 2 then
- right_punch(0.7,hit_id)
- end
- end
- end
- pa = pa + 1
- if pa > 2 then
- pa = 1
- end
- attacking = false
- elseif mode == 4 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and fists and not knocked() and not crouching and not toggling_dance and not blocking2 and (anim ~= 'run') and (stamina >= 13) then else return end
- attacking = true
- dance(false)
- hit_id = hit_id + 1
- stamina_counter = 1
- if not jumping then
- if ka == 1 then
- left_kick(0.7,hit_id)
- elseif ka == 2 then
- right_kick(0.7,hit_id)
- end
- ka = ka + 1
- if ka > 2 then
- ka = 1
- end
- elseif jumping then
- if (stamina >= 15) then
- if lka == 1 then
- left_low_kick(0.6,hit_id)
- elseif lka == 2 then
- right_low_kick(0.6,hit_id)
- end
- lka = lka + 1
- if lka > 2 then
- lka = 1
- end
- else
- if ka == 1 then
- left_kick(0.7,hit_id)
- elseif ka == 2 then
- right_kick(0.7,hit_id)
- end
- ka = ka + 1
- if ka > 2 then
- ka = 1
- end
- end
- end
- attacking = false
- elseif mode == 5 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and fists and not finishing and not knocked() and not crouching and not toggling_dance and not blocking2 and (anim ~= 'run') then else return end
- attacking = true
- attacking2 = true
- dance(false)
- hit_id = hit_id + 1
- stamina_counter = 1
- stomp(0.5,hit_id)
- attacking2 = false
- attacking = false
- elseif mode == 6 then
- if not toggling_dance then else return end
- crouching = mode2
- dance(false)
- elseif mode == 7 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and fists and not knocked() and not toggling_dance and not blocking2 and (anim ~= 'run') and (stamina >= 20) then else return end
- attacking = true
- attacking2 = true
- dance(false)
- if not jumping then
- hit_id = hit_id + 1
- stamina_counter = 1
- if hka == 1 then
- left_high_kick(0.6,hit_id)
- elseif hka == 2 then
- right_high_kick(0.6,hit_id)
- end
- hka = hka + 1
- if hka > 2 then
- hka = 1
- end
- end
- attacking2 = false
- attacking = false
- elseif mode == 8 then
- if not attacking and not carrying and not finishing and not knocked() and not toggling_dance then else return end
- fists = not fists
- blocking = false
- blocking2 = false
- elseif mode == 9 then
- last_mpos = mode2
- elseif mode == 10 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and fists and not knocked() and not toggling_dance and not blocking2 and (anim ~= 'run') and (stamina >= 10) then else return end
- attacking = true
- attacking2 = true
- dance(false)
- if not jumping then
- hit_id = hit_id + 1
- stamina_counter = 1
- if sa == 1 then
- left_sweep(0.5,hit_id)
- elseif sa == 2 then
- right_sweep(0.5,hit_id)
- end
- sa = sa + 1
- if sa > 2 then
- sa = 1
- end
- end
- attacking2 = false
- attacking = false
- elseif mode == 11 and not hum:FindFirstChild("Stunned") then
- if not attacking and not carrying and not attacking2 and not knocked() and not toggling_dance and (anim == 'idle' or anim == 'crouch') then else return end
- dance(true)
- elseif mode == 12 and not hum:FindFirstChild("Stunned") then
- if not attacking and not attacking2 and not knocked() and not toggling_dance then else return end
- if mode2 == true then
- carry(0.6)
- elseif mode2 == false then
- carrying = false
- end
- end
- end)
- NLS([[
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- local mouse = plr:GetMouse()
- local remote = script.Parent
- mouse.KeyDown:Connect(function(key)
- if key == 'f' then
- remote:FireServer(1,true)
- elseif key == '2' then
- remote:FireServer(2,true)
- elseif key == 'e' then
- remote:FireServer(4,true)
- elseif key == 'r' then
- remote:FireServer(5,true)
- elseif key == 'c' then
- remote:FireServer(6,true)
- elseif key == 'g' then
- remote:FireServer(7,true)
- elseif key == 'q' then
- remote:FireServer(8,true)
- elseif key == 'v' then
- remote:FireServer(10,true)
- elseif key == 'b' then
- remote:FireServer(11,true)
- elseif key == 't' then
- remote:FireServer(12,true)
- end
- end)
- mouse.KeyUp:Connect(function(key)
- if key == 'f' then
- remote:FireServer(1,false)
- elseif key == '2' then
- remote:FireServer(2,false)
- elseif key == 'c' then
- remote:FireServer(6,false)
- elseif key == 't' then
- remote:FireServer(12,false)
- end
- end)
- mouse.Button1Down:Connect(function()
- remote:FireServer(3,true)
- end)
- mouse.Button1Down:Connect(function()
- remote:FireServer(3,false)
- end)
- function SetCharacterLocalTransparency(transparency)
- for i,v in pairs(char:GetChildren()) do
- if (v:IsA("BasePart") and v.Name ~= 'HumanoidRootPart' and v.Name ~= 'Torso' and v.Name ~= 'Head') then
- v.LocalTransparencyModifier = transparency
- end
- end
- end
- game:GetService("RunService").RenderStepped:Connect(function()
- --remote:FireServer(9,mouse.Hit.p)
- SetCharacterLocalTransparency(0);
- end)
- ]],remote)
- warn[[
- = KrY's Combat Loaded =
- = Controls =
- - Click to attack
- - Q to Toggle Fists
- - F to Block
- - E to Kick
- - V to Leg Sweep
- - G to High Kick
- - R to Finish/Stomp
- - T to Carry(Hold)
- - B to Dance/Taunt
- - C to Crouch
- - Ctrl to Sprint
- = Alt Attack Variations =
- - Punch(Click) while jumping
- - Kick(E) while jumping
- ]]
- game:GetService("RunService").Heartbeat:Connect(function()
- if alive() and equipped then else
- attacking = false;
- attacking2 = false;
- crouching = false;
- falling = false;
- sprinting = false;
- sprinting2 = false;
- blocking = false;
- blocking2 = false;
- carrying = false;
- _blockingval.Parent = nil;
- step_s:Stop()
- return;
- end;
- sine = sine+0.1
- local bodyvel = (rootpart.Velocity*Vector3.new(1,0,1)).magnitude
- local fallvel = rootpart.Velocity.y
- local hitfloor,posfloor=raycast(rootpart.Position,(CFrame.new(rootpart.Position,rootpart.Position - Vector3.new(0,1,0))).lookVector,4,{script,char})
- local rightvector = (rootpart.Velocity * rootpart.CFrame.rightVector).X + (rootpart.Velocity * rootpart.CFrame.rightVector).Z
- local lookvector = (rootpart.Velocity * rootpart.CFrame.lookVector).X + (rootpart.Velocity * rootpart.CFrame.lookVector).Z
- if not attacking2 and sprinting and not crouching and stamina >= 0.1 then
- sprinting2 = true
- hum.WalkSpeed = 24
- elseif not attacking2 and not crouching then
- sprinting2 = false
- hum.WalkSpeed = 16
- elseif not attacking2 and crouching then
- sprinting2 = false
- hum.WalkSpeed = 8
- end
- local speed_val = hum.WalkSpeed/10
- if 0.8 >= speed_val then
- speed_val = 0.8
- elseif speed_val > 2 then
- speed_val = 2
- end
- if not hitfloor then
- jumping = true
- else
- jumping = false
- end
- if knocked() or not alive() then
- carrying = false
- end
- if knocked() or carrying or not blocking or (25 > blockhealth) then
- blocking2 = false
- _blockingval.Parent = nil
- end
- if not hitfloor and ((fallvel > 1) or (fallvel < -1)) then
- falling = true
- else
- falling = false
- end
- if lookvector > hum.WalkSpeed then
- lookvector = hum.WalkSpeed
- end
- if lookvector < -hum.WalkSpeed then
- lookvector = -hum.WalkSpeed
- end
- if rightvector > hum.WalkSpeed then
- rightvector = hum.WalkSpeed
- end
- if rightvector < -hum.WalkSpeed then
- rightvector = -hum.WalkSpeed
- end
- local lookvel = lookvector / hum.WalkSpeed
- local rightvel = rightvector / hum.WalkSpeed
- local lookvel2 = lookvel
- if lookvel2 > 0 then
- lookvel2 = 1
- elseif lookvel2 < 0 then
- lookvel2 = -1
- end
- if hum:FindFirstChild("Stunned") then
- blocking2 = false
- _blockingval.Parent = nil
- dance(false)
- hum.WalkSpeed = 0
- change_stun_type()
- local _anim_speed = anim_speed*1.5
- if stun_type == 1 then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),_anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(10),math.rad(0),math.rad(10)),_anim_speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),_anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(-55)),_anim_speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),_anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(5),math.rad(25)),_anim_speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),_anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5)),_anim_speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),_anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15)),_anim_speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),_anim_speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(0)),_anim_speed)
- elseif stun_type == 2 then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),_anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(5),math.rad(0),math.rad(55)),_anim_speed)
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),_anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(10),math.rad(0),math.rad(-10)),_anim_speed)
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),_anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(5),math.rad(-25)),_anim_speed)
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),_anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(15)),_anim_speed)
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),_anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5)),_anim_speed)
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),_anim_speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.Angles(math.rad(15),math.rad(0),math.rad(0)),_anim_speed)
- end
- return
- end
- if anim ~= 'run' and not knocked() and not dancing and fists then
- if not blocking2 then
- if enabled[ls] then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.new(-0.2,-0.1,0.2)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(120)),anim_speed)
- end
- if enabled[rs] then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.new(0.2,-0.1,0.2)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-120)),anim_speed)
- end
- elseif blocking2 then
- if enabled[ls] then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.new(-0.8,0.2,0.9)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(170)),anim_speed)
- end
- if enabled[rs] then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.new(0.8,0.2,0.9)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-170)),anim_speed)
- end
- end
- end
- if (fallvel > 1) and falling and not knocked() then
- dance(false)
- anim = 'jump'
- if blocking and not carrying and not knocked() and (blockhealth >= 25) then
- blocking2 = blocking
- _blockingval.Parent = hum
- end
- if enabled[rh] then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(15))*CFrame.new(-0.5,-0.7,0),anim_speed)
- end
- if enabled[lh] then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-15))*CFrame.new(0.5,-0.7,0),anim_speed)
- end
- elseif (fallvel < -1) and falling and not knocked() then
- anim = 'fall'
- if blocking and not carrying and not knocked() and (blockhealth >= 25) then
- blocking2 = blocking
- _blockingval.Parent = hum
- end
- if enabled[rh] then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-5))*CFrame.new(-0.3,0,0),anim_speed)
- end
- if enabled[lh] then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(5))*CFrame.new(0.3,0,0),anim_speed)
- end
- end
- if bodyvel >= 1 then
- dance(false)
- end
- if crouching and not knocked() then
- anim = 'crouch'
- if blocking and not carrying and not knocked() and (blockhealth >= 25) then
- blocking2 = blocking
- _blockingval.Parent = hum
- end
- if enabled[ls] and not fists then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-1 * math.cos(sine*speed_val)),0,math.rad(-1 * math.cos(sine*speed_val))),anim_speed)
- end
- if enabled[rs] and not fists then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(1 * math.cos(sine*speed_val)),0,math.rad(-1 * math.cos(sine*speed_val))),anim_speed)
- end
- if enabled[neck] then
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- end
- if enabled[rh] and not falling then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*CFrame.new(-0.5,-1,0),anim_speed)
- end
- if enabled[lh] and not falling then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-75))*CFrame.new(0.5,0.2,0),anim_speed)
- end
- if enabled[rj] then
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.new(0,0,-1),anim_speed)
- end
- end
- if 0 >= bodyvel and not crouching then
- anim = 'idle'
- if blocking and not carrying and not knocked() and (blockhealth >= 25) then
- blocking2 = blocking
- _blockingval.Parent = hum
- end
- if enabled[ls] and not fists then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-1 * math.cos(sine*speed_val)),0,math.rad(-1 * math.cos(sine*speed_val))),anim_speed)
- end
- if enabled[rs] and not fists then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(1 * math.cos(sine*speed_val)),0,math.rad(-1 * math.cos(sine*speed_val))),anim_speed)
- end
- if enabled[neck] then
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- end
- if enabled[rh] and not falling then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.new(0,-0.01 * math.cos(sine*speed_val),0),anim_speed)
- end
- if enabled[lh] and not falling then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.new(0,-0.01 * math.cos(sine*speed_val),0),anim_speed)
- end
- if enabled[rj] then
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.new(0,0,-0.01 * math.cos(sine*speed_val)),anim_speed)
- end
- elseif bodyvel >= 1 and not knocked() then
- if sprinting2 and not crouching then
- anim = 'run'
- blocking2 = false
- _blockingval.Parent = nil
- stamina = stamina - 0.1
- stamina_counter = 1
- if enabled[ls] then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(lookvel*-15 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*80 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*-0.1 + 0.2 * math.cos(sine*speed_val),0,0),anim_speed)
- end
- if enabled[rs] then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(lookvel*15 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*80 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*0.1 - 0.2 * math.cos(sine*speed_val),0,0),anim_speed)
- end
- if enabled[neck] then
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- end
- if enabled[rh] and not falling then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(rightvel*-2 + 4 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2 * -75 * math.sin(sine*speed_val)))*CFrame.new(lookvel2 * -0.3 + 0.6 * math.cos(sine*speed_val),lookvel2 * 0.2 - 0.4 * math.sin(sine*speed_val),0),anim_speed)
- end
- if enabled[lh] and not falling then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(rightvel*-2 - 4 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2 * -75 * math.sin(sine*speed_val)))*CFrame.new(lookvel2 * -0.3 + 0.6 * math.cos(sine*speed_val),lookvel2 * 0.2 + 0.4 * math.sin(sine*speed_val),0),anim_speed)
- end
- if enabled[rj] then
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.new(0,0,-0.02+(0.02 * math.sin(sine*1.5*speed_val)))*CFrame.Angles(math.rad(lookvel*-15),math.rad(rightvel*-4),math.rad(0)),anim_speed)
- end
- else
- if not crouching then
- anim = 'walk'
- end
- if blocking and not carrying and not knocked() and (blockhealth >= 25) then
- blocking2 = blocking
- _blockingval.Parent = hum
- end
- if enabled[ls] and not fists then
- if not crouching then
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(lookvel*-7.5 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*40 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*-0.05 + 0.1 * math.cos(sine*speed_val),0,0),anim_speed)
- else
- ls.C0 = clerp(ls.C0,CFrame.new(-1,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- ls.C1 = clerp(ls.C1,CFrame.new(.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-4 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel*20 * math.sin(sine*speed_val)))*CFrame.new(-0.025 * math.cos(sine*speed_val),0,0),anim_speed)
- end
- end
- if enabled[rs] and not fists then
- if not crouching then
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(lookvel*7.5 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*40 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*0.05 - 0.1 * math.cos(sine*speed_val),0,0),anim_speed)
- else
- rs.C0 = clerp(rs.C0,CFrame.new(1,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rs.C1 = clerp(rs.C1,CFrame.new(-.5,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(4 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel*20 * math.sin(sine*speed_val)))*CFrame.new(0.025 * math.cos(sine*speed_val),0,0),anim_speed)
- end
- end
- if enabled[neck] and not crouching then
- neck.C0 = clerp(neck.C0,CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- neck.C1 = clerp(neck.C1,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- end
- if enabled[rh] and not falling then
- if not crouching then
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(-1 + 2 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2 * -30 * math.sin(sine*speed_val)))*CFrame.new(lookvel2 * -0.1 + 0.2 * math.cos(sine*speed_val),lookvel2 * 0.1 - 0.2 * math.sin(sine*speed_val),0),anim_speed)
- else
- rh.C0 = clerp(rh.C0,CFrame.new(1,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),anim_speed)
- rh.C1 = clerp(rh.C1,CFrame.new(.5,1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*CFrame.new(-0.5,-1,0)*CFrame.Angles(math.rad(rightvel*-0.5 + 1 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*-15 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*-0.025 + 0.05 * math.cos(sine*speed_val),lookvel2*0.025 - 0.05 * math.cos(sine*speed_val),0),anim_speed)
- end
- end
- if enabled[lh] and not falling then
- if not crouching then
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(-1 - 2 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2 * -30 * math.sin(sine*speed_val)))*CFrame.new(lookvel2 * -0.1 + 0.2 * math.cos(sine*speed_val),lookvel2 * 0.1 + 0.2 * math.sin(sine*speed_val),0),anim_speed)
- else
- lh.C0 = clerp(lh.C0,CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),anim_speed)
- lh.C1 = clerp(lh.C1,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-75))*CFrame.new(0.5,0.2,0)*CFrame.Angles(math.rad(rightvel*-0.5 - 1 * math.sin(sine*speed_val)),math.rad(0),math.rad(lookvel2*-15 * math.sin(sine*speed_val)))*CFrame.new(lookvel2*0.025 + 0.05 * math.cos(sine*speed_val),lookvel2*-0.025 + 0.05 * math.cos(sine*speed_val),0),anim_speed)
- end
- end
- if enabled[rj] then
- rj.C0 = clerp(rj.C0,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0)),anim_speed)
- if not crouching then
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.new(0,0,-0.025+(0.025 * math.sin(sine*1.5*speed_val)))*CFrame.Angles(math.rad(lookvel*-5),math.rad(rightvel*-2),math.rad(0)),anim_speed)
- else
- rj.C1 = clerp(rj.C1,CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),math.rad(0))*CFrame.new(0,0,-1+(-0.025+(0.025 * math.sin(sine*speed_val))))*CFrame.Angles(math.rad(lookvel*-1),math.rad(rightvel*-0.4),math.rad(0)),anim_speed)
- end
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment