script.Parent.Unequipped:connect(function()for R=1,0,-0.05 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.3*R,0,-0.5*R)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7*R,0,.8*R)LW.C1=CFrame.new(-0.3*R,.5+1.2*R,0)end RW.Parent=nil LW.Parent=nil RSH.Parent=player.Character.Torso LSH.Parent=player.Character.Torso end)function HomeRunHit(R)local C=(R.Parent or game):FindFirstChild("\072\117\109\097\110\111\105\100")if C then C.Sit=true wait()C.Jump=true C.Parent.Torso.Velocity=(CFrame.new(script.Parent.Handle.Position,C.Parent.Torso.Position)).lookVector*100+Vector3.new(0,30,0)C.Parent.Torso.RotVelocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))end end function HomeRun()for R=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*R,-0.5*R,-0.5+R)LW.C0=CFrame.new(-1.5+.5*R,.5,-0.5*R)*CFrame.fromEulerAnglesXYZ(1.7,0,.8)end local R=script.Parent.Handle.Touched:connect(HomeRunHit)for R=0,1,.2 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5,-0.5-1.7*R,.5+.5*R)LW.C0=CFrame.new(-1-.5*R,.5,-0.5+.5*R)*CFrame.fromEulerAnglesXYZ(1.7,0,.8-1.2*R)LW.C1=CFrame.new(0,.5-R,0)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1-2*R,0,0)end for R=0,1,.2 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5,-2.2-.6*R,1)end wait(.1)R:disconnect()for R=0,1,.1 do wait()RW.C0=CFrame.new(1.5,.5,0)*CFrame.fromEulerAnglesXYZ(2.5-1.2*R,-2.8+2.8*R,1-1.5*R)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7,0,-0.4+1.2*R)LW.C1=CFrame.new(0,-0.5+R*2,0)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-3+2*R,0,0)end end function Whack()for R=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+R,0,-0.5+.5*R)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.7-.25*R,0,.8-.6*R)end for R=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*R,0,0)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.45-.25*R,0,.2)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1-.5*R,0,0)end for R,C in pairs(game.Players:GetChildren())do if C.Character:FindFirstChild("\084\111\114\115\111")then if(C.Character.Torso.Position-(script.Parent.Handle.CFrame*CFrame.new(0,-3,0)).p).magnitude<10 then local R=script.Parent._CamShake:clone()R.Disabled=false R.Parent=C.Backpack if C~=player then C.Character.Humanoid.Sit=true delay(.1,function()C.Character.Humanoid.Jump=true end)C.Character.Torso.RotVelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))end end end end for R=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*R,0,-0.5*R)LW.C0=CFrame.new(-1.5,.5,0)*CFrame.fromEulerAnglesXYZ(1.2+.5*R,0,.2+.6*R)GRP.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-1.5+.5*R,0,0)end end local R=false local C=nil
--griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0)

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.Sit = true
		wait()
		h.Jump = true
		h.Parent.Torso.Velocity = (CFrame.new(script.Parent.Handle.Position, h.Parent.Torso.Position).lookVector * 100)
			+ Vector3.new(0, 30, 0)
		h.Parent.Torso.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
	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.Character.Humanoid.Sit = true
					delay(0.1, function()
						p.Character.Humanoid.Jump = true
					end)
					p.Character.Torso.RotVelocity =
						Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
				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
