local function J(J,s)while not J:FindFirstChild(s)do J.ChildAdded:wait()end return J[s]end local s=script.Parent local q=J(s,"\107\110")local d=false local Y function OnTouched(J)local s=J.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if d==false then d=true if s then q.Splat:Play()else q.Ting:Play()end end wait(.5)d=false end s.Equipped:connect(function()Y=q.Touched:connect(OnTouched)end)s.Unequipped:connect(function()if Y then Y:disconnect()Y=nil end end)
-- Waits for the child of the specified parent
local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do
		parent.ChildAdded:wait()
	end
	return parent[childName]
end

local Tool = script.Parent
local kn = WaitForChild(Tool, "kn")
local Debounce = false

local TouchConnection

function OnTouched(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if Debounce == false then
		Debounce = true
		if humanoid then
			kn.Splat:Play()
		else
			kn.Ting:Play()
		end
	end
	wait(0.5)
	Debounce = false
end

Tool.Equipped:connect(function()
	TouchConnection = kn.Touched:connect(OnTouched)
end)

Tool.Unequipped:connect(function()
	if TouchConnection then
		TouchConnection:disconnect()
		TouchConnection = nil
	end
end)
