View difference between Paste ID: DNPUQbQY and yjgQCXhX
SHOW: | | - or go back to the newest paste.
1
Tool = Instance.new("Tool")
2
Tool.Name = "Sword"
3
Knife = Instance.new("Part")
4
Knife.Name = "Handle"
5
Knife.Parent = Tool
6
Knife.Massless = true
7
Tool.Parent = workspace.Lucas_YT111 
8
Tool.Grip = CFrame.Angles(0,math.rad(90),math.rad(90))
9-
Tool.GripUp = Vector3.new(0, 0, 9, 0, 0, -1, -1, 0, 0, 0, -1, 0)
9+
Tool.GripUp = Vector3.new(0, 0, 2.25, 0, 0, -1, -1, 0, 0, 0, -1, 0)
10-
Tool.GripPos = Vector3.new(0,0,-9)
10+
Tool.GripPos = Vector3.new(0,0,-2.25)
11
Mesh = Instance.new("SpecialMesh")
12-
Knife.Size = Vector3.new(12, 6, 24)
12+
Knife.Size = Vector3.new(2, 1, 8)
13
Mesh.Parent = Knife
14
Mesh.MeshId = "http://www.roblox.com/asset/?id=12221720"
15
Mesh.TextureId = "http://www.roblox.com/asset/?id=12224218"
16-
Mesh.Scale = Vector3.new(6, 6, 6)
16+
Mesh.Scale = Vector3.new(1, 1, 2)
17
myhum = owner.Character.Humanoid
18
local stab = Instance.new("Sound", owner.character.Head)
19
stab.SoundId = "rbxassetid://12222216"
20
stab.Volume = 1
21
local equipped = Instance.new("Sound", owner.character.Head)
22
equipped.SoundId = "rbxassetid://12222225"
23
equipped.Volume = 1
24
local Lunge = Instance.new("Sound", owner.character.Head)
25
Lunge.SoundId = "rbxassetid://12222208"
26
Lunge.Volume = 1
27
candamage = false
28
islunging = false
29
30
Tool.Activated:connect(function()
31
local attackrandom = math.random(1,3)
32
wait(0.45)
33
if attackrandom == 1 then
34
local Anim = Instance.new("StringValue")
35
Anim.Name = "toolanim"
36
Anim.Value = "Slash"
37
Anim.Parent = Tool
38
		candamage = true
39
wait(0.5)
40
		candamage = false
41
elseif attackrandom == 2 then
42
local Anim = Instance.new("StringValue")
43
Anim.Name = "toolanim"
44
Anim.Value = "Slash"
45
Anim.Parent = Tool
46
		candamage = true
47
wait(0.5)
48
		candamage = false
49
elseif attackrandom == 3 then
50
islunging = true
51
    Lunge:Stop()
52
    Lunge:Play()
53
Tool.Grip = CFrame.Angles(0,math.rad(180),math.rad(90))
54-
Tool.GripPos = Vector3.new(0,0,-10.25)
54+
Tool.GripPos = Vector3.new(0,0,-3.5)
55
    local Anim = Instance.new("StringValue")
56
    Anim.Name = "toolanim"
57
    Anim.Value = "Lunge"
58
    Anim.Parent = Tool
59
wait(0.25)
60
islunging = false
61
wait(0.40)
62
Tool.Grip = CFrame.Angles(0,math.rad(90),math.rad(90))
63-
Tool.GripPos = Vector3.new(0,0,-9)
63+
Tool.GripPos = Vector3.new(0,0,-2.25)
64
end
65
end)
66
67
68
Tool.Equipped:Connect(function()
69
equipped:Play()
70
end)
71
72
local isTouched = false
73
74
local function damagePlayer(otherPart)
75
    if candamage and not islunging then
76
	local partParent = otherPart.Parent
77
	local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
78
	if humanoid ~= "myhum" and humanoid then
79
    stab:Stop()
80
    stab:Play()
81
		if not isTouched then
82
			isTouched = true
83
            if humanoid.Health ~= 0 then
84-
	        humanoid.Health = humanoid.Health - 1000
84+
	        humanoid.Health = humanoid.Health - 10
85
            wait(0.40)
86
			isTouched = false
87
		end
88
	end
89
end
90
end
91
end
92
93
local function lungelol(otherPart3)
94
    if islunging and not candamage then
95
	local partParent3 = otherPart3.Parent
96
	local humanoid = partParent3:FindFirstChildWhichIsA("Humanoid")
97
	if humanoid ~= "myhum" and humanoid then
98
    if humanoid.Health ~= 0 then
99-
	humanoid.Health = humanoid.Health - 2000
99+
	humanoid.Health = humanoid.Health - 20
100
    end
101
  end
102
end
103
end
104
105
local function tapped(otherPart2)
106
    if not islunging and not candamage then
107
	local partParent2 = otherPart2.Parent
108
	local humanoid = partParent2:FindFirstChildWhichIsA("Humanoid")
109
	if humanoid ~= "myhum" and humanoid then
110
		if not isTouched then
111
			isTouched = true
112
    if humanoid.Health ~= 0 then
113-
	humanoid.Health = humanoid.Health - 200
113+
	humanoid.Health = humanoid.Health - 5
114
    wait(0.1)
115
			isTouched = false
116
    end
117
  end
118
end
119
end
120
end
121
122
Knife.Touched:Connect(lungelol)
123
Knife.Touched:Connect(damagePlayer)
124
Knife.Touched:Connect(tapped)