script.Parent.Unequipped:connect(function()for l=1,0,-0.05 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.3*l,0,-0.5*l)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7*l,0,.8*l)LW.C1=CFrame.new(-0.3*l,.5+1.2*l,0)end RW.Parent=nil LW.Parent=nil RSH.Parent=player.Character.Torso LSH.Parent=player.Character.Torso end)function HomeRunHit(l)local g=(l.Parent or game):FindFirstChild("\072\117\109\097\110\111\105\100")if g then g.Parent=nil end end function HomeRun()for l=0,1,.1 do if anim~="\104\111\109\101\114\117\110"then return end wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.3+1.2*l,-0.5*l,-0.5+l)LW.C0=CFrame.new(-1.5+.5*l,.5,-0.5*l)*CFrame.fromEulerAnglesXYZ(1.7,0,.8)end local l=script.Parent.Handle.Touched:connect(HomeRunHit)for l=0,1,.2 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5,-0.5-1.7*l,.5+.5*l)LW.C0=CFrame.new(-1-.5*l,.5,-0.5+.5*l)*CFrame.fromEulerAnglesXYZ(1.7,0,.8-1.2*l)LW.C1=CFrame.new(0,.5-l,0)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1-2*l,0,0)end for l=0,1,.2 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5,-2.2-.6*l,1)end wait(.1)l:disconnect()for l=0,1,.1 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5-1.2*l,-2.8+2.8*l,1-1.5*l)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7,0,-0.4+1.2*l)LW.C1=CFrame.new(0,-0.5+l*2,0)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-3+2*l,0,0)end end function Whack()for l=0,1,.2 do if anim~="\110\111\114\109"then return end wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.3+l,0,-0.5+.5*l)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7-.25*l,0,.8-.6*l)end for l=0,1,.25 do if anim~="\110\111\114\109"then return end wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.3-2.5*l,0,0)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.45-.25*l,0,.2)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1-.5*l,0,0)end for l,g in pairs(game.Players:GetChildren())do if g.Character:FindFirstChild("\084\111\114\115\111")then if(g.Character.Torso.Position-(script.Parent.Handle.CFrame*CFrame.new(0,-3,0)).p).magnitude<10 then local l=script.Parent._CamShake:clone()l.Disabled=false l.Parent=g.Backpack if g~=player then g.Parent=nil end end end end for l=0,1,.2 do if anim~="\110\111\114\109"then return end wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(-0.2+1.5*l,0,-0.5*l)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.2+.5*l,0,.2+.6*l)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1.5+.5*l,0,0)end end local l=false local g=nil


script.Parent.Unequipped:connect(function()
	--Bring_Arm_Down animation
	for i = 1, 0, -0.05 do
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
		LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)	
		LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
	end
	RW.Parent = nil
	LW.Parent = nil
	RSH.Parent = player.Character.Torso
	LSH.Parent = player.Character.Torso
end)

function HomeRunHit(part)
	local h = (part.Parent or game):FindFirstChild("Humanoid") --or findfirstchild optimization
	if h then
		h.Parent = nil
	end
end

function HomeRun()
	for i = 0, 1, 0.1 do
		if anim ~= "homerun" then return end
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+1.2*i, -0.5*i, -0.5+i)
		--R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5, 0.5)
		LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)	
		--L.C0 = CFrame.new(-1.0, 0.5, -0.5) * CFrame.fromEulerAnglesXYZ(1.7, 0, 1)
	end
	--start homerunhit connection--
	local con = script.Parent.Handle.Touched:connect(HomeRunHit)
	----------------------------------------
	for i = 0, 1, 0.2 do
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5-1.7*i, 0.5+0.5*i)
		--R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2, 1)
		LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8-1.2*i)	
		LW.C1 = CFrame.new(0, 0.5-i, 0)
		GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-2*i, 0, 0)
	end
	for i = 0, 1, 0.2 do
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2-0.6*i, 1)
	end
	wait(0.1)
	----end homerun connection---
	con:disconnect()
	--------------------------------------
	for i = 0, 1, 0.1 do
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5-1.2*i, -2.8+2.8*i, 1-1.5*i)
		--RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
		LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, -0.4+1.2*i)	
		LW.C1 = CFrame.new(0, -0.5+i*2, 0)
		--LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
		GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-3+2*i, 0, 0)
	end
end

function Whack()
	for i = 0, 1, 0.2 do
		if anim ~= "norm" then return end
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+i, 0, -0.5+0.5*i)
		LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7-0.25*i, 0, 0.8-0.6*i)	
	end
	for i = 0, 1, 0.25 do
		if anim ~= "norm" then return end
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.3-2.5*i, 0, 0)
		LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.45-0.25*i, 0, 0.2)	
		GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-0.5*i, 0, 0)
	end
	--insert camshake and hit nearby people
	for _, p in pairs(game.Players:GetChildren()) do
		if p.Character:FindFirstChild("Torso") then
			if (p.Character.Torso.Position - (script.Parent.Handle.CFrame*CFrame.new(0, -3, 0)).p).magnitude < 10 then
				local s = script.Parent._CamShake:clone()
				s.Disabled = false
				s.Parent = p.Backpack
				if p ~= player then
					p.Parent = nil
				end
			end
		end
	end
	------
	for i = 0, 1, 0.2 do
		if anim ~= "norm" then return end
		wait()
		RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(-0.2+1.5*i, 0, -0.5*i)
		LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.2+0.5*i, 0, 0.2+0.6*i)	
		GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1.5+0.5*i, 0, 0)
	end
end

local a = false
local co = nil