Give to Players
Script
Script
Inside Tool
Inside Tool
local tool = script.Parent
local canGive
local function onTouch(otherPart)
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if humanoid then
if humanoid.Parent ~= tool.Parent and canGive then
canGive = false
tool.Parent = humanoid.Parent
end
end
end
local function slash()
local str = Instance.new("StringValue")
str.Name = "toolanim"
str.Value = "Slash"
str.Parent = tool
canGive = true
wait(.5)
canGive = false
end
tool.Handle.Touched:Connect(onTouch)
tool.Activated:Connect(slash)