Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function give()
- local function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- local cors = {}
- local mas = Instance.new("Model",game:GetService("Lighting"))
- local Script0 = Instance.new("Script")
- local Script1 = Instance.new("Script")
- local Script2 = Instance.new("Script")
- local Script3 = Instance.new("Script")
- Script0.Name = "Baseball Bat"
- Script0.Parent = mas
- table.insert(cors,sandbox(Script0,function()
- local Tool = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- Tool.Name = "Baseball Bat"
- Tool.Parent = owner['Backpack']
- Tool.TextureId = "rbxassetid://131768781"
- Tool.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Handle.Name = "Handle"
- Handle.Parent = Tool
- Handle.Position = Vector3.new()
- Handle.Size = Vector3.new(1.2, 1.2, 5.53)
- Handle.Material = Enum.Material.Wood
- Handle.CanCollide = false
- Handle.Massless = true
- SpecialMesh3.Parent = Handle
- SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=54983181 "
- SpecialMesh3.Scale = Vector3.new(2, 2, 2)
- SpecialMesh3.TextureId = "http://www.roblox.com/asset/?id=54983107"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- local a1,a2,Trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = Handle
- a1.Position = Vector3.new(0, 0, -2.765)
- a2.Parent = Handle
- a2.Position = Vector3.new(0, 0, 2.765)
- Trail.Parent = Handle
- Trail.Attachment0 = a1
- Trail.Attachment1 = a2
- Trail.LightInfluence = 1
- Trail.Transparency = NumberSequence.new(0.5,1)
- Trail.Lifetime = 1
- Trail.Enabled = false
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local r = game:service("RunService")
- local damage = math.random(25,30)
- local last_attack = 0
- local animval = 1
- local attacking = false
- local damaging = false
- local equipping = false
- local finishing = false
- local bleeding = false
- local FinishSound = Instance.new("Sound")
- FinishSound.SoundId = "rbxassetid://3781479909"
- FinishSound.Parent = Handle
- FinishSound.Volume = .6
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "rbxassetid://175024455"
- HitSound.Parent = Handle
- HitSound.Volume = .6
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxassetid://169285411"
- SlashSound.Parent = Handle
- SlashSound.Volume = .6
- local equip = Instance.new("Sound")
- equip.SoundId = "rbxassetid://2706199011"
- equip.Parent = Handle
- equip.Volume = 1
- local anims = {33169596,204062532,218504594,184574340}
- local idleanimation = Instance.new("Animation")
- idleanimation.AnimationId = "rbxassetid://1323180718"
- local idleanim = hum:LoadAnimation(idleanimation)
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://" .. anims[math.random(1,#anims)]
- local swinganim = hum:LoadAnimation(animation)
- function bleed(p)
- bleeding = true
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Name = "Blood"
- ParticleEmitter0.Parent = p
- ParticleEmitter0.Speed = NumberRange.new(5, 10)
- ParticleEmitter0.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 0.40000000596046
- ParticleEmitter0.LightInfluence = 1
- ParticleEmitter0.Texture = "rbxassetid://73547327"
- ParticleEmitter0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- ParticleEmitter0.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter0.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 1000
- ParticleEmitter0.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter0.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter0.VelocitySpread = 360
- ParticleEmitter1.Name = "Blood2"
- ParticleEmitter1.Parent = p
- ParticleEmitter1.Speed = NumberRange.new(5, 14)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 0.20000000298023
- ParticleEmitter1.LightInfluence = 1
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=134531274"
- ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0.12499988079071,0)
- ParticleEmitter1.Acceleration = Vector3.new(0, -20, 0)
- ParticleEmitter1.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter1.Lifetime = NumberRange.new(0.5, 1.5)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 1000
- ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter1.VelocitySpread = 360
- ParticleEmitter2.Name = "Blood3"
- ParticleEmitter2.Parent = p
- ParticleEmitter2.Speed = NumberRange.new(3, 7)
- ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- ParticleEmitter2.Enabled = false
- ParticleEmitter2.LightEmission = 0.20000000298023
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://241779220"
- ParticleEmitter2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- ParticleEmitter2.ZOffset = 0.5
- ParticleEmitter2.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter2.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter2.Lifetime = NumberRange.new(0.40000000596046, 1)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 1000
- ParticleEmitter2.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter2.VelocitySpread = 360
- ParticleEmitter0.Enabled = true
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- spawn(function()
- game:GetService("Debris"):AddItem(ParticleEmitter0,1)
- game:GetService("Debris"):AddItem(ParticleEmitter1,1)
- game:GetService("Debris"):AddItem(ParticleEmitter2,1)
- wait(.1)
- ParticleEmitter0.Enabled = false
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- bleeding = false
- end)
- end
- function Ragdoll(targchar)
- local pc = targchar
- for _,obj in pairs(pc:GetChildren()) do
- if obj:IsA("Tool") then
- obj:Destroy()
- end
- end
- targchar.ChildAdded:Connect(function(obj)
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- 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
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",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",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",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",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",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",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",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",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",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",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",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",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",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",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",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- function blow(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit")
- game:GetService("Debris"):AddItem(temphitval,.7)
- local tempdamage = damage
- if damage > targhum.Health and targhum.Health > 10 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > damage then
- targhum:TakeDamage(tempdamage)
- end
- if not bleeding then
- bleed(targtorso)
- end
- wait()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- end
- if targchar and targhum and targhum ~= hum and hum and not killval and not finishval and attacking and damaging then
- spawn(function()
- if 10 > targhum.Health then
- while 10 > targhum.Health do
- if 10 > targhum.Health then
- targhum.PlatformStand = true
- end
- wait(.1)
- end
- else
- for i = 0,1.5,.1 do
- targhum.PlatformStand = true
- wait(.1)
- end
- end
- targhum.PlatformStand = false
- end)
- end
- end
- function attack()
- damage = math.random(25,30)
- SlashSound.PlaybackSpeed = math.random(95,105)/100
- SlashSound:play()
- animval = animval + 1
- if animval > 3 then animval = 1 end
- animation.AnimationId = "rbxassetid://" .. anims[animval]
- swinganim = hum:LoadAnimation(animation)
- if animval == 1 then
- swinganim:Play(.05,1,1) -- front swing
- elseif animval == 2 then
- Tool.Grip = CFrame.new(-0.0223260075, 0.0523529053, -1.89661765, 0, 0.999803424, -0.0198284388, 0.852713764, 0.0103579508, 0.522275805, 0.522378504, -0.0169079825, -0.852546155)
- swinganim:Play(.04,1,1.2) -- left swing
- elseif animval == 3 then
- Tool.Grip = CFrame.new(-0.0223260075, 0.0523529053, -1.89661765, 0, 0.999803424, -0.0198284388, 0.852713764, 0.0103579508, 0.522275805, 0.522378504, -0.0169079825, -0.852546155)
- swinganim:Play(.04,1,1) -- right swing
- end
- end
- function Activated()
- if hum.PlatformStand or attacking or finishing or equipping or not char or not hum or not torso or hum.PlatformStand or torso.Anchored or 0 >= hum.Health then return end
- attacking = true
- local finishregion = Region3.new(torso.Position-(Vector3.new(1.5, 6, 1.5)/2),torso.Position+(Vector3.new(1.5, -3, 1.5)/2))
- local targchar,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if obj.Parent ~= char then
- local tempchar,temphum
- pcall(function()
- tempchar = obj.Parent
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temphum and not temphum:FindFirstChild("hit with melee") and temphum.Health > 0 and 10 > temphum.Health and temphum.PlatformStand then
- targchar = tempchar
- targhum = temphum
- end
- end
- end
- if targchar and targhum and not targhum:FindFirstChild("hit with melee") and targhum.Health > 0 and 10 > targhum.Health and targhum.PlatformStand then
- pcall(function()
- finish(targchar)
- end)
- else
- pcall(function()
- attack()
- end)
- Trail.Enabled = true
- damaging = true
- wait(.7)
- end
- damaging = false
- Tool.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- damage = math.random(25,30)
- hum.WalkSpeed = 16
- Trail.Enabled = false
- attacking = false
- end
- function finish(targchar)
- if finishing or equipping or not char or not hum then return end
- local finishingval = Instance.new("ObjectValue",hum)
- finishingval.Name = "finishing"
- local targtorso,targhum,killval,finishval
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if finishval then finishingval:Destroy() return end
- finishing = true
- animation.AnimationId = "rbxassetid://" .. anims[#anims]
- swinganim = hum:LoadAnimation(animation)
- targtorso.Anchored = true
- hum.WalkSpeed = 0
- swinganim:Play(.1,1,1)
- Trail.Enabled = true
- wait(.9)
- Tool.Grip = CFrame.new(0.0747570097, 0.105259255, -2.29442072, -0.00690278085, 0.994355798, -0.10587208, 0.996230125, 0.0159939751, 0.0852627456, 0.086474821, -0.104884408, -0.99071759)
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- targtorso.Anchored = false
- FinishSound:Play()
- if not bleeding then
- bleed(targtorso)
- end
- end
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- wait(1.2)
- Trail.Enabled = false
- swinganim:Stop()
- hum.WalkSpeed = 16
- Tool.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- damage = math.random(25,30)
- finishingval:Destroy()
- finishing = false
- end
- function CheckIfAlive()
- 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 equip_anim()
- for i = 0,15 do
- Tool.Grip = Tool.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- wait(0)
- end
- end
- function Equipped()
- if attacking or finishing or equipping then return end
- char = Tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- swinganim = hum:LoadAnimation(animation)
- idleanim = hum:LoadAnimation(idleanimation)
- if not CheckIfAlive() then Tool.Parent = nil return end
- equipped = true
- equipping = true
- idleanim:Play()
- equip:play()
- --equip_anim()
- equipping = false
- end
- function Unequipped()
- equipped = false
- swinganim:Stop()
- idleanim:Stop()
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Handle.Touched:Connect(blow)
- end))
- Script1.Name = "Katana"
- Script1.Parent = mas
- table.insert(cors,sandbox(Script1,function()
- local Tool = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- Tool.Name = "Katana"
- Tool.Parent = owner['Backpack']
- Tool.TextureId = "rbxassetid://193892385"
- Tool.Grip = CFrame.new(1.31134158e-07, -0.0329501629, 1.95680952, 1, -8.74227766e-08, -4.37113883e-08, 4.37113883e-08, -3.82137093e-15, 1, -8.74227766e-08, -1, 0)
- Handle.Name = "Handle"
- Handle.Parent = Tool
- Handle.Position = Vector3.new()
- Handle.Size = Vector3.new(0.66, 0.8, 5.57)
- Handle.Material = Enum.Material.Metal
- Handle.CanCollide = false
- Handle.Massless = true
- SpecialMesh3.Parent = Handle
- SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=157152278"
- SpecialMesh3.Scale = Vector3.new(1, 1, 0.9)
- SpecialMesh3.TextureId = "http://www.roblox.com/asset/?id=290307814"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- local a1,a2,Trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = Handle
- a1.Position = Vector3.new(0, 0.07, -2.74)
- a2.Parent = Handle
- a2.Position = Vector3.new(0, -0.17, 1.04)
- Trail.Parent = Handle
- Trail.Attachment0 = a1
- Trail.Attachment1 = a2
- Trail.LightInfluence = 1
- Trail.Transparency = NumberSequence.new(0.5,1)
- Trail.Lifetime = 1
- Trail.Enabled = false
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local r = game:service("RunService")
- local damage = math.random(30,35)
- local last_attack = 0
- local animval = 1
- local attacking = false
- local damaging = false
- local equipping = false
- local finishing = false
- local bleeding = false
- local usingattack = false
- local FinishSound = Instance.new("Sound")
- FinishSound.SoundId = "rbxassetid://3781479909"
- FinishSound.Parent = Handle
- FinishSound.Volume = .6
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "rbxassetid://344936319"
- HitSound.Parent = Handle
- HitSound.Volume = .6
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxassetid://2227999690"
- SlashSound.Parent = Handle
- SlashSound.Volume = .6
- local equip = Instance.new("Sound")
- equip.SoundId = "rbxassetid://2706199011"
- equip.Parent = Handle
- equip.Volume = 1
- local anims = {33169596,204062532,218504594,186934910,184574340}
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://" .. anims[math.random(1,#anims)]
- local swinganim = hum:LoadAnimation(animation)
- function bleed(p)
- bleeding = true
- bleeding = true
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Name = "Blood"
- ParticleEmitter0.Parent = p
- ParticleEmitter0.Speed = NumberRange.new(5, 10)
- ParticleEmitter0.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 0.40000000596046
- ParticleEmitter0.LightInfluence = 1
- ParticleEmitter0.Texture = "rbxassetid://73547327"
- ParticleEmitter0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- ParticleEmitter0.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter0.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 1000
- ParticleEmitter0.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter0.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter0.VelocitySpread = 360
- ParticleEmitter1.Name = "Blood2"
- ParticleEmitter1.Parent = p
- ParticleEmitter1.Speed = NumberRange.new(5, 14)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 0.20000000298023
- ParticleEmitter1.LightInfluence = 1
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=134531274"
- ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0.12499988079071,0)
- ParticleEmitter1.Acceleration = Vector3.new(0, -20, 0)
- ParticleEmitter1.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter1.Lifetime = NumberRange.new(0.5, 1.5)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 1000
- ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter1.VelocitySpread = 360
- ParticleEmitter2.Name = "Blood3"
- ParticleEmitter2.Parent = p
- ParticleEmitter2.Speed = NumberRange.new(3, 7)
- ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- ParticleEmitter2.Enabled = false
- ParticleEmitter2.LightEmission = 0.20000000298023
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://241779220"
- ParticleEmitter2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- ParticleEmitter2.ZOffset = 0.5
- ParticleEmitter2.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter2.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter2.Lifetime = NumberRange.new(0.40000000596046, 1)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 1000
- ParticleEmitter2.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter2.VelocitySpread = 360
- ParticleEmitter0.Enabled = true
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- spawn(function()
- game:GetService("Debris"):AddItem(ParticleEmitter0,1)
- game:GetService("Debris"):AddItem(ParticleEmitter1,1)
- game:GetService("Debris"):AddItem(ParticleEmitter2,1)
- wait(.1)
- ParticleEmitter0.Enabled = false
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- bleeding = false
- end)
- end
- function decap(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging and not usingattack then else return end
- usingattack = true
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- pcall(function()
- targchar:FindFirstChild("Head"):Destroy()
- end)
- FinishSound:Play()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- local pe0 = Instance.new("ParticleEmitter")
- local pe1 = Instance.new("ParticleEmitter")
- local pe2 = Instance.new("ParticleEmitter")
- pe0.Name = "Blood"
- pe0.Parent = targtorso
- pe0.Speed = NumberRange.new(5, 10)
- pe0.Rotation = NumberRange.new(-360, 360)
- pe0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- pe0.LightEmission = 0.40000000596046
- pe0.LightInfluence = 1
- pe0.Texture = "rbxassetid://73547327"
- pe0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- pe0.Size = NumberSequence.new(0,2.8749995231628)
- pe0.Acceleration = Vector3.new(0, -5, 0)
- pe0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- pe0.LockedToPart = true
- pe0.Rate = 100
- pe0.RotSpeed = NumberRange.new(-40, 270)
- pe1.Name = "Blood2"
- pe1.Parent = targtorso
- pe1.Speed = NumberRange.new(5, 14)
- pe1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- pe1.LightEmission = 0.20000000298023
- pe1.LightInfluence = 1
- pe1.Texture = "http://www.roblox.com/asset/?id=134531274"
- pe1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- pe1.ZOffset = 1
- pe1.Size = NumberSequence.new(0.12499988079071,0)
- pe1.Acceleration = Vector3.new(0, -20, 0)
- pe1.Lifetime = NumberRange.new(0.5, 1.5)
- pe1.LockedToPart = true
- pe1.Rate = 100
- pe2.Name = "Blood3"
- pe2.Parent = targtorso
- pe2.Speed = NumberRange.new(3, 7)
- pe2.Rotation = NumberRange.new(-360, 360)
- pe2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- pe2.LightEmission = 0.20000000298023
- pe2.LightInfluence = 1
- pe2.Texture = "rbxassetid://241779220"
- pe2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- pe2.ZOffset = 0.5
- pe2.Size = NumberSequence.new(0,2.8749995231628)
- pe2.Acceleration = Vector3.new(0, -5, 0)
- pe2.Lifetime = NumberRange.new(0.40000000596046, 1)
- pe2.LockedToPart = true
- pe2.Rate = 100
- pe2.RotSpeed = NumberRange.new(-40, 270)
- usingattack = false
- end
- function Ragdoll(targchar)
- local pc = targchar
- for _,obj in pairs(pc:GetChildren()) do
- if obj:IsA("Tool") then
- obj:Destroy()
- end
- end
- targchar.ChildAdded:Connect(function(obj)
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- 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
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",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",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",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",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",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",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",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",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",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",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",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",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",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",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",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- function blow(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging and not usingattack then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit")
- game:GetService("Debris"):AddItem(temphitval,.7)
- local tempdamage = damage
- if damage > targhum.Health and targhum.Health > 10 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > damage then
- targhum:TakeDamage(tempdamage)
- end
- if not bleeding then
- bleed(targtorso)
- end
- wait()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- end
- if targchar and targhum and targhum ~= hum and hum and not killval and not finishval and attacking and damaging then
- spawn(function()
- if 10 > targhum.Health then
- while 10 > targhum.Health do
- if 10 > targhum.Health then
- targhum.PlatformStand = true
- end
- wait(.1)
- end
- else
- for i = 0,0.8,.1 do
- targhum.PlatformStand = true
- wait(.1)
- end
- end
- targhum.PlatformStand = false
- end)
- end
- usingattack = false
- end
- function attack()
- damage = math.random(30,35)
- SlashSound.PlaybackSpeed = math.random(95,105)/100
- SlashSound:play()
- animval = animval + 1
- if animval > #anims-1 then animval = 1 end
- animation.AnimationId = "rbxassetid://" .. anims[animval]
- swinganim = hum:LoadAnimation(animation)
- if animval == 1 then
- swinganim:Play(.05,1,1) -- front swing
- elseif animval == 2 then
- Tool.Grip = CFrame.new(-0.0433726497, 1.30431943e-07, 1.82345986, -7.54978942e-08, -1, -1.19248815e-08, 1, -7.54978942e-08, -4.37113883e-08, 4.37113883e-08, -1.19248842e-08, 1)
- swinganim:Play(.04,1,1.2) -- left swing
- elseif animval == 3 then
- Tool.Grip = CFrame.new(-0.0644850433, -0.192117706, 1.77630055, 4.37113883e-08, 1, -4.37113847e-08, -1, 4.37113883e-08, 4.37113918e-08, 4.37113918e-08, 4.37113847e-08, 1)
- swinganim:Play(.04,1,1) -- right swing
- elseif animval == 4 then
- Tool.Grip = CFrame.new(-0.0644850433, -0.192117706, 1.77630055, 4.37113883e-08, 1, -4.37113847e-08, -1, 4.37113883e-08, 4.37113918e-08, 4.37113918e-08, 4.37113847e-08, 1)
- swinganim:Play(.04,1,1) -- right 360 spin
- end
- end
- function hitdecide(obj)
- local targhum,killval,hitval,finishval
- pcall(function()
- targhum = obj.Parent:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if animval == 4 and targhum and not killval and not finishval and targhum.PlatformStand then
- decap(obj)
- else
- blow(obj)
- end
- end
- function Activated()
- if hum.PlatformStand or attacking or finishing or usingattack or equipping or not char or not hum or not torso or hum.PlatformStand or torso.Anchored or 0 >= hum.Health then return end
- attacking = true
- local finishregion = Region3.new(torso.Position-(Vector3.new(1.5, 6, 1.5)/2),torso.Position+(Vector3.new(1.5, -3, 1.5)/2))
- local targchar,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if obj.Parent ~= char then
- local tempchar,temphum
- pcall(function()
- tempchar = obj.Parent
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temphum and not temphum:FindFirstChild("hit with melee") and temphum.Health > 0 and 10 > temphum.Health and temphum.PlatformStand then
- targchar = tempchar
- targhum = temphum
- end
- end
- end
- if targchar and targhum and not targhum:FindFirstChild("hit with melee") and targhum.Health > 0 and 10 > targhum.Health and targhum.PlatformStand then
- pcall(function()
- finish(targchar)
- end)
- else
- pcall(function()
- attack()
- end)
- damaging = true
- Trail.Enabled = true
- wait(.7)
- end
- damaging = false
- Tool.Grip = CFrame.new(1.31134158e-07, -0.0329501629, 1.95680952, 1, -8.74227766e-08, -4.37113883e-08, 4.37113883e-08, -3.82137093e-15, 1, -8.74227766e-08, -1, 0)
- damage = math.random(30,35)
- hum.WalkSpeed = 16
- Trail.Enabled = false
- attacking = false
- end
- function finish(targchar)
- if hum.PlatformStand or finishing or equipping or not char or not hum or hum.PlatformStand then return end
- local finishingval = Instance.new("ObjectValue",hum)
- finishingval.Name = "finishing"
- local targtorso,targhum,killval,finishval
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if finishval then finishingval:Destroy() return end
- finishing = true
- animation.AnimationId = "rbxassetid://" .. anims[#anims]
- swinganim = hum:LoadAnimation(animation)
- targtorso.Anchored = true
- hum.WalkSpeed = 0
- swinganim:Play(.1,1,1)
- Trail.Enabled = true
- wait(.9)
- Tool.Grip = CFrame.new(0.0853362679, -0.138822764, 1.8955003, 0.996399045, -0.00547825033, 0.0846105888, 9.00643187e-08, 0.997910559, 0.0646102801, -0.0847877562, -0.0643776134, 0.994317114)
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- targtorso.Anchored = false
- FinishSound:Play()
- if not bleeding then
- bleed(targtorso)
- end
- end
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- wait(1.2)
- Trail.Enabled = false
- swinganim:Stop()
- hum.WalkSpeed = 16
- Tool.Grip = CFrame.new(1.31134158e-07, -0.0329501629, 1.95680952, 1, -8.74227766e-08, -4.37113883e-08, 4.37113883e-08, -3.82137093e-15, 1, -8.74227766e-08, -1, 0)
- damage = math.random(30,35)
- finishingval:Destroy()
- finishing = false
- end
- function CheckIfAlive()
- 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 equip_anim()
- for i = 0,15 do
- Tool.Grip = Tool.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- wait(0)
- end
- end
- function Equipped()
- if attacking or finishing or equipping then return end
- char = Tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- swinganim = hum:LoadAnimation(animation)
- if not CheckIfAlive() then Tool.Parent = nil return end
- equipped = true
- --equipping = true
- equip:play()
- --equip_anim()
- --equipping = false
- end
- function Unequipped()
- equipped = false
- swinganim:Stop()
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Handle.Touched:Connect(hitdecide)
- end))
- Script2.Name = "Shanker"
- Script2.Parent = mas
- table.insert(cors,sandbox(Script2,function()
- local Tool = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- Tool.Name = "Shanker"
- Tool.Parent = owner['Backpack']
- Tool.TextureId = "rbxassetid://221579057"
- Tool.Grip = CFrame.new(0.58370018, 0.107090458, -2.22044605e-16, 0, -1, 1.19248806e-08, 1.19248806e-08, 1.19248806e-08, 1, -1, 1.42202776e-16, 1.19248806e-08)
- Handle.Name = "Handle"
- Handle.Parent = Tool
- Handle.Position = Vector3.new()
- Handle.Size = Vector3.new(2.049, 0.419, 0.096)
- Handle.Material = Enum.Material.Wood
- Handle.CanCollide = false
- Handle.Massless = true
- SpecialMesh3.Parent = Handle
- SpecialMesh3.MeshId = "rbxassetid://432429191"
- SpecialMesh3.Scale = Vector3.new(0.21, 0.21, 0.21)
- SpecialMesh3.TextureId = "rbxassetid://432429255"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- local a1,a2,Trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = Handle
- a1.Position = Vector3.new(-1.025, 0, 0)
- a2.Parent = Handle
- a2.Position = Vector3.new(1.025, 0, 0)
- Trail.Parent = Handle
- Trail.Attachment0 = a1
- Trail.Attachment1 = a2
- Trail.LightInfluence = 1
- Trail.Transparency = NumberSequence.new(0.5,1)
- Trail.Lifetime = 1
- Trail.Enabled = false
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local r = game:service("RunService")
- local damage = math.random(20,25)
- local last_attack = 0
- local animval = 1
- local attacking = false
- local damaging = false
- local equipping = false
- local finishing = false
- local bleeding = false
- local FinishSound = Instance.new("Sound")
- FinishSound.SoundId = "rbxassetid://3781479909"
- FinishSound.Parent = Handle
- FinishSound.Volume = .6
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "rbxassetid://204139415"
- HitSound.Parent = Handle
- HitSound.Volume = .6
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxassetid://154965929"
- SlashSound.Parent = Handle
- SlashSound.Volume = .6
- local equip = Instance.new("Sound")
- equip.SoundId = "rbxassetid://2706199011"
- equip.Parent = Handle
- equip.Volume = 1
- local anims = {204062532,218504594,2954124238,184574340}
- local idleanimation = Instance.new("Animation")
- idleanimation.AnimationId = "rbxassetid://241279220"
- local idleanim = hum:LoadAnimation(idleanimation)
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://" .. anims[math.random(1,#anims)]
- local swinganim = hum:LoadAnimation(animation)
- function bleed(p)
- bleeding = true
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Name = "Blood"
- ParticleEmitter0.Parent = p
- ParticleEmitter0.Speed = NumberRange.new(5, 10)
- ParticleEmitter0.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 0.40000000596046
- ParticleEmitter0.LightInfluence = 1
- ParticleEmitter0.Texture = "rbxassetid://73547327"
- ParticleEmitter0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- ParticleEmitter0.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter0.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 1000
- ParticleEmitter0.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter0.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter0.VelocitySpread = 360
- ParticleEmitter1.Name = "Blood2"
- ParticleEmitter1.Parent = p
- ParticleEmitter1.Speed = NumberRange.new(5, 14)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 0.20000000298023
- ParticleEmitter1.LightInfluence = 1
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=134531274"
- ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0.12499988079071,0)
- ParticleEmitter1.Acceleration = Vector3.new(0, -20, 0)
- ParticleEmitter1.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter1.Lifetime = NumberRange.new(0.5, 1.5)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 1000
- ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter1.VelocitySpread = 360
- ParticleEmitter2.Name = "Blood3"
- ParticleEmitter2.Parent = p
- ParticleEmitter2.Speed = NumberRange.new(3, 7)
- ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- ParticleEmitter2.Enabled = false
- ParticleEmitter2.LightEmission = 0.20000000298023
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://241779220"
- ParticleEmitter2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- ParticleEmitter2.ZOffset = 0.5
- ParticleEmitter2.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter2.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter2.Lifetime = NumberRange.new(0.40000000596046, 1)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 1000
- ParticleEmitter2.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter2.VelocitySpread = 360
- ParticleEmitter0.Enabled = true
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- spawn(function()
- game:GetService("Debris"):AddItem(ParticleEmitter0,1)
- game:GetService("Debris"):AddItem(ParticleEmitter1,1)
- game:GetService("Debris"):AddItem(ParticleEmitter2,1)
- wait(.1)
- ParticleEmitter0.Enabled = false
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- bleeding = false
- end)
- end
- function Ragdoll(targchar)
- local pc = targchar
- for _,obj in pairs(pc:GetChildren()) do
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- end
- targchar.ChildAdded:Connect(function(obj)
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- 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
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",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",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",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",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",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",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",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",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",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",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",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",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",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",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",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- function blow(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit")
- game:GetService("Debris"):AddItem(temphitval,.5)
- local tempdamage = damage
- if damage > targhum.Health and targhum.Health > 10 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > damage then
- targhum:TakeDamage(tempdamage)
- end
- if not bleeding then
- bleed(targtorso)
- end
- wait()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- end
- if targchar and targhum and targhum ~= hum and hum and not killval and not finishval and attacking and damaging then
- spawn(function()
- if 10 > targhum.Health then
- while 10 > targhum.Health do
- if 10 > targhum.Health then
- targhum.PlatformStand = true
- end
- wait(.1)
- end
- else
- for i = 0,2,.1 do
- targhum.PlatformStand = true
- wait(.1)
- end
- end
- targhum.PlatformStand = false
- end)
- end
- end
- function attack()
- damage = math.random(20,25)
- SlashSound.PlaybackSpeed = math.random(95,105)/100
- SlashSound:play()
- animval = animval + 1
- if animval > #anims-1 then animval = 1 end
- animation.AnimationId = "rbxassetid://" .. anims[animval]
- swinganim = hum:LoadAnimation(animation)
- if animval == 1 then
- Tool.Grip = CFrame.new(0.581854284, 0.0794715807, 0.084312439, 1.19248806e-08, 5.56362707e-08, 1, 1, 1.19248806e-08, -1.19248815e-08, -1.19248815e-08, 1, -5.56362707e-08)
- swinganim:Play(.04,1,1.2) -- left swing
- elseif animval == 2 then
- Tool.Grip = CFrame.new(0.581854284, -0.0794715881, -0.0843124315, 1.19248806e-08, 5.56362707e-08, 1, -1, -9.9347659e-08, 1.1924886e-08, 9.9347659e-08, -1, 5.56362707e-08)
- swinganim:Play(.04,1,1) -- right swing
- elseif animval == 3 then
- swinganim:Play(.1,1,2.5) -- quick stab left swing
- end
- end
- function Activated()
- if hum.PlatformStand or attacking or finishing or equipping or not char or not hum or not torso or hum.PlatformStand or torso.Anchored or 0 >= hum.Health then return end
- attacking = true
- local finishregion = Region3.new(torso.Position-(Vector3.new(1.5, 6, 1.5)/2),torso.Position+(Vector3.new(1.5, -3, 1.5)/2))
- local targchar,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if obj.Parent ~= char then
- local tempchar,temphum
- pcall(function()
- tempchar = obj.Parent
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temphum and not temphum:FindFirstChild("hit with melee") and temphum.Health > 0 and 10 > temphum.Health and temphum.PlatformStand then
- targchar = tempchar
- targhum = temphum
- end
- end
- end
- if targchar and targhum and not targhum:FindFirstChild("hit with melee") and targhum.Health > 0 and 10 > targhum.Health and targhum.PlatformStand then
- pcall(function()
- finish(targchar)
- end)
- else
- pcall(function()
- attack()
- end)
- Trail.Enabled = true
- damaging = true
- wait(.5)
- end
- damaging = false
- Tool.Grip = CFrame.new(0.58370018, 0.107090458, -2.22044605e-16, 0, -1, 1.19248806e-08, 1.19248806e-08, 1.19248806e-08, 1, -1, 1.42202776e-16, 1.19248806e-08)
- damage = math.random(20,25)
- hum.WalkSpeed = 16
- Trail.Enabled = false
- attacking = false
- end
- function finish(targchar)
- if finishing or equipping or not char or not hum then return end
- local finishingval = Instance.new("ObjectValue",hum)
- finishingval.Name = "finishing"
- local targtorso,targhum,killval,finishval
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if finishval then finishingval:Destroy() return end
- finishing = true
- animation.AnimationId = "rbxassetid://" .. anims[#anims]
- swinganim = hum:LoadAnimation(animation)
- targtorso.Anchored = true
- hum.WalkSpeed = 0
- swinganim:Play(.1,1,1)
- Trail.Enabled = true
- wait(.9)
- Tool.Grip = CFrame.new(0.478746921, 0.0952520296, -0.0485328957, -0.100857906, 5.53525723e-08, 0.994900823, -5.21253064e-16, 1, -5.56362707e-08, -0.994900823, -5.61135849e-09, -0.100857906)
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- targtorso.Anchored = false
- FinishSound:Play()
- if not bleeding then
- bleed(targtorso)
- end
- end
- --HitSound.PlaybackSpeed = math.random(9,12)/10
- --HitSound:Play()
- wait(1.2)
- Trail.Enabled = false
- swinganim:Stop()
- hum.WalkSpeed = 16
- Tool.Grip = CFrame.new(0.58370018, 0.107090458, -2.22044605e-16, 0, -1, 1.19248806e-08, 1.19248806e-08, 1.19248806e-08, 1, -1, 1.42202776e-16, 1.19248806e-08)
- damage = math.random(20,25)
- finishingval:Destroy()
- finishing = false
- end
- function CheckIfAlive()
- 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 equip_anim()
- for i = 0,15 do
- Tool.Grip = Tool.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- wait(0)
- end
- end
- function Equipped()
- if attacking or finishing or equipping then return end
- char = Tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- swinganim = hum:LoadAnimation(animation)
- idleanim = hum:LoadAnimation(idleanimation)
- if not CheckIfAlive() then Tool.Parent = nil return end
- equipped = true
- --equipping = true
- idleanim:Play()
- equip:play()
- --equip_anim()
- --equipping = false
- end
- function Unequipped()
- equipped = false
- swinganim:Stop()
- idleanim:Stop()
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Handle.Touched:Connect(blow)
- end))
- Script3.Name = "Pan"
- Script3.Parent = mas
- table.insert(cors,sandbox(Script3,function()
- local Tool = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- Tool.Name = "Pan"
- Tool.Parent = owner['Backpack']
- Tool.TextureId = "rbxassetid://24379116"
- Tool.Grip = CFrame.new(0.160528198, -0.076538071, -1.09314132, 3.17865059e-08, -1.19248798e-08, -1, -1, -1.19248815e-08, -3.17865059e-08, -1.19248806e-08, 1, -1.19248806e-08)
- Handle.Name = "Handle"
- Handle.Parent = Tool
- Handle.Position = Vector3.new()
- Handle.Size = Vector3.new(1, 2, 3)
- Handle.Material = Enum.Material.Metal
- Handle.CanCollide = false
- Handle.Massless = true
- SpecialMesh3.Parent = Handle
- SpecialMesh3.MeshId = "rbxassetid://24342877"
- SpecialMesh3.Scale = Vector3.new(2, 2, 2)
- SpecialMesh3.TextureId = "rbxassetid://24342832"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- local a1,a2,Trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = Handle
- a1.Position = Vector3.new(0, 0, -1.5)
- a2.Parent = Handle
- a2.Position = Vector3.new(0, 0, 1.5)
- Trail.Parent = Handle
- Trail.Attachment0 = a1
- Trail.Attachment1 = a2
- Trail.LightInfluence = 1
- Trail.Transparency = NumberSequence.new(0.5,1)
- Trail.Lifetime = 1
- Trail.Enabled = false
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local r = game:service("RunService")
- local damage = math.random(12,15)
- local last_attack = 0
- local animval = 1
- local attacking = false
- local damaging = false
- local equipping = false
- local finishing = false
- local bleeding = false
- local FinishSound = Instance.new("Sound")
- FinishSound.SoundId = "rbxassetid://3781479909"
- FinishSound.Parent = Handle
- FinishSound.Volume = .6
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "rbxassetid://861978247"
- HitSound.Parent = Handle
- HitSound.Volume = .6
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxassetid://169285411"
- SlashSound.Parent = Handle
- SlashSound.Volume = .6
- local equip = Instance.new("Sound")
- equip.SoundId = "rbxassetid://2706199011"
- equip.Parent = Handle
- equip.Volume = 1
- local anims = {204062532,218504594,184574340}
- local idleanimation = Instance.new("Animation")
- idleanimation.AnimationId = "rbxassetid://241279220"
- local idleanim = hum:LoadAnimation(idleanimation)
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://" .. anims[math.random(1,#anims)]
- local swinganim = hum:LoadAnimation(animation)
- function bleed(p)
- bleeding = true
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Name = "Blood"
- ParticleEmitter0.Parent = p
- ParticleEmitter0.Speed = NumberRange.new(5, 10)
- ParticleEmitter0.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 0.40000000596046
- ParticleEmitter0.LightInfluence = 1
- ParticleEmitter0.Texture = "rbxassetid://73547327"
- ParticleEmitter0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- ParticleEmitter0.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter0.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 1000
- ParticleEmitter0.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter0.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter0.VelocitySpread = 360
- ParticleEmitter1.Name = "Blood2"
- ParticleEmitter1.Parent = p
- ParticleEmitter1.Speed = NumberRange.new(5, 14)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 0.20000000298023
- ParticleEmitter1.LightInfluence = 1
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=134531274"
- ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0.12499988079071,0)
- ParticleEmitter1.Acceleration = Vector3.new(0, -20, 0)
- ParticleEmitter1.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter1.Lifetime = NumberRange.new(0.5, 1.5)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 1000
- ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter1.VelocitySpread = 360
- ParticleEmitter2.Name = "Blood3"
- ParticleEmitter2.Parent = p
- ParticleEmitter2.Speed = NumberRange.new(3, 7)
- ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- ParticleEmitter2.Enabled = false
- ParticleEmitter2.LightEmission = 0.20000000298023
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://241779220"
- ParticleEmitter2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- ParticleEmitter2.ZOffset = 0.5
- ParticleEmitter2.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter2.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter2.Lifetime = NumberRange.new(0.40000000596046, 1)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 1000
- ParticleEmitter2.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter2.VelocitySpread = 360
- ParticleEmitter0.Enabled = true
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- spawn(function()
- game:GetService("Debris"):AddItem(ParticleEmitter0,1)
- game:GetService("Debris"):AddItem(ParticleEmitter1,1)
- game:GetService("Debris"):AddItem(ParticleEmitter2,1)
- wait(.1)
- ParticleEmitter0.Enabled = false
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- bleeding = false
- end)
- end
- function Ragdoll(targchar)
- local pc = targchar
- for _,obj in pairs(pc:GetChildren()) do
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- end
- targchar.ChildAdded:Connect(function(obj)
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- 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
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",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",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",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",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",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",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",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",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",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",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",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",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",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",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",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- function blow(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit")
- game:GetService("Debris"):AddItem(temphitval,.5)
- local tempdamage = damage
- if damage > targhum.Health and targhum.Health > 10 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > damage then
- targhum:TakeDamage(tempdamage)
- end
- if not bleeding then
- bleed(targtorso)
- end
- wait()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- end
- if targchar and targhum and targhum ~= hum and hum and not killval and not finishval and attacking and damaging then
- spawn(function()
- if 10 > targhum.Health then
- while 10 > targhum.Health do
- if 10 > targhum.Health then
- targhum.PlatformStand = true
- end
- wait(.1)
- end
- else
- for i = 0,2.5,.1 do
- targhum.PlatformStand = true
- wait(.1)
- end
- end
- targhum.PlatformStand = false
- end)
- end
- end
- function attack()
- damage = math.random(12,15)
- SlashSound.PlaybackSpeed = math.random(95,105)/100
- SlashSound:play()
- animval = animval + 1
- if animval > #anims-1 then animval = 1 end
- animation.AnimationId = "rbxassetid://" .. anims[animval]
- swinganim = hum:LoadAnimation(animation)
- if animval == 1 then
- Tool.Grip = CFrame.new(0.0604715198, 0.0624101833, -0.755537868, -0.984136403, -0.177413553, -2.14116298e-08, -0.177413553, 0.984136403, -6.03930346e-08, 3.17865059e-08, -5.56362671e-08, -1)
- swinganim:Play(.04,1,1.2) -- left swing
- elseif animval == 2 then
- Tool.Grip = CFrame.new(0.265857041, -0.0624101944, -0.755537868, 0.984136403, 0.177413464, 2.14116351e-08, 0.177413464, -0.984136403, 6.03930346e-08, 3.17865059e-08, -5.56362671e-08, -1)
- swinganim:Play(.04,1,1) -- right swing
- end
- end
- function Activated()
- if hum.PlatformStand or attacking or finishing or equipping or not char or not hum or not torso or hum.PlatformStand or torso.Anchored or 0 >= hum.Health then return end
- attacking = true
- local finishregion = Region3.new(torso.Position-(Vector3.new(1.5, 6, 1.5)/2),torso.Position+(Vector3.new(1.5, -3, 1.5)/2))
- local targchar,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if obj.Parent ~= char then
- local tempchar,temphum
- pcall(function()
- tempchar = obj.Parent
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temphum and not temphum:FindFirstChild("hit with melee") and temphum.Health > 0 and 10 > temphum.Health and temphum.PlatformStand then
- targchar = tempchar
- targhum = temphum
- end
- end
- end
- if targchar and targhum and not targhum:FindFirstChild("hit with melee") and targhum.Health > 0 and 10 > targhum.Health and targhum.PlatformStand then
- pcall(function()
- finish(targchar)
- end)
- else
- pcall(function()
- attack()
- end)
- Trail.Enabled = true
- damaging = true
- wait(.5)
- end
- damaging = false
- Tool.Grip = CFrame.new(0.160528198, -0.076538071, -1.09314132, 3.17865059e-08, -1.19248798e-08, -1, -1, -1.19248815e-08, -3.17865059e-08, -1.19248806e-08, 1, -1.19248806e-08)
- damage = math.random(12,15)
- hum.WalkSpeed = 16
- Trail.Enabled = false
- attacking = false
- end
- function finish(targchar)
- if finishing or equipping or not char or not hum then return end
- local finishingval = Instance.new("ObjectValue",hum)
- finishingval.Name = "finishing"
- local targtorso,targhum,killval,finishval
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if finishval then finishingval:Destroy() return end
- finishing = true
- animation.AnimationId = "rbxassetid://" .. anims[#anims]
- swinganim = hum:LoadAnimation(animation)
- targtorso.Anchored = true
- hum.WalkSpeed = 0
- swinganim:Play(.1,1,1)
- Trail.Enabled = true
- wait(.9)
- Tool.Grip = CFrame.new(0.0951038897, -0.102372862, -0.843571067, 1.38934215e-08, -0.998034477, -0.0626674592, -0.995669305, 0.00582592748, -0.0927832425, 0.092965968, 0.0623960644, -0.993712306)
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- targtorso.Anchored = false
- FinishSound:Play()
- if not bleeding then
- bleed(targtorso)
- end
- end
- --HitSound.PlaybackSpeed = math.random(9,12)/10
- --HitSound:Play()
- wait(1.2)
- Trail.Enabled = false
- swinganim:Stop()
- hum.WalkSpeed = 16
- Tool.Grip = CFrame.new(0.160528198, -0.076538071, -1.09314132, 3.17865059e-08, -1.19248798e-08, -1, -1, -1.19248815e-08, -3.17865059e-08, -1.19248806e-08, 1, -1.19248806e-08)
- damage = math.random(12,15)
- finishingval:Destroy()
- finishing = false
- end
- function CheckIfAlive()
- 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 equip_anim()
- for i = 0,15 do
- Tool.Grip = Tool.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- wait(0)
- end
- end
- function Equipped()
- if attacking or finishing or equipping then return end
- char = Tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- swinganim = hum:LoadAnimation(animation)
- idleanim = hum:LoadAnimation(idleanimation)
- if not CheckIfAlive() then Tool.Parent = nil return end
- equipped = true
- --equipping = true
- idleanim:Play()
- equip:play()
- --equip_anim()
- --equipping = false
- end
- function Unequipped()
- equipped = false
- swinganim:Stop()
- idleanim:Stop()
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Handle.Touched:Connect(blow)
- end))
- Script1.Name = "Dual Blade"
- Script1.Parent = mas
- table.insert(cors,sandbox(Script1,function()
- local Tool = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- Tool.Name = "Dual Blade"
- Tool.Parent = owner['Backpack']
- Tool.TextureId = "rbxassetid://180085257"
- Tool.Grip = CFrame.new(-0, -2.2, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Handle.Name = "Handle"
- Handle.Parent = Tool
- Handle.Position = Vector3.new()
- Handle.Size = Vector3.new(0.5, 4.94, 1.34)
- Handle.Material = Enum.Material.Metal
- Handle.CanCollide = false
- Handle.Massless = true
- SpecialMesh3.Parent = Handle
- SpecialMesh3.MeshId = "rbxassetid://135463436"
- SpecialMesh3.Scale = Vector3.new(1, 1, 0.9)
- SpecialMesh3.TextureId = "rbxassetid://135463899"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- local a1,a2,Trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = Handle
- a1.Position = Vector3.new(0, 2.47, 0)
- a2.Parent = Handle
- a2.Position = Vector3.new(0, -2.47, 0)
- Trail.Parent = Handle
- Trail.Attachment0 = a1
- Trail.Attachment1 = a2
- Trail.LightInfluence = 1
- Trail.Transparency = NumberSequence.new(0.5,1)
- Trail.Lifetime = 1
- Trail.Enabled = false
- local cosmetic_particle = Instance.new("ParticleEmitter")
- cosmetic_particle.Name = "particle"
- cosmetic_particle.Parent = Handle
- cosmetic_particle.Speed = NumberRange.new(0, 0)
- cosmetic_particle.LightEmission = 0.69999998807907
- cosmetic_particle.Texture = "rbxassetid://244157186"
- cosmetic_particle.ZOffset = 1
- cosmetic_particle.Size = NumberSequence.new(0.1, 0.1)
- cosmetic_particle.Lifetime = NumberRange.new(10, 10)
- cosmetic_particle.Rate = 10
- cosmetic_particle.RotSpeed = NumberRange.new(20, 20)
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- local FakeHandle,FakeTrail,FakeWeld
- local r = game:service("RunService")
- local damage = math.random(10,15)
- local last_attack = 0
- local animval = 1
- local attacking = false
- local damaging = false
- local equipping = false
- local finishing = false
- local bleeding = false
- local usingattack = false
- local FinishSound = Instance.new("Sound")
- FinishSound.SoundId = "rbxassetid://3781479909"
- FinishSound.Parent = Handle
- FinishSound.Volume = .6
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "rbxassetid://344936319"
- HitSound.Parent = Handle
- HitSound.Volume = .6
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxassetid://2227999690"
- SlashSound.Parent = Handle
- SlashSound.Volume = .6
- local equip = Instance.new("Sound")
- equip.SoundId = "rbxassetid://2706199011"
- equip.Parent = Handle
- equip.Volume = 1
- local anims = {186001341,186934910,184574340}
- local idleanimation = Instance.new("Animation")
- idleanimation.AnimationId = "rbxassetid://185824714"
- local idleanim = hum:LoadAnimation(idleanimation)
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://" .. anims[math.random(1,#anims)]
- local swinganim = hum:LoadAnimation(animation)
- function bleed(p)
- bleeding = true
- bleeding = true
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Name = "Blood"
- ParticleEmitter0.Parent = p
- ParticleEmitter0.Speed = NumberRange.new(5, 10)
- ParticleEmitter0.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 0.40000000596046
- ParticleEmitter0.LightInfluence = 1
- ParticleEmitter0.Texture = "rbxassetid://73547327"
- ParticleEmitter0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- ParticleEmitter0.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter0.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 1000
- ParticleEmitter0.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter0.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter0.VelocitySpread = 360
- ParticleEmitter1.Name = "Blood2"
- ParticleEmitter1.Parent = p
- ParticleEmitter1.Speed = NumberRange.new(5, 14)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 0.20000000298023
- ParticleEmitter1.LightInfluence = 1
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=134531274"
- ParticleEmitter1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0.12499988079071,0)
- ParticleEmitter1.Acceleration = Vector3.new(0, -20, 0)
- ParticleEmitter1.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter1.Lifetime = NumberRange.new(0.5, 1.5)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 1000
- ParticleEmitter1.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter1.VelocitySpread = 360
- ParticleEmitter2.Name = "Blood3"
- ParticleEmitter2.Parent = p
- ParticleEmitter2.Speed = NumberRange.new(3, 7)
- ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- ParticleEmitter2.Enabled = false
- ParticleEmitter2.LightEmission = 0.20000000298023
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://241779220"
- ParticleEmitter2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- ParticleEmitter2.ZOffset = 0.5
- ParticleEmitter2.Size = NumberSequence.new(0,2.8749995231628)
- ParticleEmitter2.Acceleration = Vector3.new(0, -5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
- ParticleEmitter2.Lifetime = NumberRange.new(0.40000000596046, 1)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 1000
- ParticleEmitter2.RotSpeed = NumberRange.new(-40, 270)
- ParticleEmitter2.SpreadAngle = Vector2.new(360, 360)
- ParticleEmitter2.VelocitySpread = 360
- ParticleEmitter0.Enabled = true
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- spawn(function()
- game:GetService("Debris"):AddItem(ParticleEmitter0,1)
- game:GetService("Debris"):AddItem(ParticleEmitter1,1)
- game:GetService("Debris"):AddItem(ParticleEmitter2,1)
- wait(.1)
- ParticleEmitter0.Enabled = false
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- bleeding = false
- end)
- end
- function decap(hit)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging and not usingattack then else return end
- usingattack = true
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- pcall(function()
- targchar:FindFirstChild("Head"):Destroy()
- end)
- FinishSound:Play()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- local pe0 = Instance.new("ParticleEmitter")
- local pe1 = Instance.new("ParticleEmitter")
- local pe2 = Instance.new("ParticleEmitter")
- pe0.Name = "Blood"
- pe0.Parent = targtorso
- pe0.Speed = NumberRange.new(5, 10)
- pe0.Rotation = NumberRange.new(-360, 360)
- pe0.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.423529, 0, 0))
- pe0.LightEmission = 0.40000000596046
- pe0.LightInfluence = 1
- pe0.Texture = "rbxassetid://73547327"
- pe0.Transparency = NumberSequence.new(0.10000000149012,0.14375001192093,0.49374997615814,1)
- pe0.Size = NumberSequence.new(0,2.8749995231628)
- pe0.Acceleration = Vector3.new(0, -5, 0)
- pe0.Lifetime = NumberRange.new(0.30000001192093, 0.5)
- pe0.LockedToPart = true
- pe0.Rate = 100
- pe0.RotSpeed = NumberRange.new(-40, 270)
- pe1.Name = "Blood2"
- pe1.Parent = targtorso
- pe1.Speed = NumberRange.new(5, 14)
- pe1.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- pe1.LightEmission = 0.20000000298023
- pe1.LightInfluence = 1
- pe1.Texture = "http://www.roblox.com/asset/?id=134531274"
- pe1.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- pe1.ZOffset = 1
- pe1.Size = NumberSequence.new(0.12499988079071,0)
- pe1.Acceleration = Vector3.new(0, -20, 0)
- pe1.Lifetime = NumberRange.new(0.5, 1.5)
- pe1.LockedToPart = true
- pe1.Rate = 100
- pe2.Name = "Blood3"
- pe2.Parent = targtorso
- pe2.Speed = NumberRange.new(3, 7)
- pe2.Rotation = NumberRange.new(-360, 360)
- pe2.Color = ColorSequence.new(Color3.new(0.486275, 0, 0),Color3.new(0.258824, 0, 0))
- pe2.LightEmission = 0.20000000298023
- pe2.LightInfluence = 1
- pe2.Texture = "rbxassetid://241779220"
- pe2.Transparency = NumberSequence.new(1,0.48750001192093,0.75625002384186,1)
- pe2.ZOffset = 0.5
- pe2.Size = NumberSequence.new(0,2.8749995231628)
- pe2.Acceleration = Vector3.new(0, -5, 0)
- pe2.Lifetime = NumberRange.new(0.40000000596046, 1)
- pe2.LockedToPart = true
- pe2.Rate = 100
- pe2.RotSpeed = NumberRange.new(-40, 270)
- usingattack = false
- end
- function Ragdoll(targchar)
- local pc = targchar
- for _,obj in pairs(pc:GetChildren()) do
- if obj:IsA("Tool") then
- obj:Destroy()
- end
- end
- targchar.ChildAdded:Connect(function(obj)
- if obj:IsA("Tool") then
- pcall(function()
- obj:Destroy()
- end)
- end
- 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
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",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",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",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",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",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",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",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",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",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",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",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",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",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",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",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- function blow(hit,blade)
- local targchar,targtorso,targhum,killval,hitval,finishval
- pcall(function()
- targchar = hit.Parent
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit blade " .. blade)
- end)
- if targchar and targhum and targhum ~= hum and hum and not killval and not hitval and not finishval and attacking and damaging and not usingattack then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit blade " .. blade)
- game:GetService("Debris"):AddItem(temphitval,.7)
- local tempdamage = damage
- if damage > targhum.Health and targhum.Health > 6 then
- tempdamage = targhum.Health - 1
- targhum:TakeDamage(tempdamage)
- elseif targhum.Health > damage then
- targhum:TakeDamage(tempdamage)
- end
- if not bleeding then
- bleed(targtorso)
- end
- wait()
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- end
- if targchar and targhum and targhum ~= hum and hum and not killval and not finishval and attacking and damaging then
- spawn(function()
- if 10 > targhum.Health then
- while 10 > targhum.Health do
- if 10 > targhum.Health then
- targhum.PlatformStand = true
- end
- wait(.1)
- end
- else
- for i = 0,1.4,.1 do
- targhum.PlatformStand = true
- wait(.1)
- end
- end
- targhum.PlatformStand = false
- end)
- end
- usingattack = false
- end
- function attack()
- damage = math.random(10,15)
- SlashSound.PlaybackSpeed = math.random(95,105)/100
- SlashSound:play()
- animval = animval + 1
- if animval > #anims-1 then animval = 1 end
- animation.AnimationId = "rbxassetid://" .. anims[animval]
- swinganim = hum:LoadAnimation(animation)
- if animval == 1 then
- swinganim:Play(.05,1,1) -- lazy to label
- elseif animval == 2 then
- Tool.Grip = CFrame.new(-0.0593283735, -1.93600047, 0.00935958698, 0.155831799, -0.987783551, 4.31773906e-08, 0, -4.37113883e-08, -1, 0.987783551, 0.155831799, -6.81162415e-09)
- FakeWeld.C0 = Tool.Grip:Inverse() * CFrame.Angles(0,math.rad(-90),math.rad(-90)) + Vector3.new(3,-1,1.8)
- swinganim:Play(.04,1,1) -- right 360 spin
- end
- end
- function hitdecide(obj,blade)
- local targhum,killval,hitval,finishval
- pcall(function()
- targhum = obj.Parent:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit blade " .. blade)
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if animval == 2 and targhum and not killval and not finishval and targhum.PlatformStand and (10 > targhum.Health) then
- decap(obj)
- else
- blow(obj,blade)
- end
- end
- function Activated()
- if hum.PlatformStand or attacking or finishing or usingattack or equipping or not char or not hum or not torso or hum.PlatformStand or torso.Anchored or 0 >= hum.Health then return end
- attacking = true
- local finishregion = Region3.new(torso.Position-(Vector3.new(1.5, 6, 1.5)/2),torso.Position+(Vector3.new(1.5, -3, 1.5)/2))
- local targchar,targhum
- local regionparts = workspace:FindPartsInRegion3(finishregion)
- for _,obj in pairs(regionparts) do
- if obj.Parent ~= char then
- local tempchar,temphum
- pcall(function()
- tempchar = obj.Parent
- end)
- pcall(function()
- temphum = tempchar:FindFirstChildOfClass("Humanoid")
- end)
- if tempchar and temphum and not temphum:FindFirstChild("hit with melee") and temphum.Health > 0 and 10 > temphum.Health and temphum.PlatformStand then
- targchar = tempchar
- targhum = temphum
- end
- end
- end
- if targchar and targhum and not targhum:FindFirstChild("hit with melee") and targhum.Health > 0 and 10 > targhum.Health and targhum.PlatformStand then
- pcall(function()
- finish(targchar)
- end)
- else
- pcall(function()
- attack()
- end)
- damaging = true
- Trail.Enabled = true
- pcall(function()
- FakeTrail.Enabled = true
- end)
- wait(.7)
- end
- damaging = false
- Tool.Grip = CFrame.new(-0, -2.2, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- FakeWeld.C0 = Tool.Grip:Inverse()
- damage = math.random(10,15)
- hum.WalkSpeed = 16
- Trail.Enabled = false
- pcall(function()
- FakeTrail.Enabled = false
- end)
- attacking = false
- end
- function finish(targchar)
- if hum.PlatformStand or finishing or equipping or not char or not hum or hum.PlatformStand then return end
- local finishingval = Instance.new("ObjectValue",hum)
- finishingval.Name = "finishing"
- local targtorso,targhum,killval,finishval
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- finishval = targhum:FindFirstChild("finishing")
- end)
- if finishval then finishingval:Destroy() return end
- finishing = true
- animation.AnimationId = "rbxassetid://" .. anims[#anims]
- swinganim = hum:LoadAnimation(animation)
- targtorso.Anchored = true
- hum.WalkSpeed = 0
- swinganim:Play(.1,1,1)
- Trail.Enabled = true
- pcall(function()
- FakeTrail.Enabled = true
- end)
- wait(.9)
- Tool.Grip = CFrame.new(0.0825450197, -1.77881193, -0.00506217778, 0.993925989, -0.00985812489, 0.109608412, 0.110050835, 0.0890338197, -0.989930272, 0, 0.995979846, 0.0895779207)
- pcall(function()
- Ragdoll(targchar)
- end)
- targhum:TakeDamage(1/0)
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- targtorso.Anchored = false
- FinishSound:Play()
- if not bleeding then
- bleed(targtorso)
- end
- end
- HitSound.PlaybackSpeed = math.random(9,12)/10
- HitSound:Play()
- wait(1.2)
- Trail.Enabled = false
- pcall(function()
- FakeTrail.Enabled = false
- end)
- swinganim:Stop()
- hum.WalkSpeed = 16
- Tool.Grip = CFrame.new(-0, -2.2, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- damage = math.random(10,15)
- finishingval:Destroy()
- finishing = false
- end
- function CheckIfAlive()
- 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 equip_anim()
- for i = 0,15 do
- Tool.Grip = Tool.Grip * CFrame.Angles(math.rad(-22.5),0,0)
- FakeWeld.C0 = Tool.Grip:Inverse()
- wait(0)
- end
- end
- function MakeDual()
- if FakeHandle and FakeHandle.Parent then pcall(FakeHandle:Destroy()) end
- local LeftArm = char:FindFirstChild("Left Arm")
- if LeftArm then
- FakeHandle = Handle:Clone()
- FakeHandle.Name = "FakeHandle"
- FakeWeld = Instance.new("Weld")
- FakeWeld.Part0 = LeftArm
- FakeWeld.Part1 = FakeHandle
- FakeWeld.C0 = Tool.Grip:Inverse()
- FakeWeld.C1 = Tool.Grip * CFrame.Angles(math.rad(-90),0,0):Inverse() + Vector3.new(0,0,3.2)
- FakeWeld.Parent = FakeHandle
- FakeHandle.Parent = Tool
- end
- pcall(function()
- FakeTrail = FakeHandle:FindFirstChildOfClass("Trail")
- end)
- if FakeHandle then
- FakeHandle.Touched:Connect(function(obj)
- hitdecide(obj,2)
- end)
- end
- end
- function Equipped()
- if attacking or finishing or equipping then return end
- char = Tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- swinganim = hum:LoadAnimation(animation)
- idleanim = hum:LoadAnimation(idleanimation)
- if not CheckIfAlive() then Tool.Parent = nil return end
- equipped = true
- --equipping = true
- idleanim:Play()
- equip:play()
- pcall(MakeDual)
- --equip_anim()
- --equipping = false
- end
- function Unequipped()
- equipped = false
- for i, v in pairs({FakeHandle}) do
- if v and v.Parent then
- v:Destroy()
- end
- end
- swinganim:Stop()
- idleanim:Stop()
- end
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Handle.Touched:Connect(function(obj)
- hitdecide(obj,1)
- end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner['Backpack']
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end
- local plr = owner
- local char,torso,hum
- function CheckIfAlive()
- 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 newchar()
- repeat wait() until plr.Character
- char = plr.Character
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- hum = char:FindFirstChildOfClass("Humanoid")
- if CheckIfAlive() then else newchar() end
- end
- wait()
- if not CheckIfAlive() then
- newchar()
- end
- if CheckIfAlive() then
- give()
- end
- plr.CharacterAdded:Connect(function()
- wait(.1)
- if not CheckIfAlive() then
- newchar()
- end
- if CheckIfAlive() then
- give()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement