local l=true local u=script.Parent function onKeyDown(k)k:lower()if k=="\102"then if l==false then return end u.Melee:play()l=false local k=u.Parent["\082\105\103\104\116 \065\114\109"].RightGrip script.melee.Value=true for l=1,6,1 do k.C1=k.C1*CFrame.fromEulerAnglesXYZ(-0.55,0,0)wait()end wait(.25)for l=1,6,1 do k.C1=k.C1*CFrame.fromEulerAnglesXYZ(.55,0,0)wait()end script.melee.Value=false wait(.5)l=true end end function onSelect(l)l.KeyDown:connect(onKeyDown)end function blow(l)local u=l.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if not u then return end local k=Tool.Parent local T=game.Players:playerFromCharacter(k)local N=k:findFirstChild("\072\117\109\097\110\111\105\100")if u~=N and(N~=nil and(game.Players:playerFromCharacter(u.Parent)and(game.Players:playerFromCharacter(u.Parent)).TeamColor~=cc))then tagHumanoid(u,T)u:TakeDamage(300)wait(1)untagHumanoid(u)end end u.Equipped:connect(onSelect)


local canmelee = true;
local tool = script.Parent;

function onKeyDown(key)
	key:lower();
	if key == "f" then
		if canmelee == false then
			return;
		end

		tool.Melee:play()

		canmelee = false;

		local rgrip = tool.Parent["Right Arm"].RightGrip;

		script.melee.Value = true;

		for i = 1,6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(-0.55,0,0);
			wait();
		end

		wait(0.25);

		for i = 1, 6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(0.55,0,0);
			wait();
		end

		script.melee.Value = false;

		wait(0.5);

		canmelee = true;
	end
end

function onSelect(mouse)
	mouse.KeyDown:connect(onKeyDown);
end


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if not humanoid then return end
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid ~= hum and hum ~= nil and game.Players:playerFromCharacter(humanoid.Parent) and game.Players:playerFromCharacter(humanoid.Parent).TeamColor~=cc then
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(300)
		wait(1)
		untagHumanoid(humanoid)
	end
end


tool.Equipped:connect(onSelect);
