InputHandler.WeaponActivated:Connect(function(D)if Equipped and Tool.Enabled then local d=RocketBuffer:PopItem()if d then local c=tick()LastReloadTime=c if CurrentAnimation then CurrentAnimation:Stop()end FireRocketEvent:FireServer()Tool.Enabled=false CurrentAnimation=AnimationPlayer:PlayAnimation("\082\111\099\107\101\116\076\097\117\110\099\104\101\114\070\105\114\101\065\110\100\082\101\108\111\097\100")LaunchRocket(d,D)CurrentHandRocket=Tool:FindFirstChild("\072\097\110\100\082\111\099\107\101\116",true)if LocalReloadSound then LocalReloadSound:Play()end wait(ROCKET_RELOAD_WAIT_TO_SHOW_TIME)if LastReloadTime~=c then return end if CurrentHandRocket then CurrentHandRocket.Transparency=0 CurrentHandRocket.LocalTransparencyModifier=0 end wait(ROCKET_RELOAD_VISIBLE_TIME)if LastReloadTime~=c then return end if CurrentHandRocket then CurrentHandRocket.Transparency=1 CurrentHandRocket.LocalTransparencyModifier=1 end end end end)

InputHandler.WeaponActivated:Connect(function(TargetPos)
	if Equipped and Tool.Enabled then
		local NextRocket = RocketBuffer:PopItem()
		if NextRocket then
			local CurrentTime = tick()
			LastReloadTime = CurrentTime
			if CurrentAnimation then CurrentAnimation:Stop() end
			
			--Laucn the rocket.
			FireRocketEvent:FireServer()
			Tool.Enabled = false
			CurrentAnimation = AnimationPlayer:PlayAnimation("RocketLauncherFireAndReload")
			LaunchRocket(NextRocket,TargetPos)
			
			--Run the reload animation.
			CurrentHandRocket = Tool:FindFirstChild("HandRocket",true)
			if LocalReloadSound then
				LocalReloadSound:Play()
			end
			
			wait(ROCKET_RELOAD_WAIT_TO_SHOW_TIME)
			if LastReloadTime ~= CurrentTime then return end
			if CurrentHandRocket then
				CurrentHandRocket.Transparency = 0
				CurrentHandRocket.LocalTransparencyModifier = 0
			end
			wait(ROCKET_RELOAD_VISIBLE_TIME)
			if LastReloadTime ~= CurrentTime then return end
			if CurrentHandRocket then
				CurrentHandRocket.Transparency = 1
				CurrentHandRocket.LocalTransparencyModifier = 1
			end
		end
	end
end)
