Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local debris = game:GetService("Debris")
- Tool = Instance.new("Tool")
- Tool.Name = "Sword"
- Knife = Instance.new("Part")
- Knife.Name = "Handle"
- Knife.Parent = Tool
- Knife.Massless = true
- Tool.Parent = owner.Character
- Tool.Grip = CFrame.Angles(0,math.rad(90),math.rad(90))
- Tool.GripUp = Vector3.new(0, 0, 1.5, 0, 0, -1, -1, 0, 0, 0, -1, 0)
- Tool.GripPos = Vector3.new(0,0,-1.5)
- Knife.Color = Color3.fromRGB(91, 130, 255)
- Knife.Material = Enum.Material.ForceField
- Mesh = Instance.new("SpecialMesh")
- Knife.Transparency = 0.75
- Knife.Size = Vector3.new(2, 1, 4)
- Mesh.Parent = Knife
- Mesh.MeshId = "http://www.roblox.com/asset/?id=12221720"
- Mesh.Scale = Vector3.new(1, 1, 1)
- local stab = Instance.new("Sound", Knife)
- stab.SoundId = "rbxassetid://12222216"
- stab.Volume = 1
- local equipped = Instance.new("Sound", Knife)
- equipped.SoundId = "rbxassetid://12222225"
- equipped.Volume = 1
- local Lunge = Instance.new("Sound", Knife)
- Lunge.SoundId = "rbxassetid://12222208"
- Lunge.Volume = 1
- candamage = false
- islunging = false
- LastAttack = 0
- local clone
- function attack()
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- Anim.Parent = Tool
- candamage = true
- stab:Stop()
- stab:Play()
- wait(0.5)
- candamage = false
- end
- owner = nil
- character = nil
- playerhum = nil
- Tool.Equipped:Connect(function()
- equipped:Play()
- owner = game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent)
- character = owner.Character
- playerhum = character:findFirstChildOfClass("Humanoid")
- end)
- runservice = game:GetService("RunService")
- function lunge()
- islunging = true
- Lunge:Stop()
- Lunge:Play()
- Tool.Grip = CFrame.Angles(0,math.rad(180),math.rad(90))
- Tool.GripPos = Vector3.new(0,0,-1.75)
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Lunge"
- Anim.Parent = Tool
- wait(0.1)
- for i,clone in pairs(owner.Character:GetDescendants()) do
- pcall(function()
- if clone:IsA("BasePart") then
- local v = Instance.new("SpawnLocation",script)
- v.Enabled = false
- v.Name = ""
- game:GetService("Debris"):AddItem(v,0.5)
- v.CFrame = clone.CFrame
- v.Parent = workspace
- v.CanCollide = false
- v.Size = clone.Size + Vector3.new(0.05,0.05,0.05)
- v.Anchored = true
- v.Material = "Neon"
- v.Transparency = 0.7
- v.Color = Color3.fromRGB(255,255,255)
- if clone:FindFirstChildOfClass("SpecialMesh") then
- local mesh = clone:FindFirstChildOfClass("SpecialMesh"):Clone()
- mesh.Parent = v
- mesh.TextureId = ""
- end
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.5
- local object = v
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Transparency = 1
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- local goal2 = {}
- goal2.Color = Color3.fromRGB(0,0,0)
- local tween2 = tweenService:Create(object, tweenInfo, goal2)
- tween2:Play()
- end
- end)
- end
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.125
- local object = owner.Character.HumanoidRootPart
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-20)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- coroutine.wrap(function()
- for i = 1, 5 do
- wait(0.0078125)
- for i,clone in pairs(owner.Character:GetDescendants()) do
- pcall(function()
- if clone:IsA("BasePart") then
- local v = Instance.new("SpawnLocation",script)
- v.Enabled = false
- v.Name = ""
- game:GetService("Debris"):AddItem(v,0.5)
- v.CFrame = clone.CFrame
- v.Parent = workspace
- v.CanCollide = false
- v.Size = clone.Size + Vector3.new(0.05,0.05,0.05)
- v.Anchored = true
- v.Material = "Neon"
- v.Transparency = 0.7
- v.Color = Color3.fromRGB(255,255,255)
- if clone:FindFirstChildOfClass("SpecialMesh") then
- local mesh = clone:FindFirstChildOfClass("SpecialMesh"):Clone()
- mesh.Parent = v
- mesh.TextureId = ""
- end
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.5
- local object = v
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Transparency = 1
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- local goal2 = {}
- goal2.Color = Color3.fromRGB(0,0,0)
- local tween2 = tweenService:Create(object, tweenInfo, goal2)
- tween2:Play()
- end
- end)
- end
- end
- end)()
- 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,-1.5)
- end
- Tool.Activated:connect(function()
- local Tick = runservice.Stepped:wait()
- if (Tick - LastAttack) < 1 then
- lunge()
- else
- attack()
- end
- LastAttack = Tick
- 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 ~= owner.Character.Humanoid and humanoid then
- if not isTouched then
- isTouched = true
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 15
- 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 ~= owner.Character.Humanoid and humanoid then
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 50
- 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 ~= owner.Character.Humanoid and humanoid then
- if not isTouched then
- isTouched = true
- if humanoid.Health ~= 0 then
- humanoid.Health = humanoid.Health - 2.5
- 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