Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tool = Instance.new("Tool")
- Tool.Name = "Sword"
- Knife = Instance.new("Part")
- Knife.Name = "Handle"
- Knife.Parent = Tool
- Knife.Massless = true
- Tool.Parent = workspace.Lucas_YT111
- Tool.Grip = CFrame.Angles(0,math.rad(90),math.rad(90))
- Tool.GripUp = Vector3.new(0, 0, 9, 0, 0, -1, -1, 0, 0, 0, -1, 0)
- Tool.GripPos = Vector3.new(0,0,-9)
- Mesh = Instance.new("SpecialMesh")
- Knife.Size = Vector3.new(12, 6, 24)
- Mesh.Parent = Knife
- Mesh.MeshId = "http://www.roblox.com/asset/?id=12221720"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=12224218"
- Mesh.Scale = Vector3.new(6, 6, 6)
- myhum = owner.Character.Humanoid
- local stab = Instance.new("Sound", owner.character.Head)
- stab.SoundId = "rbxassetid://12222216"
- stab.Volume = 1
- local equipped = Instance.new("Sound", owner.character.Head)
- equipped.SoundId = "rbxassetid://12222225"
- equipped.Volume = 1
- local Lunge = Instance.new("Sound", owner.character.Head)
- Lunge.SoundId = "rbxassetid://12222208"
- Lunge.Volume = 1
- candamage = false
- islunging = false
- Tool.Activated:connect(function()
- local attackrandom = math.random(1,3)
- wait(0.45)
- if attackrandom == 1 then
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- Anim.Parent = Tool
- candamage = true
- wait(0.5)
- candamage = false
- elseif attackrandom == 2 then
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- Anim.Parent = Tool
- candamage = true
- wait(0.5)
- candamage = false
- elseif attackrandom == 3 then
- islunging = true
- Lunge:Stop()
- Lunge:Play()
- Tool.Grip = CFrame.Angles(0,math.rad(180),math.rad(90))
- Tool.GripPos = Vector3.new(0,0,-10.25)
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Lunge"
- Anim.Parent = Tool
- wait(0.25)
- islunging = false
- wait(0.40)
- Tool.Grip = CFrame.Angles(0,math.rad(90),math.rad(90))
- Tool.GripPos = Vector3.new(0,0,-9)
- end
- end)
- Tool.Equipped:Connect(function()
- equipped:Play()
- end)
- local isTouched = false
- local function damagePlayer(otherPart)
- if candamage and not islunging then
- local partParent = otherPart.Parent
- local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
- if humanoid ~= "myhum" and humanoid then
- stab:Stop()
- stab:Play()
- if not isTouched then
- isTouched = true
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 1000
- wait(0.40)
- isTouched = false
- end
- end
- end
- end
- end
- local function lungelol(otherPart3)
- if islunging and not candamage then
- local partParent3 = otherPart3.Parent
- local humanoid = partParent3:FindFirstChildWhichIsA("Humanoid")
- if humanoid ~= "myhum" and humanoid then
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 2000
- end
- end
- end
- end
- local function tapped(otherPart2)
- if not islunging and not candamage then
- local partParent2 = otherPart2.Parent
- local humanoid = partParent2:FindFirstChildWhichIsA("Humanoid")
- if humanoid ~= "myhum" and humanoid then
- if not isTouched then
- isTouched = true
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 200
- wait(0.1)
- isTouched = false
- end
- end
- end
- end
- end
- Knife.Touched:Connect(lungelol)
- Knife.Touched:Connect(damagePlayer)
- Knife.Touched:Connect(tapped)
Add Comment
Please, Sign In to add comment