--[[
function onKeyDown(key)
	local Character = Tool.Parent
	if Character:findFirstChild("Humanoid") == nil then return end
	if game.Players:GetPlayerFromCharacter(Character) == nil then return end
	local Humanoid = Character.Humanoid
	if Humanoid.Health < 0.01 then return end

	if key == "" then
	end
end
]]

function SetCollide()
	if Tool:IsDescendantOf(game.Workspace) == true then
		Tool.On.Value = false
		for i = 1, #ToolPart do
			if ToolPart[i].className == "Part" then
				if ToolPart[i]:findFirstChild("Collide") ~= nil then
					if ToolPart[i]["Collide"].Value == false then
					ToolPart[i].CanCollide = false
					end
				else
					ToolPart[i].CanCollide = true
				end
			end
		end
	end
	if Tool:IsDescendantOf(game.Players) == true then
		for i = 1, #ToolPart do
			if ToolPart[i].className == "Part" then
			ToolPart[i].CanCollide = false
			end
		end
	end
end


Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
